我正在尝试部署一个ASP。网络应用程序。我已经将网站部署到IIS,但当用浏览器访问它时,它显示给我这个:
服务器错误 500 -内部服务器错误。 您正在查找的资源有问题,无法显示。
在摆弄了网页之后。配置,我得到:
由于内部服务器错误,页面无法显示。
我如何才能看到这个服务器错误背后的实际问题?
我正在尝试部署一个ASP。网络应用程序。我已经将网站部署到IIS,但当用浏览器访问它时,它显示给我这个:
服务器错误 500 -内部服务器错误。 您正在查找的资源有问题,无法显示。
在摆弄了网页之后。配置,我得到:
由于内部服务器错误,页面无法显示。
我如何才能看到这个服务器错误背后的实际问题?
当前回答
尝试在Debug模式下编译(在Visual Studio中)。如果您处于发布模式,许多URL重写错误将不可用。
图为Visual Studio中的调试选择组合框
其他回答
除了其他建议之外,请确保将httpErrors节点的现有response属性从Replace更改为Auto,或者完全删除该属性。
<httpErrors existingResponse="Replace" />
^^^^^^^ not going to work with this here
Before changing the web.config file, I would check that the .NET Framework version that you are using is exactly (I mean it, 4.5 != 4.5.2) the same compared to your GoDaddy settings (ASP.Net settings in your Plesk panel). That should automatically change your web.config file to the correct framework. Also notice that for now (January '16), GoDaddy works with ASP.Net 3.5 and 4.5.2. To use 4.5.2 with Visual Studio it has to be 2012 or newer, and if not 2015, you must download and install the .NET Framework 4.5.2 Developer Package. If still not working, then yes, your next step should be enabling detailed error reporting so you can debug it.
如果在物理主目录上没有足够的权限(即IIS_IUSRS没有访问权限),IIS也会报告状态码500而没有任何事件日志提示。
如果您正在使用IIS 8.5,可能需要将ApplicationPool ID设置从ApplicationPoolId更改为NetworkService
右键单击有问题的应用程序池,单击“高级设置”,然后向下滚动到ID——它可能会被设置为ApplicationPoolIdentity。单击按钮(..)并从下拉列表中选择NetworkService。
此外,如果是. net 2.0应用程序,请确保在应用程序池中没有引用4.0框架。
500内部服务器错误可能由以下几个原因引起。第一个原因可能是网络。配置文件没有正确创建,这意味着您在web中错过了一些标签。配置文件。其次,这个错误可能是由于一些代码问题。要检查web应用程序的哪个组件导致此错误,您可以检查web中的应用程序设置。配置文件。解决和跟踪500个服务器内部错误的详细图如下: