.NET/IIS - Delegation issue RRS feed

  • Question

  • We have the following architecture:

    A Web Application (ASP.NET MVC using Windows Authentication) that consumes WCF Services hosted on IIS who connects to a File Server.

    The application was designed under distributed systems architecture but, to simplify the configuration, we have installed the Web Application and WCF Services under the same site on the same machine.

    The requirement is: The Web Application should Impersonate the authenticated domain user to access network resources on the file server. 

    After configuring and adapting the Web Application and the WCF Services to deal with impersonation, we have made the following tests:

     - We've rried to access the local resources using Impersonation and it works perfectly. 
     - But when we tried to acess network resources using Impersonation the application throws DirectoryNotFound Exception. We've tried to access the same resources using Windows Explorer with the same credentials and it works.

    After that, we have confirmed that application handles impersonation perfectly, but with delegation not.

    Is there an issue between ASP.NET MVC, Code Impersonation and Delegation?

    Is there an issue between WCF and Delegation (Distributed Architecture)?

    According to the documentation under the section "Impersonate the Authenticating User in Code" it should work: https://support.microsoft.com/en-us/kb/306158

    Environment information:

    OS - Windows Server 2008 R2 64 bits

    IIS Version - 7.5

    Framework Version - 4.0

    Application Pool Identity - Local Machine Administrator

    Active Directory - Windows Server 2012

    Wednesday, October 21, 2015 7:45 PM