Author: swiftarrow01 | Posted on: 4/6/2009 7:20:13 AM | Views : 497

Hi,
I am working on an Intranet site.The site is running with the following configuration
Windows 2003 Server, IIS 6The users of the site come from 3 different domains (say Domain A, B, C).
We have Integrated Windows Authentication turned on. App pool identity - Network Service
Impersonation is turned Off in web.config.
We try to impersonate the original caller programatically for one functionality where we try to access contents of a folder on shared drive by giving a UNC path. System.Security.Principal.WindowsImpersonationContext impersonationContext;
impersonationContext = ((System.Security.Principal.WindowsIdentity)Context.User.Identity).Impersonate();

.
.
.
DirectoryInfo rootDir = new DirectoryInfo(path);
DirectoryInfo[] dirContents = rootDir.GetDirectories();

Go to the complete details ...