Working with IIS under VS 2008 Beta 2 and Vista

Tags: Dev

After spending too many hours trying to deploy from Visual Studio to IIS on Vista using Visual Studio 2008, I thought I'd pass along what I learned.

Even if you have IIS installed (it probably isn't by default, you must also install ASP.NET and IIS 6 management tools. The IIS 6 tools allow you to do the FrontPage integration stuff that Visual Studio uses for publishing.   Follow these instructions to make these configuration changes:

  1. Windows Features
  2. In Windows Vista, open Control Panel and then click Programs and Features.
  3. In the right pane, click Turn Windows features on or off. The Windows Features dialog box opens.
  4. Select the Internet Information Services check box.
    NOTE: Certain necessary related features will automatically be selected when others are selected
  5. Double-click (or expand) Web Management Tools, double-click IIS 6 Management Compatibility, and then select the IIS 6 Metabase and IIS 6 Configuration Compatibility check box.
  6. Double-click (or expand) World Wide Web Services, double-click Application Development Features, and then select the ASP.NET check box.
  7. Double-click (or expand) Security, and then select the Windows Authentication check box. (this step may not be necessary depending on your security needs).
  8. vii. Click OK

 

Once the features are installed, you also need to fix a problem with an assembly signing validation failure.   It doesn't mention "iisresolver.dll", but this fixes it.   The final, ServiceModelReg.exe step is to be sure that WCF is properly integrated with the ASP.NET installation.

From a Visual Studio 2008 Beta 2 Command Prompt, execute the following commands to properly configure ASP.NET for WCF:

  1. sn.exe -Vr "%ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\iisresolver.dll"  
  2. sn.exe -Vr "%ProgramFiles%\Microsoft SDKs\Windows\V6.0A\Bin\SvcUtil.exe"
  3. "c:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe" -i

 

You must also run Visual Studio as Administrator (my VS 2008 shortcut  seems to be setup that way as default though...).   If you follow all of these steps, you should be able to create Web sites or WCF services using the local IIS instance using Visual Studio.   Phew!

 

UPDATE (9/2/2007): Added the second step in the lower section to register svcutil.exe as this would otherwise crash too.


After CISSP, although every VCP-310 professional does work for 70-291, still a 70-649 is preferred. This is the way it training works.
Add a Comment