[英]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";
该文件夹被列为
string location = @"\\\\dir\\subdir\\subdir\\subdir";
I also added SYSTEM
, DefaultAppPool
, NETWORK SERVICE
, IIS_IUSRS
, and all the users in AD group.我还添加了
SYSTEM
、 DefaultAppPool
、 NETWORK SERVICE
、 IIS_IUSRS
以及 AD 组中的所有用户。 I do have windows authorization setup for the application authorized by AD group.我确实为 AD 组授权的应用程序设置了 Windows 授权。 The impersonation is set to false.
模拟设置为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.您可能已将
IIS_IUSRS
权限添加到共享,但这将是共享文件夹所在主机的本地IIS_IUSRS
组,它不会知道您的 IIS 服务器的IIS_IUSRS
组。 The solution would be to change the application pool identity to an Active Directory user.解决方案是将应用程序池标识更改为 Active Directory 用户。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.