I am trying to access a wcf client. I know people are getting information out of it right now, so I know it works. My problem is I can't seem to get past it. The service is a mutual certific service. I have the appropriate certs in my personal stores on my local machine. Even with that, I get the following exception:
A call to SSPI failed, see inner exception
Searching deep into the exception and I see this:
Message : The target principal name is incorrect
How can I resolve this? Do I need to impersonate the user the app pool is running under? Do I need to add an Identity\ServicePrincipleName or Identity\UserPrincipleName? Has anyone run into an issue similar to this?
See my answer to a similar problem here: netTCP binding Soap Security Negotiation Failed. This guidance should apply to other bindings, not just TCP.
For future reference for others, I experienced this issue but the existing answers didn't help.
My issue was with the userPrincipalName
being used for a service reference.
I had recently re-registered the service reference in order update it but it had overwritten the specified userPrincipalName
in the log files with my email address:
<endpoint address="net.pipe://localhost/XXXX"
binding="netNamedPipeBinding" bindingConfiguration="NetNamedPipeBinding_IXXX"
contract="XXXServiceReference.IXXX"
name="NetNamedPipeBinding_IXXXX">
<identity>
<userPrincipalName value="[email protected]" />
</identity>
</endpoint>
To rectify the issue, I simply changed the userPrincipalName
to localhost
, which it what it was previously:
<userPrincipalName value="localhost" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With