VS2008 Web Server Here Shell Extension

code 0 comments suggest edit

UPDATE: Updated the registry settings per James Curran’s comment. Thanks James!

One of the most useful registry hacks I use on a regular basis is one Robert McLaws wrote, the “ASP.NET 2.0 Web Server Here” Shell Extension. This shell extension adds a right click menu on any folder that will start WebDev.WebServer.exe (aka Cassini) pointing to that directory.

Webserver-Here

I recently had to repave my work machine and I couldn’t find the .reg file I created that would recreate this shell extension. When I brought up Robert’s page, I noticed that the settings he has are out of date for Visual Studio 2008.

Here is the updated registry settings for VS2008 (note, edit the registry at your own risk and this only has the works on my machine seal of approval).

32 bit (x86)

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\VS2008 WebServer]
@="ASP.NET Web Server Here"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\VS2008 WebServer\command]
@="C:\\Program Files\\Common Files\\microsoft shared\\DevServer
\\9.0\\Webdev.WebServer.exe /port:8080 /path:\"%1\""

64 bit (x64)

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\VS2008 WebServer]
@="ASP.NET Web Server Here"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\VS2008 WebServer\command]
@="C:\\Program Files (x86)\\Common Files\\microsoft shared\\DevServer
\\9.0\\Webdev.WebServer.exe /port:8080 /path:\"%1\""

For convenience, here is a zip file containing the reg files. The x64 one I tested on my machine. The x86 one I did not. If you installed Visual Studio into a non-standard directory, you might have to change the path within the registry file.

Technorati Tags: Tips,Registry,Visual Studio,Web Server

Found a typo or error? Suggest an edit! If accepted, your contribution is listed automatically here.

Comments

avatar

15 responses

  1. Avatar for James Curran
    James Curran June 24th, 2008
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\VS2008 WebServer]
    @="ASP.NET Web Server Here"


    NoNoNoNo...
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\VS2008 WebServer]
    @="ASP.NET Web Server Here"
    Unless you really want it displaying on Control Panel and Printers and Network Neighborhood.

  2. Avatar for Dragan Panjkov
    Dragan Panjkov June 24th, 2008

    This one is excellent one! You should've post that seal like Hanselman did on his blog :)

  3. Avatar for Scott Galloway
    Scott Galloway June 24th, 2008

    Very nice indeed!

  4. Avatar for Egil Hansen
    Egil Hansen June 24th, 2008

    Eff... sweet! Great work.

  5. Avatar for Storm
    Storm June 25th, 2008

    hmmm, I have no words to describe the feelings I have right now. Suffice to say I am in awe. I've been wondering about this very topic for over a year now though it's never been a priority to actually google it.
    Many thanks!

  6. Avatar for Tuna Toksoz
    Tuna Toksoz June 25th, 2008

    cmd /c start /D"C:\Program Files (x86)\Common Files\microsoft shared\DevServer\9.0\" Webdev.WebServer.exe /port:%%random%% /path:"%1"
    It assigns a random port for the webserver. The only drawback so far is you see command prompt momenratily when you click "ASPNET WebServer here" extension.

  7. Avatar for Tuna Toksoz
    Tuna Toksoz June 25th, 2008

    Windows Registry Editor Version 5.00
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\VS2008 WebServer]
    @="ASP.NET Web Server Here"
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\VS2008 WebServer\command]
    @="cmd /c start /D\"C:\\Program Files (x86)\\Common Files\\microsoft shared\\DevServer\\9.0\\\" Webdev.WebServer.exe /port:%%random%% /path:\"%1\""
    and here is the registry changes for 64 bit

  8. Avatar for Storm
    Storm June 25th, 2008

    Isn't there a good chance that it may then grab a port already in use?

  9. Avatar for Tuna Toksoz
    Tuna Toksoz June 25th, 2008

    @Storm Unfortunately, there is. I may write the piece of command to generate random numbers between 100 and 65535 but there is still possibility to grab a port already in use. But at least it will work most of the time :)

  10. Avatar for ado.net programming
    ado.net programming July 2nd, 2008

    port:%%random%%
    excellent! as you say "work most of the time" and that's good enough for me. Thanks

  11. Avatar for Mark Wisecarver
    Mark Wisecarver July 3rd, 2008

    I can't believe this works so well on Vista but it does. :-)
    One thing...Anyone have a fix for the Image resizing?
    Running Cassini this way VS. with VS2008 distorts image sizing.

  12. Avatar for Moudey
    Moudey January 21st, 2009
  13. Avatar for Karcianki
    Karcianki January 19th, 2010

    Thanks for this useful tips and the zip package:) I'm just a noob but I read a lot of your post and it solves many of my problems:) Thanks for such a great blog!

  14. Avatar for jenny
    jenny June 5th, 2010

    Cool, thanks for the tips
    - Jenny

  15. Avatar for Pogoda
    Pogoda November 22nd, 2010

    Thanks for this registry update :) I tried the x86 version and it works fine on WinXP SP3 :)