WebMatrix Visual Studio Integration

 

Today, I just installed the release of WebMatrix, along with the Beta version of SP1 for Visual Studio 2010.  One of the many cool features added with this combination is the IISExpress integration in Visual Studio.  Prior to this, the only options you had was to either use the default ASP.NET Development server in Visual Studio to test your web applications or web sites, or to use the Local IIS.  But assume you don't have IIS installed.  Or you don't have admin rights on your development box.  With IISExpress, you get the advantage on running on the same code base as IIS 7.5 when you test your site.  Even if you are running on a machine without IIS installed.

 

I was considering publishing an end-to-end walkthrough of creating an ad-hoc HelloWorld WCF service entirely by hand and how to make Visual Studio host it in IISExpress, but this is so simple, once you know where to look, that I think I'll just point it out.

 

Scenario 1: Web Application

Assuming you have a Web Application in Visual Studio.  When you hit F5, it fires up the ASP.NET Development Server.  To change that to use IISExpress, open the project properties window.  With WebMatrix installed along with SP1 (I'm using Beta as of this post), you'll see the option to use IISExpress:

 Scenario 2: Web Site

Assuming you have a Web Site in Visual Studio, there's a couple ways you can configure it to be launched using IISExpress.

  1. From Publish Web Site
    1. Right-click the project and select "Publish Web Site."
    2. Under Target Location, click the […] button.
    3. Select the "Local IIS" button on the left. IIS Express Sites shows up there, and you can select which vdir to use, or use the "Create new site" button at the top right to make a new one.
  1. From "Use IIS Express…"
    1. Right-click the project and select "Use IIS Express…" Click Yes and OK on the dialogs that follow:

Comments

  • Anonymous
    January 13, 2012
    Thanks, saved me the time to figure this out!