简体   繁体   English

Asp.NET 发布到 IIS 服务器时显示“目录无效”

[英]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.我还添加了SYSTEMDefaultAppPoolNETWORK SERVICEIIS_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.

相关问题 发布到IIS 7.5时ASP.NET Core 404错误 - ASP.NET Core 404 Error When Published to IIS 7.5 asp.net mvc服务器显示目录但不显示 - asp.net mvc server shows directory but not view ASP.NET在发布到IIS后失去与SQL Server Express的连接 - ASP.NET losing connection to SQL Server Express after being published to IIS 发布到IIS时,ASP.NET MVC WebApi应用程序上的程序集绑定错误 - Assembly binding error on ASP.NET MVC WebApi application when published to IIS 仅当在 IIS 中发布时,在 ASP.net Core 3.1 WebAPI 中启用 CORS 时出错 - Error on Enable CORS in ASP.net Core 3.1 WebAPI in only when published in IIS 当我使用捆绑优化在IIS上发布我的ASP.NET MVC应用程序时,为什么SignalR无法正确加载? - Why SignalR is not loaded properly when my ASP.NET MVC application is published on IIS using bundle optimization? IIS 7.5 只显示目录列表或 403 而不是 ASP.NET 应用程序 - IIS 7.5 only shows directory list or 403 instead of ASP.NET Application 在IIS Web服务器中发布时的ASP.NET SqlException - ASP.NET SqlException when publishing in IIS Web Server IIS和ASP.NET:虚拟目录/应用程序 - IIS and ASP.NET: Virtual directory / application 针对Active Directory的表单身份验证在IIS Express上有效,但在部署到IIS asp.net时出错 - Form authentication against active directory works on IIS Express but errors when deployed to IIS asp.net
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM