locked
Configuration Error allowDefinition='MachineToApplication' beyond application level RRS feed

  • Question

  • User-615494781 posted

    Hi,

    I have Visual Studio2005  Express Edition Running on Windows XP Pro.

    I have downloaded the StaterKit http://asp.net/downloads/starterkits/TheBeerHouse.aspx?tabid=62

    Once I have download the StaterKit and Run in VWD Express

    I get this error.

    Please Help.

     I have Two web.config files in my Root!

    Server Error in '/TheBeerHouse' Application.

    Configuration Error

    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

    Parser Error Message: 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.

    Source Error:

    Line 24: 	
    Line 25:    <system.web>
    Line 26: 		<authentication mode="Forms">
    Line 27: 			<forms cookieless="AutoDetect" loginUrl="~/AccessDenied.aspx" name="TBHFORMAUTH"/>
    Line 28: 		</authentication>

    Source File: C:\Documents and Settings\Janaka\My Documents\Visual Studio 2005\WebSites\TheBeerHouse\thebeerhouse\tbh_web\web.config    Line: 26


    Show Additional Configuration Errors:

    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. (C:\Documents and Settings\Janaka\My Documents\Visual Studio 2005\WebSites\TheBeerHouse\thebeerhouse\tbh_web\web.config line 43)
    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. (C:\Documents and Settings\Janaka\My Documents\Visual Studio 2005\WebSites\TheBeerHouse\thebeerhouse\tbh_web\web.config line 65)
    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. (C:\Documents and Settings\Janaka\My Documents\Visual Studio 2005\WebSites\TheBeerHouse\thebeerhouse\tbh_web\web.config line 71)
    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. (C:\Documents and Settings\Janaka\My Documents\Visual Studio 2005\WebSites\TheBeerHouse\thebeerhouse\tbh_web\web.config line 73)
    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. (C:\Documents and Settings\Janaka\My Documents\Visual Studio 2005\WebSites\TheBeerHouse\thebeerhouse\tbh_web\web.config line 79)
    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. (C:\Documents and Settings\Janaka\My Documents\Visual Studio 2005\WebSites\TheBeerHouse\thebeerhouse\tbh_web\web.config line 81)
    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. (C:\Documents and Settings\Janaka\My Documents\Visual Studio 2005\WebSites\TheBeerHouse\thebeerhouse\tbh_web\web.config line 129)
    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. (C:\Documents and Settings\Janaka\My Documents\Visual Studio 2005\WebSites\TheBeerHouse\thebeerhouse\tbh_web\web.config line 137)
    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. (C:\Documents and Settings\Janaka\My Documents\Visual Studio 2005\WebSites\TheBeerHouse\thebeerhouse\tbh_web\web.config line 146)
    <script type="text/javascript"> function OnToggleTOCLevel1(level2ID) { var elemLevel2 = document.getElementById(level2ID); if (elemLevel2.style.display == 'none') { elemLevel2.style.display = ''; } else { elemLevel2.style.display = 'none'; } } </script>

    Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42 <!-- [ConfigurationErrorsException]: 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. (C:\Documents and Settings\Janaka\My Documents\Visual Studio 2005\WebSites\TheBeerHouse\thebeerhouse\tbh_web\web.config line 26) at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal) at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors) at System.Configuration.BaseConfigurationRecord.ThrowIfInitErrors() at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject) at System.Configuration.BaseConfigurationRecord.GetSection(String configKey, Boolean getLkg, Boolean checkPermission) at System.Configuration.BaseConfigurationRecord.GetSection(String configKey) at System.Web.Configuration.RuntimeConfig.GetSectionObject(String sectionName) at System.Web.Configuration.RuntimeConfig.GetSection(String sectionName, Type type, ResultsIndex index) at System.Web.Configuration.RuntimeConfig.GetSection(String sectionName, Type type) at System.Web.Configuration.RuntimeConfig.get_CustomErrors() at System.Web.Configuration.CustomErrorsSection.GetSettings(HttpContext context, Boolean canThrow) at System.Web.HttpResponse.ReportRuntimeError(Exception e, Boolean canThrow, Boolean localExecute) at System.Web.HttpRuntime.FinishRequest(HttpWorkerRequest wr, HttpContext context, Exception e) --- [ConfigurationErrorsException]: 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. (C:\Documents and Settings\Janaka\My Documents\Visual Studio 2005\WebSites\TheBeerHouse\thebeerhouse\tbh_web\web.config line 43) at System.Web.Configuration.WebConfigurationHost.VerifyDefinitionAllowed(String configPath, ConfigurationAllowDefinition allowDefinition, ConfigurationAllowExeDefinition allowExeDefinition, IConfigErrorInfo errorInfo) at System.Configuration.BaseConfigurationRecord.VerifyDefinitionAllowed(FactoryRecord factoryRecord, String configPath, IConfigErrorInfo errorInfo) at System.Configuration.BaseConfigurationRecord.ScanSectionsRecursive(XmlUtil xmlUtil, String parentConfigKey, Boolean inLocation, String locationSubPath, Boolean lockChildren, Boolean skipInChildApps) --- [ConfigurationErrorsException]: 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. (C:\Documents and Settings\Janaka\My Documents\Visual Studio 2005\WebSites\TheBeerHouse\thebeerhouse\tbh_web\web.config line 65) at System.Web.Configuration.WebConfigurationHost.VerifyDefinitionAllowed(String configPath, ConfigurationAllowDefinition allowDefinition, ConfigurationAllowExeDefinition allowExeDefinition, IConfigErrorInfo errorInfo) at System.Configuration.BaseConfigurationRecord.VerifyDefinitionAllowed(FactoryRecord factoryRecord, String configPath, IConfigErrorInfo errorInfo) at System.Configuration.BaseConfigurationRecord.ScanSectionsRecursive(XmlUtil xmlUtil, String parentConfigKey, Boolean inLocation, String locationSubPath, Boolean lockChildren, Boolean skipInChildApps) --- [ConfigurationErrorsException]: 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. (C:\Documents and Settings\Janaka\My Documents\Visual Studio 2005\WebSites\TheBeerHouse\thebeerhouse\tbh_web\web.config line 71) at System.Web.Configuration.WebConfigurationHost.VerifyDefinitionAllowed(String configPath, ConfigurationAllowDefinition allowDefinition, ConfigurationAllowExeDefinition allowExeDefinition, IConfigErrorInfo errorInfo) at System.Configuration.BaseConfigurationRecord.VerifyDefinitionAllowed(FactoryRecord factoryRecord, String configPath, IConfigErrorInfo errorInfo) at System.Configuration.BaseConfigurationRecord.ScanSectionsRecursive(XmlUtil xmlUtil, String parentConfigKey, Boolean inLocation, String locationSubPath, Boolean lockChildren, Boolean skipInChildApps) --- [ConfigurationErrorsException]: 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. (C:\Documents and Settings\Janaka\My Documents\Visual Studio 2005\WebSites\TheBeerHouse\thebeerhouse\tbh_web\web.config line 73) at System.Web.Configuration.WebConfigurationHost.VerifyDefinitionAllowed(String configPath, ConfigurationAllowDefinition allowDefinition, ConfigurationAllowExeDefinition allowExeDefinition, IConfigErrorInfo errorInfo) at System.Configuration.BaseConfigurationRecord.VerifyDefinitionAllowed(FactoryRecord factoryRecord, String configPath, IConfigErrorInfo errorInfo) at System.Configuration.BaseConfigurationRecord.ScanSectionsRecursive(XmlUtil xmlUtil, String parentConfigKey, Boolean inLocation, String locationSubPath, Boolean lockChildren, Boolean skipInChildApps) --- [ConfigurationErrorsException]: 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. (C:\Documents and Settings\Janaka\My Documents\Visual Studio 2005\WebSites\TheBeerHouse\thebeerhouse\tbh_web\web.config line 79) at System.Web.Configuration.WebConfigurationHost.VerifyDefinitionAllowed(String configPath, ConfigurationAllowDefinition allowDefinition, ConfigurationAllowExeDefinition allowExeDefinition, IConfigErrorInfo errorInfo) at System.Configuration.BaseConfigurationRecord.VerifyDefinitionAllowed(FactoryRecord factoryRecord, String configPath, IConfigErrorInfo errorInfo) at System.Configuration.BaseConfigurationRecord.ScanSectionsRecursive(XmlUtil xmlUtil, String parentConfigKey, Boolean inLocation, String locationSubPath, Boolean lockChildren, Boolean skipInChildApps) --- [ConfigurationErrorsException]: 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. (C:\Documents and Settings\Janaka\My Documents\Visual Studio 2005\WebSites\TheBeerHouse\thebeerhouse\tbh_web\web.config line 81) at System.Web.Configuration.WebConfigurationHost.VerifyDefinitionAllowed(String configPath, ConfigurationAllowDefinition allowDefinition, ConfigurationAllowExeDefinition allowExeDefinition, IConfigErrorInfo errorInfo) at System.Configuration.BaseConfigurationRecord.VerifyDefinitionAllowed(FactoryRecord factoryRecord, String configPath, IConfigErrorInfo errorInfo) at System.Configuration.BaseConfigurationRecord.ScanSectionsRecursive(XmlUtil xmlUtil, String parentConfigKey, Boolean inLocation, String locationSubPath, Boolean lockChildren, Boolean skipInChildApps) --- [ConfigurationErrorsException]: 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. (C:\Documents and Settings\Janaka\My Documents\Visual Studio 2005\WebSites\TheBeerHouse\thebeerhouse\tbh_web\web.config line 129) at System.Web.Configuration.WebConfigurationHost.VerifyDefinitionAllowed(String configPath, ConfigurationAllowDefinition allowDefinition, ConfigurationAllowExeDefinition allowExeDefinition, IConfigErrorInfo errorInfo) at System.Configuration.BaseConfigurationRecord.VerifyDefinitionAllowed(FactoryRecord factoryRecord, String configPath, IConfigErrorInfo errorInfo) at System.Configuration.BaseConfigurationRecord.ScanSectionsRecursive(XmlUtil xmlUtil, String parentConfigKey, Boolean inLocation, String locationSubPath, Boolean lockChildren, Boolean skipInChildApps) --- [ConfigurationErrorsException]: 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. (C:\Documents and Settings\Janaka\My Documents\Visual Studio 2005\WebSites\TheBeerHouse\thebeerhouse\tbh_web\web.config line 137) at System.Web.Configuration.WebConfigurationHost.VerifyDefinitionAllowed(String configPath, ConfigurationAllowDefinition allowDefinition, ConfigurationAllowExeDefinition allowExeDefinition, IConfigErrorInfo errorInfo) at System.Configuration.BaseConfigurationRecord.VerifyDefinitionAllowed(FactoryRecord factoryRecord, String configPath, IConfigErrorInfo errorInfo) at System.Configuration.BaseConfigurationRecord.ScanSectionsRecursive(XmlUtil xmlUtil, String parentConfigKey, Boolean inLocation, String locationSubPath, Boolean lockChildren, Boolean skipInChildApps) --- [ConfigurationErrorsException]: 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. (C:\Documents and Settings\Janaka\My Documents\Visual Studio 2005\WebSites\TheBeerHouse\thebeerhouse\tbh_web\web.config line 146) at System.Web.Configuration.WebConfigurationHost.VerifyDefinitionAllowed(String configPath, ConfigurationAllowDefinition allowDefinition, ConfigurationAllowExeDefinition allowExeDefinition, IConfigErrorInfo errorInfo) at System.Configuration.BaseConfigurationRecord.VerifyDefinitionAllowed(FactoryRecord factoryRecord, String configPath, IConfigErrorInfo errorInfo) at System.Configuration.BaseConfigurationRecord.ScanSectionsRecursive(XmlUtil xmlUtil, String parentConfigKey, Boolean inLocation, String locationSubPath, Boolean lockChildren, Boolean skipInChildApps) -->

    Tuesday, October 3, 2006 12:51 PM

