Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Store Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems.

Go Back   Vista Forums > Vista technology newsgroups > Indigo

WCF security: the request for security token could not be satisfied

Reply
 
Thread Tools Display Modes
Old 05-06-2008   #1 (permalink)
Peter
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

  Reply With Quote

Old 05-29-2008   #2 (permalink)
Peter
Guest
 
Posts: n/a

Re: WCF security: the request for security token could not be satisfied

Peter wrote:
Quote:

> 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?

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>




  Reply With Quote
Old 05-30-2008   #3 (permalink)
Priya
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
  Reply With Quote
 
Reply

Thread Tools
Display Modes









Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48