简体   繁体   中英

Asp.NET shows "The Directory is invalid" when published to IIS server

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM