Wednesday, August 12, 2009

Fix-It: Multiple instances of Visual Studio Development server getting created

Sometimes while developing some of you might notice a lot instances of Visual Studio Development Server (aka Cassini) in your system tray… Many of these icons when clicked on land up just vanishing away and at times these icons may flood the system tray causing frustration…  Sorry for that :-(

One of the reasons for this happening is that ASP.NET Development server is set up to use dynamic port allocation as shown below:

WAP (Right Click Project –> Properties –> Web)

Auto-assign Port

Web Sites (Select Web Sites –> F4 to see properties)


Sometimes on some developer boxes either Windows firewall or custom firewall blocks a bunch of ports… In this situation Web Development Server tries to hook to one of the blocked ports port and is not allowed to… In the process the Development Server lands up crashing… Next time it tries to assign itself to another dynamic port and the same thing happens…  As a result there are various tray icons created even though the Web Development Server exe has actually crashed…  That is the reason when you hover over the icons in the system tray they vanish away…

Firstly, let me call out that this is a bug, I just verified it with our key dev Bill Hiebert and he confirmed that this is now fixed in VS 2010…  For the time being the work around for

VS 2008 developers is to go ahead and turn off the Auto-assign Port/Use Dynamic ports option and actually set a fixed port which you know is not blocked by one of your firewalls…  Hopefully with this the multiple icons in the system tray should no longer appear…

If you still face problem then do write back…



shiva said...

I recently started working on Vista. Every time I try to right-click and run the web service, it gives me "unable to connect to development server" error. my web app proj has specific port and am using vs dev server.

Vishal R Joshi said...

Hi Shiva,
I am sorry you are facing this... It seems like the port that you are trying to use might be already used by something else... I do not know what other applications might be there on you box which might consume port numbers... Can you try to change port number or restart your project or choose auto assign port and try again... I am guessing one of these things will probably work...