Visual Studio 2008 Locks Up After Installing Office 2010

I installed Office 2010 on my development machine a few weeks ago.  I didn’t realize that this was relevant to the problem I’ve been fighting in Visual Studio 2008 until today.  The basic problem was that any time I opened an .aspx file, Visual Studio would lock up.  It made making any web edits impossible and I’ve been having to edit these files in a different text editor.

I’d tried resintalling the last Service Pack without fixing the issue.  So today I sat down to search for the problem and found and article called Upgrade or Uninstall of Office 2007 might cause VS 2008 Web designer to hang.  The issue it turns out happens when you upgrade from Office 2007 to Office 2010 on a computer running a 64 bit OS with Visual Studio 2008.  It turns out that Office 2007 and Visual Studio 2008 share the web editing component and when you do the upgrade to Office 2010, the component that VS 2008 relies on is removed.

The fix is to go into Program and Files, click Change on the Microsoft Visual Studio Web Authoring Component, and then select Repair.  Once that’s done Visual Studio 2008 will work as before.

Fixing Windows 2003 ASP.NET Tab Doesn’t Show in IIS

I ran into an issue this evening and wanted to document it for my own future reference and anyone else who might run into the problem.  I had installed ASP.NET 4 onto a Windows 2003 64 bit server.  I uploaded a test version of an application that is a port of an existing application converted to take advantage of some of the new features of .NET 4.  After loading the application and setting it as an application I noticed that the ASP.NET tab where one would normally change the version wasn’t there.

After some false starts, I came across this blog post which describes much the same issue though my server was not running on VMWare, but another virtualization system.  The fix it suggests is:

  1. Stop IIS
  2. Edit the MetaBase.XML file in %WINDIR%system32inetsrv to remove a line reading Enable32BitAppOnWin64="TRUE"
  3. Start IIS

I did this and the tab did appear, but the result caused more problems that it solved.  Several components on the web site refused to load under 64 bit only and as a result the server was useless.  After changing the settings back to where they had been to start I looked some more and found another blog post that gave an alternative solution to “manually” change the version on a directory using the aspnet_regiis tool.  To do this you use the –s or –sn options along with the path of the application.  The path is not the path to the application on disk, but a application path that goes something like W3SVC/[x]/ROOT/AppPath where [x] is the number of the web site (shown on the listing of all the web sites in the IIS Manager) and the AppPath is the path from the root of the site to the application you want to set.  The difference between the two options is that –s applies the change to the path you specify and any applications located below it while –sn only changes the settings of the application at the path and does not affect applications below it.

A good note is that an MVC 2 application no longer requires the wildcard mapping “hack” under IIS 6 with ASP.NET 4.  Also make sure to allow ASP.NET 4 in the Extensions for your new web application to work too.