Getting Virtual Server '05 R2 Working on IIS7 in Longhorn Server


With some nifty work and helpful insight, you can get Virtual Server 2005 working on Windows Server Code-named "Longhorn" just as I did this past weekend.  I took some time to also validate (i.e doc) what I was doing as to maybe help someone else out there who is trying the same darn thing.  The nice thing - I know a lot about IIS7 making it much, much easier than if someone doesn't.

I recently came up with this policy - "WENK" - which in the technology world fits right in as an acronym.  WENK (Weekends Equal No Work) is designed to let me spend time with family as well as do things I love like play with technology.  This weekend, while the wife was off at a horse show, I had time to start a migration from my existing dual core server to a more powerful dual core server for my home system (websites, email, sql, ad, etc.).

Off we go...

Are the IIS7 bits needed for Virtual Server installed?

Unlike any previous versions of IIS, IIS7 doesn't just come with every feature installed.  In IIS 6.0, we would install all the binaries on the box but used something called "Web Service Extensions" to turn on\off any feature that the user desired.  The default state (unlike IIS 5.0) was everything "off" equaling a simple static server out-of-box.

IIS7 introduces a all-new modular Web server where binaries aren't installed that aren't explicitly asked for.  This is the first challenge that will be faced to get your existing Web applications working in IIS7.  The hope is that many software Web application providers will take the necessary hit to ensure that their setup installs the binaries needed for their application.

I am not currently privy to the plans for the Virtual Server team so I didn't take time worrying about it.  The first thing that is helpful is knowing that Virtual Server 2005 is a CGI-based (VSWebApp.exe) application and as such we need to ensure we have the CGI binary installed.

To install the CGI binary, do the following:

  1. On your Longhorn Server Beta 3, open the Server Manager (Start - Administrative Tools - Server Manager)
  2. In the roles section, the Server Manager should display the following -


