none
RunTime Error 500.19 in asp.net Project... RRS feed

  • Question

  • Dear Experts,

    I am doing an asp.net project.. When i add the below code in web.config and run the project. then i got the Error..

      <configSections>
        <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" />
      </configSections>
    
    
      <dataConfiguration defaultDatabase="SM_Connection_String" />
    
      <connectionStrings>
        <add name="SM_Connection_String" connectionString="Data Source=Server-PC;Initial Catalog=db_School_Adm;Persist Security Info=True;User ID=sa;Password=abc_123456" providerName="System.Data.SqlClient" />
      </connectionStrings>  

    Here is the Full Code of 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>
          <compilation debug="true" targetFramework="4.5" />
          <httpRuntime targetFramework="4.5" />
    
          <authentication mode="Forms">
            <forms loginUrl="~/Default.aspx"
               protection="All"
               path="/"
               requireSSL="false"
               timeout="30"
               name=".ASPXAUTH"
               slidingExpiration="false"
               defaultUrl="../../SessionExpired.aspx"
               cookieless="UseDeviceProfile"
               enableCrossAppRedirects="false" />
          </authentication>
    
    
          <authorization>
            <deny users="?" />
          </authorization>
          
          
        </system.web>
    
    
      <configSections>
        <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" />
      </configSections>
    
    
      <dataConfiguration defaultDatabase="SM_Connection_String" />
    
      <connectionStrings>
        <add name="SM_Connection_String" connectionString="Data Source=Server-PC;Initial Catalog=db_School_Adm;Persist Security Info=True;User ID=sa;Password=abc_123456" providerName="System.Data.SqlClient" />
      </connectionStrings>  
      
    </configuration>

    Here is the Error code that i faced when i run the project.


    Saturday, January 4, 2014 12:44 PM

Answers

  • Hi Dileepkumarpd,

    Please turn customErrors off to show the detail information about this error. Please refer to the following link for more information. http://msdn.microsoft.com/en-us/library/h0hfz6fc(v=vs.85).aspx.

    By the way, think this thread is specific to ASP. NET forum. This form is to discuss problems about CLR development. Please post a new thread on that forum for more effective response. http://forums.asp.net/.

    Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, January 6, 2014 3:25 AM
    Moderator
  • The error is that you put <configSections> deep in your config file.  <configSections> (as the error message indicates) must exist only once and it must be the first entry in your <configuration> element.  Move the section to the top of the config as the first child element and ensure that you don't have any other instances of this section in your config.

    Michael Taylor
    http://msmvps.com/blogs/p3net

    Tuesday, January 7, 2014 3:24 PM
    Moderator

All replies

  • Hi Dileepkumarpd,

    Please turn customErrors off to show the detail information about this error. Please refer to the following link for more information. http://msdn.microsoft.com/en-us/library/h0hfz6fc(v=vs.85).aspx.

    By the way, think this thread is specific to ASP. NET forum. This form is to discuss problems about CLR development. Please post a new thread on that forum for more effective response. http://forums.asp.net/.

    Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, January 6, 2014 3:25 AM
    Moderator
  • The error is that you put <configSections> deep in your config file.  <configSections> (as the error message indicates) must exist only once and it must be the first entry in your <configuration> element.  Move the section to the top of the config as the first child element and ensure that you don't have any other instances of this section in your config.

    Michael Taylor
    http://msmvps.com/blogs/p3net

    Tuesday, January 7, 2014 3:24 PM
    Moderator