Services Error
<
serviceHostingEnvironment
aspNetCompatibilityEnabled
=
"true"
>
<
baseAddressPrefixFilters
>
<
add
prefix
=
"http://webstaging"
/>
</
baseAddressPrefixFilters
>
</
serviceHostingEnvironment
>
[ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index]
System.ThrowHelper.ThrowArgumentOutOfRangeException() +78
System.Collections.Generic.List`1.get_Item(Int32 index) +53
System.Collections.ObjectModel.ReadOnlyCollection`1.get_Item(Int32 index) +81
System.ServiceModel.Web.WebServiceHost.AddAutomaticWebHttpBindingEndpoints(ServiceHost host, IDictionary`2 implementedContracts, String multipleContractsErrorMessage) +96
System.ServiceModel.Web.WebServiceHost.OnOpening() +276
Telerik.Sitefinity.Utilities.MS.ServiceModel.Web.WebServiceHost2.OnOpening() +40
Telerik.Sitefinity.Web.Services.DefaultServiceHost.OnOpening() +9
System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) +397
System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +135
System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +654
[ServiceActivationException: The service '/Sitefinity/Services/Pages/PagesService.svc' cannot be activated due to an exception during compilation. The exception message is: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index.]
System.ServiceModel.AsyncResult.End(IAsyncResult result) +15700960
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +15623609
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, Boolean flowContext) +265
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +599
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +171
[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]
System.ServiceModel.UriSchemeKeyedCollection.InsertItem(Int32 index, Uri item) +15583484
System.Collections.Generic.SynchronizedCollection`1.Add(T item) +65
System.ServiceModel.UriSchemeKeyedCollection..ctor(Uri[] addresses) +62
System.ServiceModel.ServiceHost..ctor(Type serviceType, Uri[] baseAddresses) +266
System.ServiceModel.Web.WebServiceHost..ctor(Type serviceType, Uri[] baseAddresses) +10
Telerik.Sitefinity.Utilities.MS.ServiceModel.Web.WebServiceHost2..ctor(Type serviceType, Boolean dummy, Uri[] baseAddresses) +77
Telerik.Sitefinity.Web.Services.DefaultServiceHost..ctor(Type serviceType, Uri[] baseAddresses) +15
Telerik.Sitefinity.Web.Services.WcfHostFactory.CreateServiceHost(Type serviceType, Uri[] baseAddresses) +45
System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses) +427
System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath) +604
System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +46
System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +654
[ServiceActivationException: The service '/Sitefinity/Services/Pages/PagesService.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.ServiceModel.AsyncResult.End(IAsyncResult result) +15700960
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +15623609
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, Boolean flowContext) +265
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +599
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +171
Hello Bryan,
Thank you for using our services.
I have setup a website on local IIS and have managed to reproduce the issue. It seems that it is coming from the WcfHandlerFactory - we need to provide further configurations for RESTful WcfServices so that you are able to select a default http binding for the services. I have noticed that in another forum thread you have provided a workaround for this problem. Thank you for sharing your fix. We are going to resolve this issue for our future releases of the CMS.
I have updated your Telerik Points. If you encounter any other problems please feel free to let us know.
Sincerely yours,
Radoslav Georgiev
the Telerik team
Very cool! Thanks Radoslav.