Deploying ADO.net Data Services

Discussion in 'ASP.NET / ASP.NET Core' started by dcrowell, Dec 13, 2008.

  1. Has anyone deployed an ADO.net Data Service? If so, were there any known issues and workarounds encountered? I deployed my first data service and got the errors below. The data service works on my machine but not on my DiscountAsp.net website. Thanks in advance.


    [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) +11516782
    System.Collections.Generic.SynchronizedCollection`1.Add(T item) +67
    System.ServiceModel.UriSchemeKeyedCollection..ctor(Uri[] addresses) +49
    System.ServiceModel.ServiceHost..ctor(Type serviceType, Uri[] baseAddresses) +129
    System.ServiceModel.Web.WebServiceHost..ctor(Type serviceType, Uri[] baseAddresses) +9
    System.Data.Services.DataServiceHostFactory.CreateServiceHost(Type serviceType, Uri[] baseAddresses) +29
    System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses) +331
    System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath) +11656060
    System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +42
    System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +479

    [ServiceActivationException: The service '/LeadData.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) +11527194
    System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +194
    System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, Boolean flowContext) +176
    System.ServiceModel.Activation.HttpHandler.ProcessRequest(HttpContext context) +23
    System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    did you configure the server base address? Post your web.config.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. Bruce, thank you for bringing up the web.config. I was missing this section:

     

Share This Page