asp.netiisiis-6windows-server-2003

ASP.Net - It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level


Getting this error on an intranet application we have running in our development environment, and I'm not sure where to go/look for a solution. The application used to work fine, however it is run on a shared server with another team of developers and we're having trouble tracking down the error (no updates were made to the application by my team, it suddenly stopped working).

We're running Windows Server 2003 and IIS 6.0. If I open the solution on my machine, however, I receive an error in Visual Studio solution points to this line in the web.config, however I believe this is a relatively standard setting and we actually have this running in another environment (same server/IIS set up)

<authentication mode="Windows" />

The error reads

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.

I've also changed the <system.web> section of the web.config on the server to include <customErrors mode="Off"/>, however oddly enough when I navigate to the site I am still getting the custom error page...

I'm relatively new to IIS and never worked with Windows Server 2003. Can someone help point me in the right direction either to get the actual error so display in the browser or how to fix the error given to me by Visual Studio?


Solution

  • Bring up project properties page in Visual Studio. Right-click on project node in Solution Explorer and click properties. Look for the Web tab and click the button to create a virtual directory.