Can't access login page web config

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

asp.net
web-config
asked on Stack Overflow Apr 15, 2015 by Chamath Viduranga • edited Sep 8, 2015 by Wraith King

1 Answer

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.

answered on Stack Overflow Apr 15, 2015 by sudhAnsu63 • edited Apr 15, 2015 by sudhAnsu63

User contributions licensed under CC BY-SA 3.0