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?

Gravatar

# re: Disable Development Web Server when attatching to process, Posted by fur boots on 10/5/2010 3:07 PM

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.

Gravatar

# re: Disable Development Web Server when attatching to process, Posted by snow boots for women on 10/8/2010 8:25 AM

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

Gravatar

# re: Disable Development Web Server when attatching to process, Posted by columbia jackets on 10/19/2010 1:11 PM

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.

womens snow boots | columbia sportswear | cheap makeup | cheap north face jackets

Gravatar

# re: Disable Development Web Server when attatching to process, Posted by 40th birthday party on 4/29/2011 7:45 AM

This article will give you the basic understanding of Debugging ASP.NET Application that is hosted on Local Server, along with Process selection among multiple processes.
40th birthday party

Gravatar

# jeep cherokee xj, Posted by drivetrainsuperstore on 6/13/2011 10:59 AM

Driveline manufacturing and repair facility in Las Vegas as well as a large four bay automotive differential and drivetrain shop with expert mechanics on staff. We also have the capability to work on large motorhomes and heavy-duty vehicles.<a href= http://www.drivetrainsuperstore.com">gear vendors overdrive

Gravatar

# re: Disable Development Web Server when attatching to process, Posted by shantec on 12/7/2011 11:06 PM

I didn't like the modify solution/project approach, so I figured out a local "hack".

-Create a c# empty console application project with no other code in Main().

-Change the project properties to "Windows Application" output type to suppress the console window.
-build the .exe
-copy .exe to ~\microsoft shared\DevServer\10.0, and rename it to "WebDev.WebServer40.exe" (for .NET 2.0 create a copy of the dummy .exe as WebDev.WebServer20.exe).

Debug your codes and enjoy the performance! This is also a bonus fix to the random visual studio unit test debugging timeout exception.

Comments

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