![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest
Posts: n/a
| WCF security: the request for security token could not be satisfied Hi I 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 another host, I get a security exception: The request for security token could not be satisfied because authentication failed I am guessing there is some configuration here which is incorrect, and I have two questions to start with: How do I completely disable security in my WCF service (so anyone can call)? How do I enable security and send the correct authentication? Thanks, Peter |
|
|
| |
| | #2 (permalink) | ||||||||||||
| Guest
Posts: n/a
| Re: WCF security: the request for security token could not be satisfied Peter wrote:
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> | ||||||||||||
| |||||||||||||
| | #3 (permalink) |
| Guest
Posts: n/a
| Re: WCF security: the request for security token could not besatisfied Hi Peter, Based on your client config, it looks like the client is still expecting the identity of the endpoint to match the userPrincipalName : "localhost\ASPNET". If you've shifted to a different machine, this is probably going to cause the error you're seeing. Priya |
|
| |
| |