I have had all sorts of trouble getting something up and running. Some of it has to do with WCF error: "This collection already contains an address with scheme http" And others.. I have tried fixes but it never works. HELP. I have no problem getting it to run on my local IIS
Ive created the absolute more simple silverlight app that calls a WCF service.. what is the small change that needs to be done??? look here http://www.simplecoder.net/SC.rar Server Error in '/' Application. This collection already contains an address with scheme http. There can be at most one address per scheme in this collection. Parameter name: item Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: 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 Source Error: Code: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: Code: [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.Activation.ServiceHostFactory.CreateServiceHost(Type serviceType, Uri[] baseAddresses) +28 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 '/Service1.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 Version Information:Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053 <!-- [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) [ServiceActivationException]: The service '/Service1.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. at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result) at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, Boolean flowContext) at System.ServiceModel.Activation.HttpHandler.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) --><!-- This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using <customErrors mode="Off"/>. Consider using <customErrors mode="On"/> or <customErrors mode="RemoteOnly"/> in production environments.-->
Check out this thread, http://community.discountasp.net/default.aspx?f=24&m=16709. It should help you resolve this type of error. Your local IIS and the DiscountASP servers are not configured the same way, so it is unlikely that you can get this working on both without some workaround and messy checks on the URL. Aristotle DiscountASP.NET www.DiscountASP.NET