Answers

  • User-2014425070 posted

    Do you have a backup directory of a previous version stored in the project folder and not excluded from project? It might happen in such a case. See this and you will know what I am talking about. I could solve my issue by doing this. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, March 1, 2007 4:09 AM

All replies

  • User-2041805088 posted
    As the error suggests, is the vitual directory that the site is in marked as an application in IIS?
    Tuesday, October 3, 2006 12:58 PM
  • User-615494781 posted

    Hi,

    I think visual Studio Express Comes with Inbuild Web server Or if not How do you make any of your folder as a configured as a IIS application

    Tuesday, October 3, 2006 2:12 PM
  • User-2041805088 posted
    Oh. I missed the part about you running it in VWD. Try running it under IIS instead.
    Tuesday, October 3, 2006 2:25 PM
  • User-1499688351 posted

    I'm facing the same problem.

    We should run this applicaiton using ASP.NET development server, why does he need IIS for this??

     

     

    Friday, January 19, 2007 5:38 AM
  • User-2014425070 posted

    Do you have a backup directory of a previous version stored in the project folder and not excluded from project? It might happen in such a case. See this and you will know what I am talking about. I could solve my issue by doing this. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, March 1, 2007 4:09 AM
  • User764044152 posted

    Do you have a backup directory of a previous version stored in the project folder and not excluded from project? It might happen in such a case. See this and you will know what I am talking about. I could solve my issue by doing this. 

    Removing the backup web.config file fixed my error. Thanks for the link sayangh.

    Tuesday, March 13, 2007 4:12 PM
  • User-2014425070 posted
    You are most welcome will9key.
    Friday, March 23, 2007 3:24 AM
  • User2031027210 posted

    If you create subfolder without affecting IIS you need just to delete web.config then try,i think your sub folder web site will work fine.

    Mohammad Shraim

    Systems Analyst

    UNRWA

    mhd_shr@hotmail.com

    Tuesday, July 10, 2007 2:06 AM
  • User2031027210 posted

    In addition to solution wich i suggested above you can also keep web.config file but you need to remove Authintication/authorisation tags in addition to sessionState tag also this solve the problem.

    Tuesday, July 10, 2007 2:18 AM
  • User1452995550 posted

    I had this error as well.   I was testing a bunch of web.config files because I was learning dot net nuke and my host could not help me at all with my DNN file permissions and my connection string.

    i created a sub folder as a back up for all my different web.config files.  I got everything working but forgot about the sub folder called test config files.   when I deleted this folder this error went away after I selected

    Build > Build Website. 

    User errror

    hope this helps someone.

     

     

     

     

    Thursday, October 18, 2007 4:30 PM
  • User851802834 posted

    thanks sayangh my problem is resolved by your advice

    Thursday, September 4, 2008 12:46 AM
  • User1354447825 posted

     Hi all,

    This is Prabhat here, I am getting an error on my client vista machine when installing web setup while it installed and execute successfully on my vista machine. I don't know what is problem. i am adding error detail below:

    Parser Error Message: It is an error to use a section registered as allowDefinition='MachinToApplication' beyound application level. This error can be caused by a virtual directory not being configured as an application in IIS.

    As all of you are suggested, i try to check webconfig file but i have got there is only one config file in my root directory no other webconfig exists in sub folder. I can't understand actually what's problem is.

    any one please help me. Thanks in advance.
    Saturday, February 28, 2009 1:04 AM
  • User-1706989909 posted

    Hello,

    Whenever a new web application created, using Visual Studio.net it automatically creates a virtual directory in IIS and configures as an application. So you have to manually create a Virtual directory and configure it to application.

    Start->All programmes->Administrative tools->Internet Information service-> Select Server name->Web Site->Default Web site-> right click ->new->virtual directory 

    this opens a virtual directory vizard. give a name, give path of application. Give appropriate permission. then Finish.

     Now to cross check whether its configured to an application or not, select created virtual directory Right click->properties->Select Virtual directory under "Application settings"

    Check for Application name textbox, Alias name you specified in starting should appear.

    hope this mite help you

    Cheers

    Monday, March 23, 2009 8:32 AM
  • User-1706989909 posted

    Hello,

    Whenever a new web application created, using Visual Studio.net it automatically creates a virtual directory in IIS and configures as an application. So you have to manually create a Virtual directory and configure it to application.

    Start->All programmes->Administrative tools->Internet Information service-> Select Server name->Web Site->Default Web site-> right click ->new->virtual directory 

    this opens a virtual directory Wizard. give a name, give path of application. Give appropriate permission. then Finish.

     Now to cross check whether its configured to an application or not, select created virtual directory Right click->properties->Select Virtual directory under "Application settings"

    Check for Application name textbox, Alias name you specified in starting should appear.

    hope this might help you

    Monday, March 23, 2009 8:34 AM
  • User1537863996 posted

    I am having the same issue - I followed the advice, but then I ran into another issue.

     

    The server is configured to use pass-through authentication with a built-in account to access the specified physical path. However, IIS Manager cannot verify whether the built-in account has access. Make sure that the application pool identity has Read access to the physical path. If this server is joined to a domain, and the application pool identity is NetworkService or LocalSystem, verify that <domain>\<computer_name>$ has Read access to the physical path. Then test these settings again.

     

    What does this mean and how can I fix it???

    Please help.  I am using VWD.

    Appreciate it!

    Saturday, May 2, 2009 11:05 AM
  • User-878481997 posted

    I had a similar problme on Windows Vista, then I moved the <sessionState ...../> to another<System.web></System.web>block, then the problem is gone.

    Wednesday, June 10, 2009 11:25 PM
  • User114190273 posted

    I agree with others on the forum. 90% of times you would have forgotten the subfolder creatd. check it. I have solved it just now by deleting the subfolder

    Tuesday, June 16, 2009 6:16 AM
  • User891118370 posted

    Thanks Sayan. It worked for me also. 

    Tuesday, June 1, 2010 1:54 PM
  • User-758743067 posted

    This was all helpful, but in my case, the reason I have another web.config is I'm trying to do Windows Authentication. My approach (which I got from the internet) is to:

    * perform windows auth

    * if successful, transfer to a /Content/ directory with a web.config that only allows authenticated users

    How do I do that?

     

    Thanks in advance!

    Friday, June 22, 2012 5:05 PM
  • User-155645259 posted

    I was having this problem. I found lots of solutions. But anyone did not work.

    Finally, I created a new ASP.NET website project in Visual Studio 2010 and removed all the default files and folders from the newly created website. Then copy all the files and folders from my working website including web.config, bin and putted into this newly created website . That worked for me. And the result was website successfully built.Cool

     

     

     

     

     

    Tuesday, April 2, 2013 8:50 AM
  • User338498216 posted

    IIS worker process is running under 32bit mode? Change to 64bit

    IIS Manager -> Application Pools -> select RDWebAccess -> Advanced Settings -> Enable 32-Bit Applications - change it to 'False'

    Tuesday, December 10, 2013 3:05 PM