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
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />

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.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s