0

I am getting this error , when I uploaded it to the shared hosting on Godaddy, I have tried same on other provider but its same

HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid

Error Code 0x8007000d

I clicked on View more information it took me to microsoft's page and there it says :

This problem occurs because the ApplicaretionHost.config file or the Web.config file contains a malformed XML element.

Now, I coudn't figure out where is the issue. Heres my web.config file :

<?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>

Can any tell what am I missing here

mark
  • 623
  • 3
  • 21
  • 54
  • The XML you've posted passes validation by the W3C XML validator, so the file is sound, although the content may not be. Perhaps the problem is in the `ApplicationHost.config` file –  Mar 13 '15 at 14:55
  • possible duplicate of [ASP.NET: HTTP Error 500.19 – Internal Server Error 0x8007000d](http://stackoverflow.com/questions/16836473/asp-net-http-error-500-19-internal-server-error-0x8007000d) – Izzy Mar 13 '15 at 15:39
  • @HoboSapiens where can I find this **ApplicationHost.config** ? – mark Mar 13 '15 at 16:13

2 Answers2

0

I do not know if this will be the case for you, but a couple weeks ago I had this same error and it made me very angry for a few hours. It turns out that I had a file in my App_Config/ directory that was named web.config in addition to the root web.config file. For some reason, IIS was attempting to read that file as if it was the web.config for the site, and since it did not contain elements relevant to an IIS configuration, it was throwing an exception.

I had to rename the file and it started working for me. Even if this does not work exactly for you, make sure you consider that the error message may not always be as helpful as you would hope.

If it is not that, I think the fact that you have two system.web nodes may be an issue? Copy all the elements in one system.web node, paste them into the other, and delete the first node. I tried to read through it for strange anything strange and that was the only thing I could find that looked funky.

Scott Simontis
  • 748
  • 1
  • 10
  • 24
  • I am trying to host it onto godaddy, and I dont see App_Config/ directory . I am sorry if I sound amateur. – mark Mar 13 '15 at 16:04
  • Not every app has an app_config directory, if you have not created it to store additional configuration information it will not exist. Since you were able to eliminate that possibility, I would find every *.config file in your solution and see if there are errors with them. If this is the only one, I will browse your config more carefully. Did you try combining your two system.web nodes? I realized that didn't show up in my last paragraph, see edit – Scott Simontis Mar 13 '15 at 16:41
  • this what it showed me : **Config Error Only one element allowed. It must be the first child element of the root element** – mark Mar 14 '15 at 04:52
0

I spent hours on IIS Express localhost error 500.19, Error Code 0x8007000d, with \?\C:\Users\ at the beginning of the web.config file path and Config Source: -1: 0. Research pointed to permissions on the web.config or a malformed web.config/ applicationhost.config; however, this was a Wordpress site and it turned out I had duplicated a function in the child theme functions.php by mistake which caused an Internal Server Error. All aspects of the config were actually fine.

DaniB
  • 191
  • 2
  • 5
  • 19