WCF service - access denied RRS feed

  • Question


    I am building a WCF service (Windows Communication Foundation) with Windows authentication and impersonation set to true.

    I have a client webapplication referencing the WCF service. The client webapplication also uses Windows authentication and impersonation set to true.


    When my client webapplication is calling the service I get an access denied exception. I have tried to set the credentials when I call the service but I havent succeeded. If I allow 'Anonymous' access in the IIS it works but I guess I miss the point in using Windows authentication.


    If I do this using a webservice I do the following and it works:
    myService.Credentials = System.Net.CredentialCache.DefaultCredentials;


    How can I do the same when I call a WCF service?
    Do I have to change the default settings for the '<system.serviceModel>' section in the web.config for the WCF service or for the calling webapplication?


    Regards Hans

    Thursday, February 28, 2008 11:29 AM

All replies