Thursday, December 02, 2010

Web Server Startup Vs. Starting a project for debugging

We recently had an interesting thread within our Web Platform & Tools team on a blog comment which I thought I would share verbatim so that it would resolve similar confusion that might exist in the community… :

To gain more context please read the following tiny blog post otherwise it is quite likely that you will not follow anything discussed on the email thread here J

Tips & Tricks: Startup Options & Instances of ASP.NET Development Server  in a Multi-project solution.

The below email thread is to shed light on behind the scene activities that happen within MSFT on many comments that are posted on many blogs. It is demonstrate that many of the responses on my blog are only feasible due to team effort across the board… J.

The thread is displayed in FIFO model (unlike standard outlook view) to help easy blog readability…

From: Anonymous [mailto:noreply-comment@blogger.com]
Sent: Monday, October 25, 2010 2:54 PM
To: Vishal Joshi
Subject: [Vishal Joshi's Tangent] New comment on Tips & Tricks: Start-Up Options and Instances of A....

Anonymous has left a new comment on your post "Tips & Tricks: Start-Up Options and Instances of A...":
I really wish this default were "false". I have never had a case where I want all 10 web projects in our solution to start at once ... and every time I have to do a new checkout I have to go turn all of these settings off. Sadly, VS2010 did not fix this ... we are still saddled with this unfortunate behavior.

From: Vishal Joshi
Sent: Monday, October 25, 2010 2:55 PM
To: ASP.NET Web Projects Team

Subject: FW: [Vishal Joshi's Tangent] New comment on Tips & Tricks: Start-Up Options and Instances of A....

Fyi…

Vishal R. Joshi | http://vishalrjoshi.com | @vishalrjoshi

From: MSFT Web Guy 1

Sent: Monday, October 25, 2010 3:14 PM
To: Vishal Joshi; ASP.NET Web Projects Team
Subject: RE: [Vishal Joshi's Tangent] New comment on Tips & Tricks: Start-Up Options and Instances of A....

I don’t think that we are using those settings. For instance I just created a solution with 2 WAP, when I F5 both startup, which I think is good because many times people have a services that are consumed by other projects, and that UI is little known.

The issue that I’m seeing here is that if I explicitly go in and configure the startup projects in the UI the settings are not used. I would say this is a bug.

Thanks,

From: MSFT Web Guy 2
Sent: Monday, October 25, 2010 3:51 PM
To: MSFT Web Guy 1; Vishal Joshi; ASP.NET Web Projects Team
Subject: RE: [Vishal Joshi's Tangent] New comment on Tips & Tricks: Start-Up Options and Instances of A....

Huh?

From: MSFT Web Guy 1
Sent: Monday, October 25, 2010 4:46 PM
To: MSFT Web Guy 2; Vishal Joshi; ASP.NET Web Projects Team
Subject: RE: [Vishal Joshi's Tangent] New comment on Tips & Tricks: Start-Up Options and Instances of A....

The settings in this dialog are not respected, both WAPs are started.

clip_image001

From: MSFT Web Guy 2
Sent: Wednesday, October 27, 2010 8:27 AM
To: Vishal Joshi; ASP.NET Web Projects Team
Subject: RE: [Vishal Joshi's Tangent] New comment on Tips & Tricks: Start-Up Options and Instances of A....

No. This is by design. This dialog indicates which projects are going to be debugged. The web property in WAP governs whether to start the web server on F5 for projects which are NOT being debugged, is independent of the settings on this dialog. So with this configuration, WebApplication5 will attach a debugger to cassini, WebApplication6 will start its cassini but a debugger will not be attached to it.

The customer is complaining that the web property should be initialized to false so that only the startup project will launch its web server.

From: MSFT Web Guy 1
Sent: Wednesday, October 27, 2010 9:22 AM
To: MSFT Web Guy 2; Vishal Joshi; ASP.NET Web Projects Team
Subject: RE: [Vishal Joshi's Tangent] New comment on Tips & Tricks: Start-Up Options and Instances of A....

So can you explain the meanings of the three settings for action:

· None

· Start

· Start without debugging

clip_image002[4]

From: MSFT Web Guy 2
Sent: Wednesday, October 27, 2010 9:29 AM
To: MSFT Web Guy 1; Vishal Joshi; ASP.NET Web Projects Team
Subject: RE: [Vishal Joshi's Tangent] New comment on Tips & Tricks: Start-Up Options and Instances of A....

When user presses F5 do:

None  - don’t start this project

Start – debug this project

Start w/o debugging – do the equivalent of Ctrl-F5 for this project

Note that start w/o debugging is NOT equivalent to the web project flag of starting the web server. Do a ctrl-F5 and you will see why…

From: Vishal Joshi
Sent: Wednesday, October 27, 2010 10:24 AM
To: MSFT Web Guy 2; MSFT Web Guy 1; ASP.NET Web Projects Team
Subject: RE: [Vishal Joshi's Tangent] New comment on Tips & Tricks: Start-Up Options and Instances of A....

I see thanks for the clarification…  Based on the discussion it seems the customer is expecting the below property

clip_image003

to be false for all projects but Startup project… Would you agree?

Vishal R. Joshi | http://vishalrjoshi.com | @vishalrjoshi

From: MSFT Web Guy 2
Sent: Wednesday, October 27, 2010 10:30 AM
To: Vishal Joshi; MSFT Web Guy 1; ASP.NET Web Projects Team
Subject: RE: [Vishal Joshi's Tangent] New comment on Tips & Tricks: Start-Up Options and Instances of A....

That is what he is asking for, but I don’t necessarily agree. Assuming a typical solution only has a couple of webs in it, it probably makes sense that all the web servers are started on Debug\Ctrl-F5. Sounds like your blog post is misleading.

From: MSFT Web Guy 2
Sent: Wednesday, October 27, 2010 10:46 AM
To: Vishal Joshi; MSFT Web Guy 1; ASP.NET Web Projects Team
Subject: RE: [Vishal Joshi's Tangent] New comment on Tips & Tricks: Start-Up Options and Instances of A....

As a side note, you can multi-select all the waps (or web sites) in the solution, and change the property for all them in one go:

clip_image004[4]

---------------------------

 

END OF THREAD…:-)

Hope this was useful

-Vishal