Post by PeterI have a WCF service and a client. When I install the WCF service on
"localhost" I can easily call it. When I install the WCF service on
The request for security token could not be satisfied because
authentication failed
I am guessing there is some configuration here which is incorrect, and
How do I completely disable security in my WCF service (so anyone can
call)?
How do I enable security and send the correct authentication?
I found out how to disable security at least. In my web.config for my
client (which is a web-app) I have something like:
<system.serviceModel>
<client>
<endpoint name="Front01"
address="http://192.168.1.1/MyService.svc"
binding="wsHttpBinding"
bindingConfiguration="WSHttpBinding_IMyService"
contract="Contracts.IMyService">
<identity>
<userPrincipalName value="localhost\ASPNET" />
</identity>
</endpoint>
</client>
<bindings>
<wsHttpBinding>
<binding name="WSHttpBinding_IMyService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00"
sendTimeout="00:01:00"
bypassProxyOnLocal="false" transactionFlow="false"
hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8"
useDefaultWebProxy="true"
allowCookies="false">
<readerQuotas maxDepth="32" maxStringContentLength="8192"
maxArrayLength="16384"
maxBytesPerRead="4096"
maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00"
enabled="false" />
<security mode="None">
<transport clientCredentialType="Windows"
proxyCredentialType="None"
realm="" />
<message clientCredentialType="Windows"
negotiateServiceCredential="true"
algorithmSuite="Default"
establishSecurityContext="true" />
</security>
</binding>
</wsHttpBinding>
</bindings>
</system.serviceModel>
And in the web.config for my service, I have:
<system.serviceModel>
<services>
<service name="Service.MyService"
behaviorConfiguration="Service.MyServiceBehavior">
<endpoint address = ""
binding="wsHttpBinding"
bindingConfiguration="NoSecurityBinding"
contract="Contracts.IMyService">
</endpoint>
<endpoint address="mex"
binding="mexHttpBinding"
contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="Service.MyServiceBehavior">
<serviceMetadata httpGetEnabled="True"/>
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<wsHttpBinding>
<binding name="NoSecurityBinding">
<security mode="None">
<transport clientCredentialType="None"/>
<message establishSecurityContext="false"/>
</security>
</binding>
</wsHttpBinding>
</bindings>
</system.serviceModel>