This is possible, and is done a different way depending on whether the application is set up as a "Web Site Project" or a "Web Application Project" in Visual Studio 2010.
For a Web Application Project:
Right click on the project file in question, and open 'Properties'.
There, go to the 'Web' tab, and change the Start Action to 'Don't open
a page. Wait for a request from an external application.' This will
prevent it from spawning a page automatically, although you can still
manually go to the page to debug it.
answered Dec 23 '11 at 0:09 Brisbe42 https://superuser.com/users/8627/brisbe42
For a Web Site Project:
In VS2010, right click on the project node in the Solution Explorer
then press Property Pages on the context menu. Alternatively, simply
press Shift + F4 to open Property Pages. Then press Start Options on
left menu and select the "Don't open a page..." radio button.
Answered by: Daniel Macias https://superuser.com/users/113770/daniel-macias
I'd like to mark both Daniel and Brisbe42 as having the correct answer. Perhaps the Meta can help sort this out. So here's their answers both included in one answer - both are correct, depending on context.