View Full Version : Need simple Web app/SL app that can call a WCF service and CAN COMPILE LOCALLY AND ON DISCOUNTASPNET
punkouter
11-06-2008, 04:52 AM
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
punkouter
11-06-2008, 05:34 AM
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:
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:
[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.Inser tItem(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(S tring normalizedVirtualPath) +11656060
System.ServiceModel.HostingManager.ActivateService (String normalizedVirtualPath) +42
System.ServiceModel.HostingManager.EnsureServiceAv ailable(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.HostedHttpRequestAs yncResult.End(IAsyncResult result) +194
System.ServiceModel.Activation.HostedHttpRequestAs yncResult.ExecuteSynchronous(HttpApplication context, Boolean flowContext) +176
System.ServiceModel.Activation.HttpHandler.Process Request(HttpContext context) +23
System.Web.CallHandlerExecutionStep.System.Web.Htt pApplication.IExecutionStep.Execute() +181
System.Web.HttpApplication.ExecuteStep(IExecutionS tep 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.Inser tItem(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.Host ingManager.CreateService(String normalizedVirtualPath)
at System.ServiceModel.ServiceHostingEnvironment.Host ingManager.ActivateService(String normalizedVirtualPath)
at System.ServiceModel.ServiceHostingEnvironment.Host ingManager.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.HostedHttpRequestAs yncResult.End(IAsyncResult result)
at System.ServiceModel.Activation.HostedHttpRequestAs yncResult.ExecuteSynchronous(HttpApplication context, Boolean flowContext)
at System.ServiceModel.Activation.HttpHandler.Process Request(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionSte p.System.Web.HttpApplication.IExecutionStep.Execut e()
at System.Web.HttpApplication.ExecuteStep(IExecutionS tep 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.-->
Aristotle
11-06-2008, 09:14 AM
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 (http://www.DiscountASP.NET)
vBulletin® ©Jelsoft Enterprises Ltd.