The ASP.NET development server is a very useful tool but now and then I find that I need to use a service or website that I’m developing in another solution than in the one I’m working in. I found that it is easiest just to add the instances of often used services and websites to the external tools list in Visual Studio.

To do this go to the Tools menu in Visual Studio and click on External Tools.
Then click the Add button to add a new item. Give it a title and enter as a command the following:

C:\Program Files (x86)\Common Files\microsoft shared\DevServer\10.0\WebDev.WebServer40.EXE

The path may differ depending on your windows version and installation. I’m using Windows 7 with Visual Studio 2010.
The arguments should be:

/port:XXXXX /path:SSSSS /vpath:/

Where XXXXX is a port number used for the development web server and SSSSS is the web server / web service path. The /vpath points to the application root of the service or site

For instance:

/port:21000 /path:C:\Sources\MyProject\WcfHost /vpath:/

Now you can start the service from any solution and you don’t need to keep the solution in which the service or site is made open. Just remember at some point to stop the development server again because it will not stop automatically by closing Visual Studio.

Tags: , ,

Leave a Reply