In the Role Sections, you should see a list of the features that are installed and not installed like the following:








    The basic process from this point forward is to installed the CGI feature which is really easy.  To add this functionality, simply check CGI under Application Development and click Install Now and away you go.  After completion, you should see the following in your Role Services with CGI showing installed -


    Getting Virtual Server Application Setup and Configured

    The goal here is to simply get your Virtual Server up and running - which this is where the rubber meets the road.  We will do the following in this section:

    1. Install the VSWebApp.exe CGI Handler
    2. Ensure that the appropriate authentication is setup for the Web application
    3. Add VSWebApp as Default Document 
    4. Validate that Virtual Server works

    Install the CGI for Virtual Server

    In this step, we will simply use the all-new IIS Manager to install the CGI application.  This is done using the 'Add Script Map' under the Handlers section.  The IIS Manager should look like the following -

    Let's add the CGI...

    1. In the Add Script Map form, add the following information -

    Request Path:  VSWebApp.exe

    Executable:  %programfiles%\Microsoft Virtual Server\WebSite\VirtualServer\VSWebApp.exe

    Name:  Virtual Server 2005

    You will receive a pop-up asking if you would like to add this Handler to the ISAPI & CGI restriction list and you should select Yes

    Enable Windows Authentication

    The next step was to enable Windows authentication to ensure that you can access the Web application using the Administrator credentials.  This is a crucial step otherwise you will get errors such as 'An error occurred accessing the website application data folder' and the event viewer area of the application will show 'You do not have permission to access the event viewer' because by default the Web application is accessed as the anonymous user.

    To save in brevity here, I will tell you that you need to ensure that you have Windows Authentication installed using the same steps above for CGI (Windows authentication is not enabled by default.)

    After confirming this, we need to disable anonymous authentication and ensure that Windows is the only authentication type enabled for the Virtual Server website.

    Enable by double-clicking Authentication while Virtual Server website is selected as shown in this screenshot -


     The final step is to ensure that only Windows is enabled which simply done by selecting Anonymous


    Add VSWebApp as the Default Document

    At this stage, you should have a working Virtual Server Web application.  You can validate this by doing entering the following into your IE address bar -

    The thing is that some of you might not realize that one nice thing done by the Virtual Server install on IIS 6.0 was to change the default document property to remove un-needed items and add the one important one.  In this case, VSWebApp.exe would be at minimum at the top of your list while you can also delete the entire list (e.g. <clear /> for <defaultDocument> section) if you so desire.  To do this, you can open Virtual Server website and use the Default Document feature and add to the textbox VSWebApp.exe.  The following shows an example of this configuration -


    This was my small, enjoyable task for this weekend as I have happily upgraded my home server to the latest greatest in hardware (Dual Core, DDR2, etc., etc.) and I wanted to move my current Windows Server 2003 R2 server serving as my Virtual Server hosting email, etc. to LHS Pre-Beta3.  It was a lot of fun figuring out how to get Virtual Server 2005 R2 working on LHS & IIS 7.0 and it wasn't easy but I managed.  I found some bugs along the way and I am going to re-validate this tomorrow again on another image I have so updates might be coming!  Either way, fun stuff...

    Next:  Upgrade Exchange 2007 to LHS and see if I can get Edge services (OWA, etc.) to work with IIS7


    The following will be helpful in getting up to speed with IIS7.  As part of the IIS team, I know where most of the resources are for learning IIS7 but I can't say the same for the Virtual Server team.  Thus, if you have good resources (like more detailed instructions than I provide in this blog) then send them on via comments.  I will certainly add them...

    Learning IIS7




    • please... how i install Virtual server 2005 R2 SP1 on Vista?

    • Hey hubertsvk,

      I just rebuilt this weekend (yes, for you :P) to see what would happen. I didn't have any problem on Vista as long as you stopped the Virtual Server services. Did you do this?

      Beyond that, I didn't have any problem...

    • Hey,
      Actually, I just checked and I did have a problem. SP1 beta2 basically rendered me broken in the console. I have no idea what they did and I didn't back track, but instead, simply re-intalled the R2 RTM bits and followed these instructions in this blog and had no problems. I would highly suggest waiting for RTM of the SP1.

      NOTE: I am using x64 builds and not x86 which potentially could be a breaking point (unsure)


    • I used these instructions and they *almost* worked. I get the web admin console to load but then it fails to connect to the virtual server. It gives an error message of "Could not connect to the Virtual Server on “servername”."

      Any ideas what could be blocking it from getting through? Is that using port 5900 or just port 1024?

    • Hey Paul,
      I was using the default port (1024) which the install took care of adding to the LHS firewall exception list. If you changed the default install port to say 5900 then my *guess* is that you should add a new inbound rule for 5900 - not sure if the setup.exe is smart enough to do this automatically.

      Have you tried this?

    • Hey I'm trying to follow this guide here and I keep getting stuck at the "Install the CGI for Virtual Server" step.
      I'm running IIS 7.0 on Vista Ultimate x64 and when I get the 'Add Script Map' box where I choose Yes, No or Cancel, I choose yes and get a msgbox with the following: There was an error while performing this operation. Details: Illegal characters in path.
      Any ideas?


    • Hey Jon,

      Can you possibly post the exact information you are putting into the Script Map form? Is it identical to what I listed above?

      Also...You might want to try VS 2005 R2 SP1 as it should "IIS7 enable" it. In the case above, the SP1 bits weren't released and this was causing failures. You can download SP1 for R2 here -

      If this doesn't work, then I will help you push through the manual steps.

    • Hi there,

      When the Windows Authentication is enabled, I am getting error "you do not have permission to view the Event Viewer", but when I enable the Basic athuntication only, I dont see that error. Can you suggest any solution
      OS - Windows Server 2008 (standard)
      IIS version - 7.0
      Virtual Server 2005 R2.

    • We would like to use the Windows Authentication as we are in the domain environment.....Any solutions??

    • We would like to use the Windows Authentication as we are in the domain environment.....Any solutions??

    Comments have been disabled for this content.