我正在尝试部署一个ASP。网络应用程序。我已经将网站部署到IIS,但当用浏览器访问它时,它显示给我这个:
服务器错误 500 -内部服务器错误。 您正在查找的资源有问题,无法显示。
在摆弄了网页之后。配置,我得到:
由于内部服务器错误,页面无法显示。
我如何才能看到这个服务器错误背后的实际问题?
我正在尝试部署一个ASP。网络应用程序。我已经将网站部署到IIS,但当用浏览器访问它时,它显示给我这个:
服务器错误 500 -内部服务器错误。 您正在查找的资源有问题,无法显示。
在摆弄了网页之后。配置,我得到:
由于内部服务器错误,页面无法显示。
我如何才能看到这个服务器错误背后的实际问题?
当前回答
就我而言,我把一个错误放在我的网。配置文件。应用程序键以某种方式放在<appSettings>标记下。但是我想知道为什么它没有显示配置错误。错误500对于调查这个问题来说太一般了。
其他回答
我终于解决了这个“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。
它起作用了,我的问题终于解决了。
服务器错误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内部错误 Windows主机错误 Godaddy托管问题
我一直面临着同样的问题,但现在我的问题已经解决了。总是在这个主机上使用,它是有效的。
我也会建议大家做任何你想要在你的网站上做的改变。配置文件。请逐个执行,并在活动域中进行相同的测试,以便您可以找到确切的问题或托管提供商不允许您使用的功能。
<?xml version="1.0"?>
<configuration>
<system.web>
<trust level="Medium"/>
<compilation debug="true" targetFramework="4.5">
<assemblies>
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
</compilation>
<httpRuntime targetFramework="4.5" />
<sessionState mode="InProc" cookieless="false" timeout="90" />
<authentication mode="Forms">
<forms loginUrl="default.aspx"
defaultUrl="default.aspx"
protection="All"
cookieless="UseCookies"
slidingExpiration="false"
timeout="30"
name="aeon.corpusjuris.in" />
</authentication>
<customErrors
mode="Off"
defaultRedirect="errorpage.aspx">
<error statusCode="403" redirect="errorpage.aspx"/>
<error statusCode="404" redirect="errorpage.aspx"/>
</customErrors>
<!-- <httpModules>
<add name="HTTPCaching" type="HTTPCaching"/>
</httpModules>
-->
</system.web>
<runtime>
<performanceScenario value="HighDensityWebHosting" />
</runtime>
<system.webServer>
<!-- <modules runAllManagedModulesForAllRequests="true">
<add name="HTTPCaching" type="HTTPCaching"/>
</modules>
-->
<defaultDocument>
<files>
<clear />
<add value="default.aspx" />
</files>
</defaultDocument>
<httpErrors errorMode="Detailed" />
<asp scriptErrorSentToBrowser="true"/>
<staticContent>
<clientCache cacheControlCustom="public"
cacheControlMaxAge="60:00:00"
cacheControlMode="UseMaxAge" />
</staticContent>
</system.webServer>
<system.web.extensions>
<scripting>
<webServices>
<jsonSerialization maxJsonLength="90000000">
</jsonSerialization>
</webServices>
</scripting>
</system.web.extensions>
</configuration>
就我而言,我把一个错误放在我的网。配置文件。应用程序键以某种方式放在<appSettings>标记下。但是我想知道为什么它没有显示配置错误。错误500对于调查这个问题来说太一般了。
我第一次尝试发布并运行一个只提供HTML的非常简单的网站,结果是“页面无法显示,因为发生了内部服务器错误”。
问题:我在Visual Studio中将网站设置为。net 3.5(右键单击网站项目->属性页-> Build),但在Azure中将网站配置为。net 4.0。哦!我在Azure中将其更改为3.5,并且它可以工作。