title: wcf Service could not be activated
body: <p>It's a .svc IIS hosted service with ssl and membership.</p>
  
  <p>My wcf client reports:</p>
  
  <pre><code>System.ServiceModel.ServiceActivationException was unhandled
    Message="The requested service, 'https://www.greenjump.nl/WebServices/OrderService.svc' could not be activated. See the server's diagnostic trace logs for more information."
    Source="mscorlib"
  </code></pre>
  
  <p>On the server I get:
  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</p>
  
  <p>The strange thing is this only happens on the production server, the same code and config
  on the localhost development server works fine.
  I only change the endpoint address and  
  from computer name to www.webdomain.com</p>
  
  <p>more server trace</p>
  
  <pre><code>&lt;ExceptionType&gt;
    System.ArgumentException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
  &lt;/ExceptionType&gt;
  &lt;Message&gt;
    This collection already contains an address with scheme http.  There can be at most one address per scheme in this collection.
    Parameter name: item
  &lt;/Message&gt;
  &lt;StackTrace&gt;
    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 SharpShop.Web.StructureMap.StructureMapServiceHost..ctor(Type serviceType, Uri[] baseAddresses)
    at SharpShop.Web.StructureMap.StructureMapServiceHostFactory.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)
    at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath)
    at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.HandleRequest()
    at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.BeginRequest()
    at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.OnBeginRequest(Object state)
    at System.ServiceModel.PartialTrustHelpers.PartialTrustInvoke(ContextCallback callback, Object state)
    at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.OnBeginRequestWithFlow(Object state)
    at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.WorkItem.Invoke2()
    at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.WorkItem.Invoke()
    at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.ProcessCallbacks()
    at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.CompletionCallback(Object state)
    at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.ScheduledOverlapped.IOCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
    at System.ServiceModel.Diagnostics.Utility.IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped)
    at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
  &lt;/StackTrace&gt;
  </code></pre>
  
  <p>config:</p>
  
  <pre><code>&lt;system.serviceModel&gt;
      &lt;bindings&gt;
        &lt;wsHttpBinding&gt;
          &lt;binding name="wsHttps"&gt;
            &lt;readerQuotas maxStringContentLength="128000"/&gt;
            &lt;security mode="TransportWithMessageCredential"&gt;
              &lt;transport clientCredentialType="None"/&gt;
              &lt;message clientCredentialType="UserName"/&gt;
            &lt;/security&gt;
          &lt;/binding&gt;
        &lt;/wsHttpBinding&gt;
      &lt;/bindings&gt;
      &lt;serviceHostingEnvironment aspNetCompatibilityEnabled="true" &gt;
        &lt;baseAddressPrefixFilters&gt;
          &lt;add prefix="https://www.greenjump.nl"/&gt;
        &lt;/baseAddressPrefixFilters&gt;
      &lt;/serviceHostingEnvironment&gt;
      &lt;behaviors&gt;
        &lt;serviceBehaviors&gt;
          &lt;behavior name="WsHttpWithAuthBehavior"&gt;
            &lt;serviceMetadata httpsGetEnabled="true" /&gt;
            &lt;serviceDebug includeExceptionDetailInFaults="true" /&gt;
            &lt;serviceAuthorization principalPermissionMode="UseAspNetRoles"
                                  roleProviderName="AspNetSqlRoleProvider"/&gt;
            &lt;serviceCredentials&gt;
              &lt;userNameAuthentication userNamePasswordValidationMode="MembershipProvider"
                membershipProviderName="AspNetSqlMembershipProvider" /&gt;
            &lt;/serviceCredentials&gt;
          &lt;/behavior&gt;
        &lt;/serviceBehaviors&gt;
      &lt;/behaviors&gt;
      &lt;services&gt;
        &lt;service behaviorConfiguration="WsHttpWithAuthBehavior" name="SharpShop.Services.OrderService"&gt;
          &lt;endpoint address="https://www.greenjump.nl/WebServices/OrderService.svc" 
                    binding="wsHttpBinding"
                    bindingConfiguration="wsHttps"
                    contract="SharpShop.Services.IOrderService"&gt;
            &lt;identity&gt;
              &lt;dns value="www.greenjump.nl" /&gt;
            &lt;/identity&gt;
          &lt;/endpoint&gt;
          &lt;endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" /&gt;
        &lt;/service&gt;
      &lt;/services&gt;
    &lt;/system.serviceModel&gt;
  </code></pre>