live-chat

Live chat by SightMax

Support Center » Knowledgebase » This collection already contains an address with scheme http. There can be at most one address per scheme in this collection. SightMax Version 7 and 7.1 Error
 This collection already contains an address with scheme http. There can be at most one address per scheme in this collection. SightMax Version 7 and 7.1 Error
Solution You received an error that looks like the following:

WebHost failed to process a request.
Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/58416792
Exception: System.ServiceModel.ServiceActivationException: The service '/SightMaxWebservices/sightmaxwebservice.svc' cannot be activated due to an exception during compilation. The exception message is: This collection already contains an address with scheme http. There can be at most one address per scheme in this collection.
Parameter name: item. ---> System.ArgumentException: This collection already contains an address with scheme http. There can be at most one address per scheme in this collection.
Parameter name: item
at System.ServiceModel.UriSchemeKeyedCollection.InsertItem(Int32 index, Uri item)
at System.Collections.Generic.SynchronizedCollection`1.Add(T item)
at System.ServiceModel.UriSchemeKeyedCollection..ctor(Uri[] addresses)
at System.ServiceModel.ServiceHost..ctor(Type serviceType, Uri[] baseAddresses)
at System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(Type serviceType, Uri[] baseAddresses)
at System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CreateService(String normalizedVirtualPath)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(String normalizedVirtualPath)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)
--- End of inner exception stack trace ---
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)
at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath)
Process Name: w3wp
Process ID: 3408


Solution:

Navigate to C:\Inetpub\wwwroot\SightMax\WebServices, and open Web.config in Notepad.

Search for     <serviceHostingEnvironment aspNetCompatibilityEnabled="true" /> and replace it with:

<serviceHostingEnvironment aspNetCompatibilityEnabled="true">
<baseAddressPrefixFilters>    
    <add prefix="http://YourWebsiteHostHeader" />
</baseAddressPrefixFilters>
</serviceHostingEnvironment>

Replace YourWebsiteHostHeader with the Host header of your Site ( Example www.sightmax.com ) then browse the SightMaxWebService.svc again.

Note: The HostHeader will be your Webservice URL.



Article Details
Article ID: 405
Created On: 21 Jul 2010 01:09 PM

 This answer was helpful  This answer was not helpful

 Login [Lost Password] 
Email:
Password:
Remember Me:
 
 Search
 Article Options
Home | Register | Submit a Ticket | Knowledgebase | Troubleshooter
Language:

Help Desk Software By Kayako eSupport v3.04.10