Disable Development Web Server when attatching to process

After I reinstalled my computer to use Windows 7 my Visual Studio 2008 began to start the Cassini development server included in Visual Studio 2008.
This has been annoying me for quite some time, not that it’s any problem just that it gets started by default without me asking for it.

So I went and disabled it. I did it by formatting the ProjectName.csproj.user file. This file is meant to work as the web.config and machine.config files, where the machine.config has all settings but they are overridden by the settings that match in the web.config file, where the csproj.user being the equivalent to the web.config file. 
The way to do it It’s not that intuitive, it may be easier ways but here is a step by step of how I did it.

To do this from Visual Studio you first have to unload your project to be able to look at your project file.

UnloadProject

Then go way to the bottom of the file until you find the <WebProjectProperties> </WebProjectProperties> element. Copy the contents of it.

Open your ProjectName.csproj.user file, this is only needed if you are working in a project shared by several developers and don’t want them to get your settings also.

Paste the part that you copyed from the ProjectName.csproj file into the corresponding <WebProjectProperties> </WebProjectProperties> element. In my case it’s the

<AlwaysStartWebServerOnDebug>False</AlwaysStartWebServerOnDebug>
<EnableWcfTestClientForSVC>False</EnableWcfTestClientForSVC>
<UseIIS>False</UseIIS>
<AutoAssignPort>False</AutoAssignPort>
<DevelopmentServerPort></DevelopmentServerPort>
<DevelopmentServerVPath></DevelopmentServerVPath>
<IISUrl></IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>True</UseCustomServer>
<CustomServerUrl>http://localhost/</CustomServerUrl>

The part to take notice of here is the <AlwaysStartWebServerOnDebug>False</AlwaysStartWebServerOnDebug>. Here you want the value to be set to False.
If that doesn’t work try setting the <UseCustomServer> to True and point at your localhost url or the path you have set as your host name.

There are other ways people have done this but from the projects property window, but that window does not have the setting for disabling the dev. server while debugging.

image

Print | posted on Tuesday, September 01, 2009 11:07 AM Filed Under .NET developement

Comments

Gravatar

# re: Disable Development Web Server when attatching to process, Posted by gioco del casinò online on 4/6/2010 1:27 PM

A good navigation menu will help users access necessary information quickly and easily.the eye-catching look, it will increase the performance.

Gravatar

# re: Disable Development Web Server when attatching to process, Posted by Ori Peleg on 7/19/2010 9:30 AM

Awesome! Been looking for this for a while, but now I know how to disable that awful web server auto-start.

Gravatar

# re: Disable Development Web Server when attatching to process, Posted by Ori Peleg on 7/19/2010 9:35 AM

BTW - you should make your twitter id easier to find on your log, easier to give you credit. It's @kallehoppe, right?

Comments

Title: *
Name: *
Email: (never displayed)
Website:
Comment: *  
Please add 6 and 1 and type the answer here: