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.
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.
