Click here to Skip to main content
12,698,686 members (28,303 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# SQL-Server SQL-Server-2008 , +
I have one project when i compile than i got error.So pls help me how tofixed it.

Error   23  It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS.  F:\Infoway\Time Tracking Software\SourceCode\TimeSheet-Demo\web.config  51

Sinnam Kushwah
Posted 18-Dec-12 23:49pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Rate this: bad
Please Sign up or sign in to vote.

Solution 2

sorry sir i already refer these links but no solution.

root web.config
<?xml version="1.0"?>
  For more information on how to configure your ASP.NET application, please visit
        <compilation debug="true" targetFramework="4.0">
                <add assembly="Microsoft.Office.Interop.Excel, Version=, Culture=neutral, PublicKeyToken=71E9BCE111E9429C"/></assemblies></compilation>

sub dir web.congig

Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in

<location path="Admin">
<deny users="?" />

<add name="DataAccessQuickStart" providername="System.Data.SqlClient" connectionstring="Data Source=SSKUSHWAH-PC;Initial Catalog=tsm;User ID=sa;Password=SSKUSHWAH" />

<dataconfiguration defaultdatabase="DataAccessQuickStart" />
<clear />

<pages enablesessionstate="true" enableviewstatemac="false" enableeventvalidation="false" viewstateencryptionmode="Never" theme="SkinFile" controlrenderingcompatibilityversion="3.5" clientidmode="AutoID">
<add namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" tagprefix="ajaxToolkit" />
<add tagprefix="CustomControls" namespace="CustomWebControls" assembly="CustomWebControls">

<compilation debug="true" defaultlanguage="c#" targetframework="4.0">
<add assembly="System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add assembly="System.Design, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Web.Extensions.Design, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Windows.Forms, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Web, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Xml, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Drawing, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Data, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Web.Services, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />

<add verb="POST,GET" path="ajaxpro/*.ashx" type="AjaxPro.AjaxHandlerFactory, AjaxPro.2" />

<authentication mode="Forms">
<forms name="AuthCookie" path="/" loginUrl="~/Admin/AdminLogin.aspx" protection="All" timeout="20">

<allow users="?" />

<sessionstate timeout="60">
<customerrors mode="Off" />


pls give me correct sol.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170118.1 | Last Updated 19 Dec 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100