VS 2008 WebApp: "It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level."

Note: I'm fairly new to Visual Studio's approach to web application development, so please be patient while I figure out how it relates (or parallels) PHP or Java development.  (Or not: it can be completely different; I'm just getting started here!)  Your kind help is really appreciated here!

This really neat-o web app has fallen into my lap, and it includes all sorts of plug-ins and stuff, such I cannot (with any degree of success) move the WebApp from the VS2008 development machine to my (more modern) VS2010 dev machine.  As I come to understand Visual Studio's approach to web application development, this may change.  But that's not the problem: it's just the environment.

(The application is broken, and needs a few debugging runs to figure out where code needs adjustment to take into account changes to the business model, to adapt the WebApp to meet new requirements in our ever-changing business.)

Here's the problem: In order to debug this WebApp, I need to successfully compile it: to this end I click the green arrow button (labelled "Start Debugging") and Visual Studio begins to chug along, compiling the application.  It builds, then Validates Web Site, then breaks at a line "<authentication mode="Windows"/>" in the [web.config] file, giving me 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.

Open in new window

This is a bit frustrating, as I'm running in debug in Visual Studio.  I realize it's running a local instance of the ASP.Net Development Server, but it's fouling on machine-generated code!  VS builds that - it's right under the paragraph:
       The <authentication> section enables configuration 
       of the security authentication mode used by 
       ASP.NET to identify an incoming user. 

Open in new window

...and since none of my predecessors have ever documented the first line of code ("...if it was difficult to write, it should be difficult to understand..."), I figure that Visual Studio is responsible for pretty much everything in the [web.config] file.

In previous experience with Visual Studio, I just hit the green (arrow) button, the app churns in the compiler for a few seconds or so, then everything runs (normally) until we hit the first breakpoint (or error).  Only this is blowing up before it ever gets started.  Have I missed something, or did I do something wrong?  Or is there a step in the Visual Studio WebApp development that I've missed?

I'm seriously confused, and not a little frustrated.  Thanks for your time and attention!
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
LongFistAuthor Commented:
Okay, so I went hunting down into the file structure to find the duplicate [web.config] file and found it in the application's [PrecompiledWeb\{%ApplicationName%}] folder.  VS apparently "backs up" the [web.config] file in there for some reason, but doesn't realize that IIS (or ASP.Net Development Server) will fail to execute because it's in there.

Note to self: the [web.config] file in the Application (Dev) Folder is fine: if you see this error most likely it's because there is a backup [web.config] file somewhere in the subfolders there: this file must be eradicated.  (I myself renamed it to [web.config.backup.2013.09.13] to note that it *was* a backup, and the app went on to fail against a "Could not load the assembly '{%CustomAssemblyName%}'. Make sure that it is compiled before accessing the page." - but this was progress!  Yayy!

A ['B'] Grade?  Well, the links were a big help, yes, but they were very "one size fits all", and didn't really relate directly to the situation described in the problem above.  If someone had said "I'll bet you have more than one [web.config] file in your project's file structure - go look for that and eliminate it" I might have graded it a bit higher.  The confusion lies in all of the references to IIS in those articles: Do we (as developers) really need to configure IIS when trying to run/debug and application from the Visual Studio Editor/IDE?  And how would we (the noobs to Microsoft's Visual Studio) achieve this?

There's no doubt about it: I need to learn a *LOT* more about this development platform, and all of the quirks that I'm likely to encounter.  But I'm a huge step closer to making things work!  Thank you ever so much!!!
Excellent I'm glad this helped you out.
I appreciate your open and honest feedback as well.  
Happy coding and have a great day :)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.