I have a console application that calls a WCF service on a remote domain. The WCF service is uses Windows credential type for the transport and message credential types.
The WCF service is configured to negotiate for the user s credentials.
My question is how can I obtain the identity object that the WCF service uses on the client side?
For example, I am logged into my computer "LocalMachineGarry"
. I connect to my company s VPN with the "MyCompanyGarry"
domain name.
The WCF service is located on my company s domain. When I execute the WCF service from my computer, based on the negotiation, the WCF service uses the "MyCompanyGarry"
identity.
In the WCF service - Thread.CurrentPrincipal.Identity
- returns "MyCompanyGarry"
.
In the console app - Thread.CurrentPrincipal.Identity
- returns "LocalMachineGarry"
.
How can I get the VPN domain identity that is passed to the WCF service?