locked
Impersonating client when calling WCF Service RRS feed

  • Question

  • I want to call a WCF service method hosted in IIS using different set of credentials. I did something like below:

    Proxy.ClientCredentials.Windows.ClientCredential.UserName = "UserA";
    Proxy.ClientCredentials.Windows.ClientCredential.Password = "Pass"
    Proxy.ClientCredentials.Windows.ClientCredential.Domain = "**DomainA**"
    Proxy.MethodA();

    My question is does impersonation happen on client machine and then call is made to the Web service, or does the impersonation happen on the machine hosting IIS ?

    I want to know this because my client machine and machine hosting IIS are on different domains.


    Thursday, December 6, 2012 5:02 AM

Answers

  • Impersonation allows service to act as a client while performing any operation. Your caller credentials will be validated and verified against the operation you are calling from client side. If you have different domains, then your user should have permissions to access the resource on Server side. You have to specify the same user that has permissions on server.

    Ovais Mehboob

    • Marked as answer by LeoTang Friday, December 14, 2012 2:14 AM
    Thursday, December 6, 2012 5:23 AM