Security Token Service cannot be activated due to This collection already contains an address with scheme http

In this article, I’m gonna to fix the below SharePoint Event log issue

WebHost failed to process a request Exception: System.ServiceModel.ServiceActivationException: The service ‘/_vti_bin/sts/spsecuritytokenservice.svc’ cannot be activated due to an exception during compilation. The exception message is: This collection already contains an address with scheme http.


Cause

There are multiple site bindings in this collection and the “multipleSiteBindingsEnabled” is not set to true in the web config file of the web service.


Solution 

To overcome “The exception message is: This collection already contains an address with scheme HTTP” error, try to do the following:

  • In the SharePoint WFE Server that raises this error log,
  • Open IIS > Sites > SharePoint Web Services > Explore Security Token Service Application.

Explore Security Token Service Application in IIS

  • Take a copy from the web.config file to allow the rollback.
  • Edit the web.config file with an appropriate editor.
  • Below <system.serviceModel>, add the below tag

[code language=”CSS”]
<serviceHostingEnvironment multipleSiteBindingsEnabled=”true” />
[/code]

This collection already contains an address with scheme http

  • Save, and close.
  • Try to browse the “servicetoken.svc” to make sure that the service is working properly.

Applies To
  • SharePoint 2016.
  • SharePoint 2013.

4 thoughts on “Security Token Service cannot be activated due to This collection already contains an address with scheme http”

  1. Pingback: SharePoint: 500 Internal Server Error | SPGeeks

  2. Pingback: The server was unable to save the form at this time. Please try again | SPGeeks

  3. Pingback: This User Profile Application's connection is currently not available | SPGeeks

  4. Pingback: Enable debugging in SharePoint Solutions | SPGeeks

Leave a Reply

Scroll to Top