HTTP错误500.19。内部服务器错误。错误代码0x8007000d

时间:2015-03-13 14:47:08

标签: asp.net visual-studio-2012 web-config hosting

我收到此错误,当我将其上传到Godaddy上的共享主机时,我在其他提供商上尝试了相同但是同样的

  

HTTP错误500.19 - 内部服务器错误   无法访问请求的页面,因为页面的相关配置数据无效

     

错误代码0x8007000d

我点击查看更多信息 它把我带到微软的页面,然后说:

  

出现此问题的原因是ApplicaretionHost.config文件或Web.config文件包含格式错误的XML元素。

现在,我想知道问题出在哪里。 继承我的web.config文件:

<?xml version="1.0"?><!--
 For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
--><configuration>
<system.web>
    <customErrors mode="Off"/>
</system.web>
 <configSections>
   <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework"    type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection,   EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
</configSections>
<appSettings>
<add key="ChartImageHandler"   value="storage=file;timeout=20;dir=c:\TempImageFiles\;"/>
</appSettings>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<handlers>
  <remove name="ChartImageHandler"/>
  <add name="ChartImageHandler" preCondition="integratedMode"   verb="GET,HEAD,POST" path="ChartImg.axd"  type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
  <add name="CrystalImageHandler.aspx_GET" verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" preCondition="integratedMode"/></handlers>
  </system.webServer>
  <connectionStrings>
  <!--<add name="dbconnection" connectionString="Data Source=.\SQLEXPRESS;Database=FAHISDataEntrySoftware; Integrated Security=true" providerName="System.Data.SqlClient"/>-->
<add name="dbconnection" connectionString="Data Source=SQLOLEDB;Server=184.168.47.15;Database=fahisdataentrysoftwarenew;UID=fahisDE;PWD=abcd" providerName="System.Data.SqlClient"/>

  <!--<add name="DefaultConnection" providerName="System.Data.SqlClient" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=aspnet-FAHIS Data Entry Software in WEB-20150209102043;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnet-FAHIS Data Entry Software in WEB-20150209102043.mdf"/>-->
  </connectionStrings>
  <system.web>
   <httpHandlers>
  <add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
<add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>   </httpHandlers>
  <compilation debug="true" targetFramework="4.0">
    <assemblies>
    <add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    <add assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    <add assembly="CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    <add assembly="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    <add assembly="CrystalDecisions.ReportSource, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    <add assembly="CrystalDecisions.ReportAppServer.Controllers, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    <add assembly="CrystalDecisions.ReportAppServer.DataDefModel, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    <add assembly="CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
  <add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/></assemblies>
</compilation>
<httpRuntime/>
<pages controlRenderingCompatibilityVersion="4.0" clientIDMode="AutoID" smartNavigation="false" enableViewStateMac="false">
  <namespaces>
    <add namespace="System.Web.Optimization"/>
  </namespaces>
  <controls>
    <add tagPrefix="webopt" namespace="Microsoft.AspNet.Web.Optimization.WebForms" assembly="Microsoft.AspNet.Web.Optimization.WebForms"/>
    <add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting" assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
  </controls>
</pages>
<authentication mode="Forms">
  <forms loginUrl="~/Account/Login.aspx" timeout="2880"/>
</authentication>
<profile defaultProvider="DefaultProfileProvider">
  <providers>
    <add name="DefaultProfileProvider" type="System.Web.Providers.DefaultProfileProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" applicationName="/"/>
  </providers>
</profile>
<membership defaultProvider="DefaultMembershipProvider">
  <providers>
    <add name="DefaultMembershipProvider" type="System.Web.Providers.DefaultMembershipProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/"/>
  </providers>
</membership>
<roleManager defaultProvider="DefaultRoleProvider">
  <providers>
    <add name="DefaultRoleProvider" type="System.Web.Providers.DefaultRoleProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" applicationName="/"/>
  </providers>
</roleManager>
<sessionState mode="InProc" customProvider="DefaultSessionProvider">
  <providers>
    <add name="DefaultSessionProvider" type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection"/>
   </providers>
 </sessionState>
</system.web>
<entityFramework>
 <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework"/>
</entityFramework>
</configuration>

可以告诉我在这里缺少什么

2 个答案:

答案 0 :(得分:0)

我不知道你是否会这样,但几周前我也遇到了同样的错误,这让我非常生气了几个小时。事实证明,除了根web.config文件之外,我在App_Config /目录中有一个名为web.config的文件。出于某种原因,IIS试图将该文件读取为该网站的web.config,并且因为它不包含与IIS配置相关的元素,所以它抛出异常。

我不得不重命名该文件,它开始为我工作。即使这不能完全适合您,请确保您认为错误消息可能并不总是像您希望的那样有用。

如果不是这样,我认为你有两个system.web节点可能是一个问题?复制一个system.web节点中的所有元素,将它们粘贴到另一个节点中,然后删除第一个节点。我试图通过它阅读奇怪的任何奇怪的东西,这是我唯一能找到的看起来很时髦的东西。

答案 1 :(得分:0)

我花了好几个小时在IIS Express localhost错误500.19,错误代码0x8007000d,在web.config文件路径和Config Source的开头有\?\ C:\ Users \:研究指向权限web.config或格式错误的web.config / applicationhost.config;然而,这是一个Wordpress网站,结果我错误地在子主题functions.php中复制了一个函数,导致内部服务器错误。配置的所有方面都很好。