I am having issues trying to access network shares using C# and ASP.NET web based application. I use LDAP Active Directory to perform the login and I have a method that reads files from a specified directory and performs file moves. The directory is shared to specific users and I am unable to access them unless they are shared to the "Everyone" group (which is not how we want to set the security). I would like to access the directories using the username on my AD login somehow. Is this possible? I have been looking into the Directory Security class but no luck so far. Thanks.
2 Answers
There's two ways to solve this grant the User the app pool rums under access to the share or impersonate the AD user when you need to access the share
1 Comment
George
I implemented impersonization and that allowed me to use specific share settings instead of "everyone", however, it lead to other issues such as access violations. It would not allow me to access certain directories so I'm looking for another solution.