ASP.NET 2.0 & "allowDefinition=’MachineToApplication’" error message

So, I upgraded an existing ASP.NET (1.1) application today to ASP.NET 2.0.  The upgrade had some warnings which seemed unimportant but it didn’t matter since I had elected that the upgrade wizard make a backup of my application. 

Alas when I try to run the application I ran into this problem:  “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 checked to ensure I had the virtual dir setup to be an application and it was…reverting back to the 1.1 version worked fine…re-upgrade and I get the problem again.

What gives?

Turns out that the VS.NET 2005 was complaining about a configuration section within the web.config file in the Backup folder of my application…just remove (ore move) the backup folder so it doesn’t have a web.config file under the Virtual directory that your ASP.NET 2.0 application is running in. 

So, the “backup” option I selected on the upgrade wizard is what did me in.  🙂 Fun times!

Comments (6)

  1. sig says:

    Thanks for sharing!

    solved my problem

  2. Ahmed says:

    Thanks a lot.

    Merci Beaucoup 🙂


  3. Chak says:

    I had the same problem when migrating from ASP.NET 1.1 to 2.0. There was a Web.config file in the backup folder.

    -Thanks a lot.

  4. Robert says:

    Yep, we had the same error, but caused by the web.config in a precompiled web folder under de 2.0 web project folder… Deleting that folder also fixed our issue.