【问题标题】:HTTP Error 500.19 .Internal Server Error . Error Code 0x8007000dHTTP 错误 500.19。内部服务器错误。错误代码 0x8007000d
【发布时间】:2015-05-16 02:41:57
【问题描述】:

我收到此错误,当我将其上传到 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>

谁能告诉我这里缺少什么

【问题讨论】:

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


【解决方案1】:

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

【讨论】:

    【解决方案2】:

    我不知道你是否会遇到这种情况,但几周前我遇到了同样的错误,这让我很生气几个小时。事实证明,除了根 web.config 文件之外,我的 App_Config/ 目录中还有一个名为 web.config 的文件。出于某种原因,IIS 试图读取该文件,就好像它是该站点的 web.config 一样,并且由于它不包含与 IIS 配置相关的元素,因此引发了异常。

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

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

    【讨论】:

    • 我正在尝试将它托管到 godaddy,但我没有看到 App_Config/ 目录。如果我听起来很业余,我很抱歉。
    • 不是每个应用都有一个 app_config 目录,如果你没有创建它来存储额外的配置信息,它就不会存在。由于您能够消除这种可能性,我会在您的解决方案中找到每个 *.config 文件并查看它们是否存在错误。如果这是唯一的,我会更仔细地浏览您的配置。您是否尝试合并您的两个 system.web 节点?我意识到这没有出现在我的最后一段中,请参阅编辑
    • 这是它向我展示的:配置错误只允许一个 元素。它必须是根 元素 的第一个子元素
    猜你喜欢
    • 1970-01-01
    • 2021-05-09
    • 1970-01-01
    • 2020-08-19
    • 1970-01-01
    • 1970-01-01
    • 2021-10-18
    • 2019-09-06
    相关资源
    最近更新 更多