Ask a Question related to ASP.NET Security, Design and Development.
-
Brian Watkins #1
Directory FileSystemInfo file and folder permissions
I am trying to loop through a directory and place all the folders and files
into an array. I want to store only the folders and files that the current
user has access to into the array. Below is some sample code of what I'm
doing:
Public Sub ProcessDirectory(byval strPath as string)
Dim strRootFolder As String = Server.MapPath(strPath)
Dim dir As New DirectoryInfo(strRootFolder)
Dim fsi As FileSystemInfo
For Each fsi In dir.GetFileSystemInfos()
Try
If TypeOf fsi Is FileInfo Then 'its a file
PutFileintoArray(fsi)
Else 'its a directory
Dim d As DirectoryInfo = CType( fsi, DirectoryInfo )
PutDirectoryintoArray(d.name)
ProcessDirectory(strpath & d.name & "/")
End If
Catch
End Try
Next fsi
End Sub
When the above code runs it stores all the folders and files nicely into the
array but it is not using the permissions of the client user. It only adds
the folders and files that everyone has access to. I need to run the above
code with the client users windows permissions.
In IIS Directory Security, the Anonymous access is unchecked and Integrated
Windows Authentication is checked.
In the Web.config authentication mode="Windows".
Does anyone know what I'm doing wrong here?
Brian Watkins Guest
-
folder permissions
We have a repository of reports(Crystal). It is many folders and subfolders.We have set permissions to these folders based on who needs access to... -
sub-folder admin permissions?
Hi everyone, I created a site for a local non-profit with multiple offices. The exec director wants each office to have their own page, and to... -
Listing Permissions on a Folder
Hi All. I was wondering if there is anything out there which would allow me to list permissions on a selected folder of my web site. This would be... -
Help with setting folder permissions
I'm running XP Home Edition on a Dell Dimension 8100, Pentium 4, 80 gig HD, 256 RAM (although none of that info will probably be needed to answer... -
Setting Folder Permissions
Hi, I am sooo lost with a problem I have. I bought a new digital camera and when I tried to install the software it got an error message "unable to... -
Brian Watkins #2
Re: Directory FileSystemInfo file and folder permissions
I found that I needed to set
<identity impersonate="true" >
in the Web.config file. Works like a charm now.
Brian Watkins Guest



Reply With Quote

