2015-03-13 360 views
0

我得到这个错误,当我上传到主机上Godaddy的共享,我已经试过其他供应商一样,但它同样HTTP错误500.19。内部服务器错误。错误代码t 0x8007000d

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> 

可以在任何告诉我是什么在这里失踪

+0

您发布的XML已通过W3C XML验证程序的验证,因此该文件是正确的,但内容可能不是。也许问题出在'ApplicationHost.config'文件 – 2015-03-13 14:55:01

+0

可能重复[ASP.NET:HTTP错误500.19 - 内部服务器错误0x8007000d](http://stackoverflow.com/questions/16836473/asp-net-http-error -500-19-internal-server-error-0x8007000d) – Izzy 2015-03-13 15:39:28

+0

@HoboSapiens在哪里可以找到这个** ApplicationHost.config **? – mark 2015-03-13 16:13:33

回答

0

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

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

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

+0

我想将它托管到godaddy上,而我没有看到App_Config /目录。如果我听到业余爱好者,我很抱歉。 – mark 2015-03-13 16:04:21

+0

并非每个应用程序都有一个app_config目录,如果您尚未创建它来存储其他配置信息,它将不存在。既然你能够消除这种可能性,我会在你的解决方案中找到每个* .config文件,并查看它们是否有错误。如果这是唯一的,我会更仔细地浏览你的配置。你有没有尝试将你的两个system.web节点结合起来?我意识到,没有出现在我的最后一段,请参阅编辑 – 2015-03-13 16:41:39

+0

它显示给我的内容: **配置错误\t只允许一个元素。它必须是根元素的第一个子元素** – mark 2015-03-14 04:52:33

相关问题