错误500如果更改框架版本3.5和错误503如果框架4.7使用plesk托管godaddy

时间:2017-07-21 06:45:13

标签: asp.net frameworks plesk internal-server-error

我在使用plesk godaddy托管帐户访问default.aspx网站时遇到问题。

如果我将我的asp.net设置框架更改为3.5错误503显示。 如果我将我的asp.net设置框架更改为4.7错误500显示。

我已经尝试编辑web.config文件以查看错误500的原因是什么,但除了此值“500 - 内部服务器错误”之外没有显示任何内容。有点失去了,因为试图谷歌这个问题的答案,但似乎没有工作。

以下是我的web.config以供参考。我对哪个部分导致问题一无所知。

<?xml version="1.0" encoding="utf-8"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  https://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>
	
	<system.webServer> 
		<httpErrors errorMode="Detailed"/>
	</system.webServer> 
	
	<system.webServer>
		<asp scriptErrorSentToBrowser="true"/>
    <compilation targetFramework="4.5.2" defaultLanguage="c#" />
    <httpRuntime targetFramework="4.5.2" />
	
    <pages>
      <namespaces>
        <add namespace="System.Web.Optimization" />
      </namespaces>
      <controls>
        <add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt" />
      </controls>
    </pages>
    <httpModules>
      <add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" />
    </httpModules>
    <trust level="Full" />
  </system.webServer>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" />
        <bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="WebGrease" culture="neutral" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <modules>
      <remove name="ApplicationInsightsWebTracking" />
      <add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" preCondition="managedHandler" />
    </modules>
  </system.webServer>
  <system.codedom>
    
  </system.codedom>
  <connectionStrings>
    <add name="eSPADA_dbConnectionString" connectionString="Data Source=182.50.133.111;Integrated Security=False;User ID=something.mdf;Password=something" providerName="System.Data.SqlClient" />
  </connectionStrings>
		
  </configuration>
<!--ProjectGuid: A8FF6ED8-3AE9-4CCF-9985-790E124D5E4F-->

1 个答案:

答案 0 :(得分:0)

问题已解决。

我删除了这行代码,之后工作正常。

&#13;
&#13;
<system.webServer>
		<asp scriptErrorSentToBrowser="true"/>
    <compilation targetFramework="4.5.2" defaultLanguage="c#" />
    <httpRuntime targetFramework="4.5.2" />
&#13;
&#13;
&#13;