我正在尝试部署一个ASP。网络应用程序。我已经将网站部署到IIS,但当用浏览器访问它时,它显示给我这个:
服务器错误 500 -内部服务器错误。 您正在查找的资源有问题,无法显示。
在摆弄了网页之后。配置,我得到:
由于内部服务器错误,页面无法显示。
我如何才能看到这个服务器错误背后的实际问题?
我正在尝试部署一个ASP。网络应用程序。我已经将网站部署到IIS,但当用浏览器访问它时,它显示给我这个:
服务器错误 500 -内部服务器错误。 您正在查找的资源有问题,无法显示。
在摆弄了网页之后。配置,我得到:
由于内部服务器错误,页面无法显示。
我如何才能看到这个服务器错误背后的实际问题?
当前回答
服务器错误500 -内部服务器错误。 您正在查找的资源有问题,无法显示。Goddady。主机-网络-经济- Windows Plesk
在我的例子中,我替换了以下代码:
<configuration>
<system.webServer>
<httpErrors errorMode="Detailed" />
<asp scriptErrorSentToBrowser="true"/>
</system.webServer>
<system.web>
<customErrors mode="Off"/>
<compilation debug="true" targetFramework="4.0"/>
</system.web>
</configuration>
然后将框架3.5更改为框架4。它显示了我的详细错误。我删除代码在:
<httpModules></httpModules>
它解决了我的问题。
其他回答
我终于解决了这个“500内部服务器”错误时,部署ASP。NET MVC 3.0应用程序在godaddy上。Ocm共享托管。
不知何故,在引用的DLL文件版本和web.config文件中提到的版本上存在差异。
我尝试了各种论坛上提到的所有选项。没有任何帮助,尽管每个人都提出了相同的解决方案,但不知为何它在我的场景中不起作用。终于在撞了头两天之后。 我决定删除所有DLL文件引用和删除web。然后让应用程序抛出错误,然后逐个添加DLL文件,将其复制到local=true。
在添加了所有DLL文件之后,我创建了一个新的ASP。NET MVC应用程序,并复制了web。新应用程序的配置到我的实际应用程序。 我的实际应用程序现在有了一个新的网页。然后我从web的本地副本中复制了connectionstring和其他引用。我保存的配置。
我只是编译了应用程序并将其发布到本地文件夹 并将发布的文件夹FTP到goDaddy。
它起作用了,我的问题终于解决了。
我在这个问题上非常紧张。确保下面的条目在根网络中。配置文件为我修复了它:
<configuration>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
</system.webServer>
</configuration>
请记住,如果已有XML元素,则必须将其添加到现有的XML元素中。不能只在文件末尾添加,因为任何元素都不能有多个副本。
对于iis10,除了更改customErrors=Off来显示错误内容外,还有一个额外的步骤要做。
<system.web>
<customErrors mode="Off" />
</system.web>
<system.webServer>
<httpErrors existingResponse="PassThrough" errorMode="Detailed"/>
</system.webServer>
Raul在这个链接中回答了这个问题:关闭IIS8自定义错误
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.
对我来说,下面的代码在网上。Config是罪魁祸首。当我删除它时,网站运行正常。
<staticContent>
<mimeMap fileExtension=".mp4" mimeType="video/mp4" />
</staticContent>