SecurityNegotiationException on a disconnected domain client

When I start the WCF service on my development machine, it works as long as the client is connected to the domain.

When the device is disconnected, I get the following exception:

System.ServiceModel.Security.SecurityNegotiationException: SSPI call failed, see internal exception. System.Security.Authentication.AuthenticationException: SSPI call failed, see Internal Exception. ---> System.ComponentModel.Win32Exception: the system detected a possible attempt to compromise security. Verify that you can contact the authenticated server.

The service uses internal protection ( <transport clientCredentialType="Windows" protectionLevel="None"/>), so I can’t easily disable it.

Is there a way around this problem so that I can check the service when I am not connected?

+3
source share
3 answers

Probably will not work if it is not connected to the domain.

The standard WCF protection for multiple bindings is “Windows,” for example. your current user credentials are passed to the WCF service, and then the service tries to verify these user credentials in the Windows domain.

If you are not connected, this check is not possible, so the WCF service will refuse the call. It works as I thought :-)

, ( " " ), Windows? , , .

+3

UserPrincipal ( app.config)

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

Source: https://habr.com/ru/post/1735378/


All Articles