3

When I am running a WCF service on my development machine it works as long as the client is connected to the domain.

When the machine is disconnected I get the following exception:

System.ServiceModel.Security.SecurityNegotiationException: A call to SSPI failed, see inner exception. System.Security.Authentication.AuthenticationException: A call to SSPI failed, see inner exception. ---> System.ComponentModel.Win32Exception: The system detected a possible attempt to compromise security. Please ensure that you can contact the server that authenticated you

The service uses security internally (<transport clientCredentialType="Windows" protectionLevel="None"/>) so I can't easily turn it off.

Is there a way to work around this problem so I can test the service when I am not connected?

3 Answers 3

3

Probably won't work when not connected to the domain.

The default WCF security for several bindings is "Windows", e.g. your current user credentials are being passed to the WCF service and the service then attempts to validate those user credentials against the Windows domain.

If you're not connected, that verification can't happen, so the WCF service will refuse the call. Works as designed, I'd say :-)

Maybe you could expose a second endpoint for your service ("local dev testing") that doesn't require Windows authentication? When off the domain, just connect to that non-secured endpoint so that you can at least test the service and its inner workings.

1
  • Thanks for your answer even though I was hoping for a simple workaround :)
    – laktak
    Mar 8, 2010 at 15:24
3

The workaround for this involves removing the UserPrincipal from the Client Application (in the app.config)

<identity>
    <userPrincipalName value="SOME-DOMAIN\SomeUser" />
</identity>
0

try to remove identity element for local dev testing when you are not connected to the domain

reference -

http://blogs.msdn.com/b/jpsanders/archive/2010/10/14/wcf-client-inner-exception-quot-the-security-support-provider-interface-sspi-negotiation-failed-quot.aspx

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.