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
Anonymous
October 02, 2005
Thanks for sharing!
solved my problemAnonymous
November 16, 2005
Thanks a lot.
Merci Beaucoup :)
(Paris,France)Anonymous
November 30, 2005
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.Anonymous
December 08, 2005
Yep, we had the same error, but caused by the web.config in a precompiled web folder under de asp.net 2.0 web project folder... Deleting that folder also fixed our issue.
Thanks!Anonymous
July 09, 2007
PingBack from http://www.joelevi.com/blog/index.php/2007/07/09/aspnet-error-it-is-an-error-to-use-a-section-beyond-application-level/Anonymous
May 13, 2009
PingBack from http://codehutch.com/2009/05/visual-studio-machinetoapplication-error/