Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Undefined Web.config error in VS 2008

I'm working on a web app using VS 2008, .Net 3.5 and C#. Most of the projects in the solution are either classic asp.net pages with some MVC 1 in the mix, the rest is shared libraries. The solution is one that is some 5 years old and has gone through a variety of developers working on it and clearly has some performance and architectural issues.

Previously, I've been working on the project using VS 2008 on a Win XP machine, but have just transitioned over to a new box using Win 7 Ultimate. To do so, I've installed VS 2008, asp.net 3.5. To support future work on the solution I've also installed VS 2010 and asp.net 4.0.

Opening the solution on the new box with VS 2008 works fine, and it builds without error. However, when I attempt to run it with the debugger, I get the following message:

"There is an error in web.config. Please correct before proceeding. (You might rename the current web.config and add a new one.)"

I think it's clear that there is some sort of environmental issue regarding web.config on the new machine, but the error message is not "helpful". Adding a new web.config is not an option as the existing one is quite long and involved (too much to post here).

I'm hoping someone has a suggestion or two about where I might look for missing elements or changed configurations that might produce such an error message. Lacking that, I'll revisit this post and provide the web.config in the hope that will elicit further help.

like image 475
user1066050 Avatar asked Nov 25 '11 17:11

user1066050


1 Answers

So I don't know if you ever found an answer to this, but I ran into it in VS2013 today. Oddly, it would work if I had the web.config open in an editor window.

For others who may see this error I was able to clear it in VS2013 by deleting the \bin and \obj directories.

After that, it worked fine again...

like image 172
ShaneBlake Avatar answered Sep 30 '22 13:09

ShaneBlake