.net IIS 7.0 错误 - 500.19 内部服务器错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2054582/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-03 13:47:41  来源:igfitidea点击:

IIS 7.0 Error - 500.19 Internal Server Error

.netasp.net-mvciisiis-7hosting

提问by chobo2

I am currently on a shared hosting plan with iis 7.0

我目前正在使用 iis 7.0 共享主机计划

I have an asp.net mvc application in the wwwroot of my hosting. Now I made a virtual directory to store my webservice in(I don't want to have to host this on a sub domain and pay extra)

我的主机的 wwwroot 中有一个 asp.net mvc 应用程序。现在我创建了一个虚拟目录来存储我的网络服务(我不想在子域上托管它并支付额外费用)

However when I put my web service code in my virtual directory and try to run it I get this

但是,当我将 Web 服务代码放在我的虚拟目录中并尝试运行它时,我得到了这个

Error Summary
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
Detailed Error Information
Module  IIS Web Core
Notification    BeginRequest
Handler Not yet determined
Error Code  0x80070005
Config Error    Cannot read configuration file due to insufficient permissions
Config File \?\C:\HostingSpaces\int\Site.com\wwwroot\web.config
Requested URL   http://www.Site.com:80/VirtualDirectory/Webservice.asmx
Physical Path   C:\HostingSpaces\int\Site.com\wwwroot\VirutalDirectory\Webservice.asmx
Logon Method    Not yet determined
Logon User  Not yet determined
Config Source

   -1: 
    0: 

I don't know what the probelm is nor how to fix it.

我不知道问题是什么,也不知道如何解决。

回答by sky100

You should check the permission of the user account of the apppool. Or you can check the security property of the folder(C:\HostingSpaces\int\Site.com\wwwroot). Ensure the account of the apppool of IIS can read the folder at least.

您应该检查应用程序池的用户帐户的权限。或者您可以检查文件夹的安全属性(C:\HostingSpaces\int\Site.com\wwwroot)。确保 IIS 的 apppool 帐户至少可以读取该文件夹。

回答by Daniel Little

This can also be due to IIS needing an extra plugin like the URL rewrite module rule

这也可能是由于 IIS 需要一个额外的插件,如 URL rewrite module rule

回答by user244255

You have your permissions set incorrectly. From within DotNetPanel go to the file manager and set the permissions for the virtual directory by clicking the "Lock" icon.

您的权限设置不正确。从 DotNetPanel 中转到文件管理器并通过单击“锁定”图标设置虚拟目录的权限。

回答by Igor Zevaka

Cannot read configuration file due to insufficient permissions

权限不足无法读取配置文件

This sounds like the file is unreadable by the user that runs the web server. I am not sure what kind of tools Windows hosting serivce provides, but you will need to set permissions on that enitre directory to be readable by the web server user.

这听起来像是运行 Web 服务器的用户无法读取该文件。我不确定 Windows 托管服务提供了什么样的工具,但是您需要在该目录上设置权限才能被 Web 服务器用户读取。

回答by Narayanan Nagarajan

Add the IIS_IUSRUser for the folder and give the Read and Execute access. I was facing the same problem and after giving the permissions I was able to access the Website without any issues

添加IIS_IUSR文件夹的用户并授予读取和执行访问权限。我遇到了同样的问题,在授予权限后,我可以毫无问题地访问该网站