"It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual"

Q: I have an ASP.Net application that when launched produces the following 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.

What can I do to resolve it?

A: This could be do to the virtual directory not being configured as an application.
To create an Application using a Virtual Directory, use the following procedure.
  1. Open the IIS Manager (inetmgr.exe)
  2. Right click on "Virtual Directory" and select "Properties".
  3. Click on the "Create" button.

The Virtual Directory is now configured as an Application and the ASP.Net should work as expected. If not there maybe a conflict with the settings in the Machine.config file.

Comments

Popular posts from this blog

Using VB Script to display part of an IP address

Working with double quotes (") in VB.Net

Oct'18 Meeting Wrap-up