Ciao,

come da titolo non riesco a chiamare il web service da Jquery. Sono partito da questo tutorial:

http://www.encodedna.com/wcf/tutoria...-aspdotnet.htm


Questo il web config:


<system.serviceModel>
<services>
<service name="Books" behaviorConfiguration="MyServiceBehavior">

<endpoint
address=""
binding="webHttpBinding"
behaviorConfiguration="webEndPointBehavior"
name="webEndPoint"
contract="IBooks"/>

</service>
</services>

<behaviors>
<serviceBehaviors>
<behavior name="MyServiceBehavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>

<endpointBehaviors>
<behavior name="webEndPointBehavior">
<webHttp />
</behavior>
</endpointBehaviors>

</behaviors>

<serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
</system.serviceModel>


Ora il mio problema è che quando divido il web config in due e richiamo il web service dall'esterno non va.
Ho diviso i web config in questo modo:web.config service:


<system.serviceModel>
<services>
<service name="Books" behaviorConfiguration="MyServiceBehavior">
</service>
</services>

<behaviors>
<serviceBehaviors>
<behavior name="MyServiceBehavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>

</behaviors>

<serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
</system.serviceModel>


web.config consumer:



<system.serviceModel>
<bindings>
<webHttpBinding>
<binding name="WebHttpBinding_IBooks" />
</webHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:3268/Books.svc" binding="webHttpBinding"
bindingConfiguration="WebHttpBinding_IBooks" contract="BooksReference.IBooks"
name="WebHttpBinding_IBooks" />
</client>

<behaviors>
<endpointBehaviors>
<behavior name="webEndPointBehavior">
<webHttp />
</behavior>
</endpointBehaviors>
</behaviors>

</system.serviceModel>


Sicuramente ho sbagliato qualcosa nella divisione, ma non riesco a individuare cosa.