3
votes

What should i do when this error prompt my screen

In VS2008 Express Edition

  1. C:\Users\ami\Desktop\MyAddressBookasd\MyAddressBook\UpdateTheRecord.aspx: ASP.NET runtime error: 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.

enter image description here

In Web Browser

  1. 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 Definition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.

Source Error:

Line 36: ASP.NET to identify an incoming user. Line 37: --> Line 38: Line 39: section enables configuration

enter image description here

3
Parser Error Message: It is an error to use a section registered as Definition='MachineToApplication' beyond application level. "This error can be caused by a virtual directory not being configured as an application in IIS."...clearly telling the reason for the error - Ashwini Verma

3 Answers

5
votes

It seems you have not configured the virtual directory for your website as an application in IIS. If you manually create the virtual directory and it is not configured as an application, then you will not be able to browse the application and may get the above error.

please visit this link to solve it. allowDefinition='MachineToApplication' beyond application level" in asp.net

2
votes

There can be one of many possible reasons for this

  1. You may have added a backup folder inside the main folder. If yes, Remove it.
  2. Make sure that you have opened the correct root folder, in case you are running the project with Visual Studio
  3. Make sure that you don't have any copy of web.config files kept in the project.

Hopefully it helps. In case you are still experiencing the same problem, let me know :)

1
votes

Convert to application your virtual/pshysicial directory in IIS Web sites. When convert to appication, resolve your error.