Sto provando a distribuire un servizio WCF sul mio server, ospitato in IIS. Naturalmente funziona sulla mia macchina :)Come risolvere "impossibile trovare un indirizzo di base che corrisponda allo schema http" ... in WCF
Ma quando schiero esso, ottengo il seguente errore:
This collection already contains an address with scheme http. There can be at most one address per scheme in this collection.
Googling su questo, trovo che devo mettere un elemento serviceHostingEnvironment nel web.config File:
<serviceHostingEnvironment>
<baseAddressPrefixFilters>
<add prefix="http://mywebsiteurl"/>
</baseAddressPrefixFilters>
</serviceHostingEnvironment>
Ma una volta che ho fatto questo, ho il seguente:
Could not find a base address that matches scheme http for the endpoint with binding BasicHttpBinding. Registered base address schemes are [https].
Sembra che non sappia quale sia l'indirizzo di base, ma come faccio a specificarlo? Ecco la sezione del mio file web.config:
<system.serviceModel>
<serviceHostingEnvironment>
<baseAddressPrefixFilters>
<add prefix="http://mywebsiteurl"/>
</baseAddressPrefixFilters>
</serviceHostingEnvironment>
<behaviors>
<serviceBehaviors>
<behavior name="WcfPortalBehavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IWcfPortal"
maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"
receiveTimeout="00:10:00" sendTimeout="00:10:00"
openTimeout="00:10:00" closeTimeout="00:10:00">
<readerQuotas maxBytesPerRead="2147483647" maxArrayLength="2147483647"
maxStringContentLength="2147483647"/>
</binding>
</basicHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="WcfPortalBehavior" name="Csla.Server.Hosts.Silverlight.WcfPortal">
<endpoint address="" binding="basicHttpBinding" contract="Csla.Server.Hosts.Silverlight.IWcfPortal"
bindingConfiguration="BasicHttpBinding_IWcfPortal">
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
</system.serviceModel>
Qualcuno può far luce su ciò che sta succedendo e come risolvere il problema?
Hey Craig, avete risolto questo problema? Per favore fatemi ... Ora sto affrontando lo stesso problema :( – Lamps
qualsiasi soluzione definitiva a questo proposito? – Kiquenet