-1

This my web.config file:

<configuration>
  <compilation debug="true" targetFramework="4.5"/>
  <httpRuntime targetFramework="4.5"/>
  <connectionString>
    <add 
      name="ColMAX" 
      connectionString="data  Source=SHANTHA;Initial Catalog=Billing_Test;Integrated Security=True" 
      providerName="System.Data.SqlClient"/>
  </connectionString>
  <system.web>
    <compilation debug="true"/>
    <authentication mode="Forms">
      <forms 
        defaultUrl="~Default/.aspx" 
        loginUrl="~/Login.aspx" 
        slidingExpiration="true"
        timeout="2880"></forms>
    </authentication>
  </system.web>
</configuration>

I can't access the login page. This is the error I get:

Detailed Error Information:

Module : IIS Web Core

Notification : Unknown

Handler :Not yet determined

Error Code :0x80070032

Config Error : The configuration section 'compilation' cannot be read because it is missing a section declaration Config File
\?\c:\users\sudath\documents\visual studio 2013\Projects\Colombo\Colombo\web.config

I just start my project. Can anyone solve this ?

Wraith King
  • 192
  • 2
  • 19
  • There should be more details on your error like in question: http://stackoverflow.com/questions/9216158/the-requested-page-cannot-be-accessed-because-the-related-configuration-data-for could you put them here? – Piotr Stapp Apr 15 '15 at 06:36
  • i did it now .can you help me – Chamath Viduranga Apr 15 '15 at 06:42
  • Seems like the Correct Frame Work for Application Pool is not installed. can you check the Application Pool's .net frameWork. – sudhAnsu63 Apr 15 '15 at 06:46

1 Answers1

1

Update your Web.config as below.

<configuration>
  <connectionString>
   <add name="ColMAX" connectionString="data  Source=SHANTHA;Initial Catalog=Billing_Test;Integrated Security=True" providerName="System.Data.SqlClient"/>
  </connectionString>
<system.web>
   <compilation debug="true" targetFramework="4.5"/>
   <httpRuntime targetFramework="4.5"/>
   <authentication mode="Forms">
     <forms defaultUrl="~Default/.aspx" loginUrl="~/Login.aspx"   slidingExpiration="true" timeout="2880"></forms>
   </authentication>

  </system.web>
</configuration>

Registering Application Pool for .Net frameWork 4.5

Navigate to

C:\Windows\Microsoft.NET\Framework\v4.0.30319

Open the command window here (Ctrl + Shift + RightClick ) -> Open command Window here.

Type the below commad in the command window.

aspnet_regiis.exe -i

Hope this will fix your peoblem.

sudhAnsu63
  • 5,740
  • 4
  • 38
  • 50