Sasha Sydoruk

Building a better mousetrap with XHTML, AJAX and RSS

VS 2005 – Where did IntelliSense go from my web.config?

One of the really nice features in Visual Studio 2005 is the IntelliSense support in xml files including web.config. No longer do you have to copy some snippets from other web sites just because you don’t quite remember the exact spelling of something like this:

        < membership>
<
providers>
<
add name=AspNetSqlMembershipProvider type=System.Web.Security.SqlMembershipProvider,                         System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
connectionStringName=LocalSqlServer
enablePasswordRetrieval=false
enablePasswordReset=true
requiresQuestionAndAnswer=true
applicationName=/
requiresUniqueEmail=false
passwordFormat=Hashed
maxInvalidPasswordAttempts=5
minRequiredPasswordLength=7
minRequiredNonalphanumericCharacters=1
passwordAttemptWindow=10
passwordStrengthRegularExpression=“” />
providers>
membership>
But from time to time you will notice that IntelliSense in web.config disappears. It just does not work anymore. You restart Visual Studio, reload the solution but it still does not work.

What is the problem? What caused this? Web Site Administration Tool is the culprit. WSAT is a great tool and allows to jumpstart the application but when the changes to web.config are saved, the following change is made:
< configuration>

Will be changed to this:
< configuration xmlns=http://schemas.microsoft.com/.NetConfiguration/v2.0>

Once the namespace information has been added to the configuration tag, the IntelliSense no longer works. The only way to make it work is to remove xmlns attribute.

2 Comments so far

  1. Peter August 31st, 2006 11:04 am

    I wish they had intellisense for the skin files. I’m still copying and pasting tags into there. I can’t imagine it would be that hard to implement by the VS dev team. They already have it in the html. Well, maybe in the next SP.

  2. Kevin C September 1st, 2006 7:18 am

Leave a reply