Hi everyone I am having some trouble running a ASP.NET using impersonation by code. In general terms, the web site loads a process to execute operations against an odbc database. Looking at the task manager I can see that the user running such process is the ASPNET account, not the impersonated user. However, by debugging the code, the CurrentPrincipal and current Thread's user are the account I used to impersonate.
So, why is ASPNET running the process if the impersonation has done? Shouldn't it be the impersonated user? This is giving me trouble since ASPNET does not have permission on certain files I need to use and also the operations against the odbc database fail.
I got the same result if I use impersonation in the virtual directory instead of programmatic impersonation. THis only happens when the web site is hosted in IIS. By running the web site directly from VS2005 everything works fine.
I'm using a WinXP SP2 with IIS 5.1 pc.
...
Go to the complete details ...