Impersonation in WCF

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gerom
    New Member
    • Jan 2010
    • 4

    Impersonation in WCF

    I need to pass specific user credentials to a .svc so it can be used to open a server.

    The code in my .svc is as follows

    Code:
    [OperationBehavior(Impersonation = ImpersonationOption.Required)]
           public string OpenServer()
            {
    RFCOMAPILib.FaxServer objFaxServer;
                    NameValueCollection appSettings =   ConfigurationManager.AppSettings;
                    sFAXServerName = appSettings["FAXServer"];
    
    objFaxServer.OpenServer();
            }
    When I run it from the client I get access denied. How can I pass a specific user name and password from the client to the .svc to be used to open the server connection?

    Thanks

    Gerom
    Last edited by Frinavale; Mar 16 '10, 08:01 PM. Reason: Please post code in [code] ... [/code] tags. Added code tags.
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    Have you seen this Microsoft MSDN article on Delegation and impersonation with WCF?
    Or this article on How to:Impersonate a Client on a Service?

    -Frinny

    Comment

    Working...