错误 500.19 - 基于 UNC 的 IIS 7.5 站点 - 文件权限问题
我正在尝试在我的 IIS 7.5(Win 7 Pro 计算机)中获取一个网站,以通过默认网站和底层应用程序之一的代码的 UNC 路径运行。这是我第一次尝试在 IIS 7.5 中基于 UNC 路径设置站点/应用程序:同一域中另一台服务器上的文件夹。
我尝试了各种方法来解决这个问题。应用程序池在我设置此站点的 Win 7 Pro PC 上的 ApplicationPoolIdentity
下运行。
尝试通过 http://localhost/TheAppName 在浏览器中运行应用程序时出现的运行时错误是:
模块: IIS Web 核心
通知:未知
处理程序:尚未确定
错误代码:0x800700005
配置错误:由于权限不足,无法读取配置文件
配置文件:\\?\UNC\theServerName\www\TheAppName
请求的 URL:http://localhost:80/TheAppName
物理路径:(此处未显示任何内容)
登录方式:尚未确定
登录用户:尚未确定
为了本文的隐私,我在上面的服务器和应用程序名称中使用了假名。
因此,读取该站点的 UNC 路径中的 web.config 时遇到问题。
我尝试在目标服务器上添加本地用户,然后将该用户授予 web.config 权限,然后使用该用户 RemoteServerName\LocalUserICreated
作为我的计算机上的应用程序池的身份,但它没有影响。
不知道在这里做什么以及如何去做。
I'm trying to get a website in my IIS 7.5 (Win 7 Pro machine) to run via a UNC path to the code for one of the default website and an underlying App. This is the first time I've ever tried to set up a site/app in IIS 7.5 based off a UNC path: a folder on another server in the same domain.
I've tried various things to try to get this resolved. The app pool is running under ApplicationPoolIdentity
on my Win 7 Pro PC where I have this site set up.
The runtime error I get when trying to run the app in the browser via http://localhost/TheAppName is:
Module: IIS Web Core
Notification: Unknown
Handler: Not Yet Determined
Error Code:0x800700005
Config Error: Cannot read configuration file due to insufficient permissions
Config File:\\?\UNC\theServerName\www\TheAppName
Requested URL:http://localhost:80/TheAppName
Physical Path: (nothing showing up here)
Logon Method: Not yet determined
Logon User: Not yet determined
I put in fake names for the server and app name above for privacy for this post.
So it's having trouble reading the web.config found in that UNC path for this site.
I tried to add a local user on the target server and then then gave that user permissions to the web.config and then used that user RemoteServerName\LocalUserICreated
as the app pool's Identity on my machine but it had no effect.
No clue what to do here and how to go about it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我假设 UNC 路径是到不同的服务器?
如果是的话,两台服务器是否在同一个域中?如果是这样,那么 IIS 需要在有权读取文件的用户帐户下运行网站。
如果不是,您需要在 Web 服务器和文件存储服务器上创建相同的用户帐户(相同的用户名、相同的密码),然后更改 IIS 以在该用户帐户下运行网站。
希望这有帮助/有效。
I assume the UNC path is to a different server?
If so are both servers in the same domain? If so then IIS needs to run the website under a user account that has permissions to read the files.
If not you need to create identical user accounts (same username, same password) on the web server and the file storage server and then change IIS to run the website under this user account.
Hope this helps/works.
当您从 UNC 路径创建 Web 应用程序或虚拟目录时,您需要向 IIS 提供连接凭据。
在“添加应用程序”对话框中,“物理路径”部分下方是“连接为...”按钮 - 然后您可以选择“应用程序用户(直通身份验证)”或“特定用户”。
无论您选择哪一个,它们都必须是远程服务器能够识别的凭据 - “传递”将尝试使用当前桌面(或浏览器)凭据来验证用户身份(如果您通过 VPN 连接)根据您的评论)几乎肯定是无效的。在这种情况下,您应该使用“特定用户”并提供(理想情况下)具有适当权限的域用户来运行该站点。
当我们过去需要这样做时,我们会在本地应用程序池将在其下运行的域上创建一个帐户,然后这也可以在这些情况下使用。
如果您已经创建了应用程序,则可以使用“基本设置...”操作链接访问该对话框。
When you create a web application or virtual directory from a UNC path, you need to provide the credentials to IIS for the connection.
In the Add Application dialog, below the Physical path section is the "Connect as..." button - you can then choose either "Application user (pass-through authentication)" or "Specific user".
Which ever you choose, they have to be credentials that will be recognised by the remote server - "Pass-through" will try and use the current desktop (or browser) credentials to authenticate the user which (if you're connecting via a VPN as per your comments) almost certainly won't be valid. In this case you should use "Specific user" and provide (ideally) a domain user with suitable permissions to run the site.
When we've needed to do this in the past, we'd create an account on the domain that the local AppPools would run under, and then this could be used in these situations as well.
If you've already created the application, the dialog can be reached using the "Basic Settings..." action link.
我花了几个小时终于为自己解决了同样的问题。结果我在物理路径中使用了错误的斜杠。应该是\这些,而不是//这些。
I took me a few hours to finally solve the same issue for myself. Turned out I used the wrong slashes in my physical path. It should be \ these, not // these.
扎夫和艾伦 两者都确定了 Microsoft 建议的解决方法。以下是有关您的问题的 Microsoft 页面中的其余信息:
Zhaph and Alan both identify the work-around suggested by Microsoft. Here's the rest of the information from Microsoft's page on your problem: