Last post Jun 25, 2008 10:53 AM by mont
Jun 19, 2008 01:26 PM|mont|LINK
Jun 20, 2008 12:55 AM|My Crystal|LINK
what authentication type do you use? Windows or Forms?
Both the file and its parent directory are accessible by only a single account (ASPNET does not have access).
what account is this "single account"?
I really want to be able to perform an impersonation somewhere (via LogonUser) to set the identity.
i don't understand why you really want to perform an impersonation to achieve what you want. If the purpose of your impersonation is just impersonate the "single account" that has right to read the target file, that is ok, that will make the windows account
under which your code is running (WindowsIdentity.Current.Name) has the right to read the target file, but this is not enought, you have to make sure the authenticated user (HttpContex.Current.User.Identity.Name) also has the right to read the target file.
Jun 20, 2008 04:06 AM|mont|LINK
Jun 25, 2008 03:09 AM|Zhao Ji Ma - MSFT|LINK
Setting NTFS permissions requires calling Windows API. To interop function of system API, please see:
Jun 25, 2008 10:53 AM|mont|LINK