Note that there are some explanatory texts on larger screens.

plurals
  1. POConfiguring WCF Security (wsHttpBinding)
    text
    copied!<p>I have two websites hosted on the same IIS server. SiteA contains WCF services that need to be accessed by SiteB, as well as anything else that is authenticated on the domain.</p> <p>The service is configured with a wsHttpBinding and thus I believe uses Windows security by default. Right now I can call the services from a console app running on my local machine, as well as from a web application running in the default Visual Studio web server, so I am taking that the authentication is working.</p> <p>However, when SiteB tries to access the services, it fails with this error: The caller was not authenticated by the service.</p> <p>SiteB runs on the same machine than SiteA so I don't understand why it could not be authenticated. SiteB uses Forms Authentication and I mapped Anonymous access to a domain user.</p> <p>Here are the config bits:</p> <p><strong>SiteA (service):</strong></p> <pre><code>&lt;system.serviceModel&gt; &lt;serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" /&gt; &lt;services&gt; &lt;service behaviorConfiguration="wcfServiceBehaviour" name="MyService"&gt; &lt;endpoint address="" binding="wsHttpBinding" contract="IServiceContract" /&gt; &lt;endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /&gt; &lt;/service&gt; &lt;/services&gt; &lt;behaviors&gt; &lt;serviceBehaviors&gt; &lt;behavior name="wcfServiceBehaviour"&gt; &lt;serviceMetadata httpGetEnabled="true" /&gt; &lt;serviceDebug includeExceptionDetailInFaults="true" /&gt; &lt;/behavior&gt; &lt;/serviceBehaviors&gt; &lt;/behaviors&gt; &lt;/system.serviceModel&gt; </code></pre> <p><strong>SiteB (client):</strong></p> <pre><code>&lt;system.serviceModel&gt; &lt;client&gt; &lt;endpoint address="http://xxxxx/Services/xxService.svc" binding="wsHttpBinding" contract="IServiceContract" /&gt; &lt;/client&gt; &lt;/system.serviceModel&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload