2

I just finished building a site that monitors a folder in network shared folder. While in development machine, I didn't have any issue finding the folder. The folder is listed as string location = @"\\dir\subdir\subdir\subdir"; I also added SYSTEM, DefaultAppPool, NETWORK SERVICE, IIS_IUSRS, and all the users in AD group. I do have windows authorization setup for the application authorized by AD group. The impersonation is set to false. Why does it keep telling me that the directory is invalid? Any thing that I should try?

user1828605
  • 1,723
  • 1
  • 24
  • 63
  • 1
    The following post may seem slightly off-topic, but please read it carefully, because there is a suggested work-around which is trivial to try: http://stackoverflow.com/questions/3925689/asp-net-debug-directory-monitoring-exception and it may solve your problem. – David Tansey Dec 23 '15 at 20:33
  • That wasn't the issue. It had to do with the AD user for application pool identity. See answer by @kamilk – user1828605 Dec 23 '15 at 21:31

1 Answers1

2

I guess the application pool is running under a local account, which is the default. You might have added permissions for IIS_IUSRS to the share but this will be the local IIS_IUSRS group of the host where the shared folder is located, it will not know about the IIS_IUSRS group of your IIS server. The solution would be to change the application pool identity to an Active Directory user.

kamilk
  • 3,829
  • 1
  • 27
  • 40
  • That is exactly what it was. I didn't know it could've caused this issue. Thank you so much. Learned a very important thing today. – user1828605 Dec 23 '15 at 21:30