Thursday, December 20, 2007

If you have more than one project in your solution you can use following options of solution properties to set your start up actions... You can get the below dialog by right clicking your solution and going to its properties:

If you have more than one Web project (either Web Site, WAPs or both) in your solution and choose to start only one of it, you can do so by setting "Single startup project" above (or also via Project context menu "Set as StartUp Project" in solution explorer)... Although, even after doing so when you start debugging your application using ASP.Net Development Server you will see multiple instances of ASP.Net Development Servers in your system tray as shown below:

There is an important point to note here that a single instance of ASP.NET Development Server cannot handle more than one Web Application/Site... Ideally if you need this kind of functionality you should be using IIS for your debugging instead of ASP.NET Development server...

There are instances when you might have many web applications or web sites in the same solution and you may be actually debugging only one of them... In such scenario it might not be desirable to have multiple instances of ASP.NET Development Server running... VS provides an explicit setting in the property grid of web application/site called Development Web Server - "Always Start When Debugging" which is set to True by default... If you set this Property to be False only one web server instance will be created for the start up web project...

You might want note that in that same debug run, you will not be able to debug any other non-IIS based Web Application/Site in the solution who has this property set to "False"; but if you really want to debug just one application at a time you may not have to worry about it anyway...

Wednesday, December 12, 2007

There is Edit & Continue functionality available for WAPs... Although we have disabled it by default as it may potentially have debug performance impact due to the fact that we have to recycle the ASP.NEt Web Server process every time for this functionality to work...

Although I think the performance hit is not as big to let go of not using the feature... I would recommend that you go and try it out by checking the Edit & Continue checkbox in your Web section of Property Pages as below:

But also do note that this property in addition to your tools options Edit & Continue should be checked otherwise the feature won't work...

Also note that if you are in web development profile you will have to check "Show all settings" in the bottom of the Tools--> Options windows within Visual Studio...

When you add a global.asax file to your "Web Application Projects (WAPs like below:

and then write code in Application_Start event and try to debug it like below using Visual Studio inbuilt Web Server

Then during your first debug the breakpoint is hit but during your subsequent debug runs the breakpoint is not hit.

The reason behind this is that we do not kill the ASP.Net Web Server process after your every debug run and hence Application_Start() is not fired every time. There is a good reason why we do so... Starting ASP.Net Web Server process is an expensive task and in most of the scenarios recycling this process after every debug would adversely impact your performance... If you do not want to debug your Application_Start() method then probably you do not need to have the process restart and save performance most of the time...

However if you would like to have the breakpoint hit you have few easy workarounds... One of the workaround is that you stop the web server from your system tray as in the figure below:

Alternatively you can go to your property pages of your web application and enable Edit & Continue like shown below:

When you choose Edit and Continue then we recycle the ASP.Net Web Server process on every debug run (it is needed for the Edit & Continue functionality to work)... This way although you will see very marginal degrade in your performance you will still be able to debug your Application_Start() methods...

The Visual Web Developer team is looking for a few talented and experienced invididuals to join our team. We have opportunities in development, testing, and program management. Our team builds Visual Studio features that enable creating applications for ASP.NET, IIS, Silverlight and Sharepoint.

Saturday, December 01, 2007

Today after more than two months of effort our team released the Dec 07 CTP of Web Deployment Projects (WDP)... We were receiving one or more requests nearly every week since last few months to have WDP out for Orcas so I am sure that this release will enable a tons of web developers to adopt VS 2008 and use the latest and greatest features that come along with...

I want to mention that we have a great team in Visual Studio Web Developer... Honestly, the team rocks, often time we never know who make these technologies happen and so to name a few those people are Wendy Wei, Alison Lu, John Dundon, Tim McBride, Bill Hiebert, Anna Lidman, Bradley Millington, Bradley Bartz, Omar Khan and others... Hope you enjoy the release...

I will keep posting other tips and tricks around WDP on this blog in the weeks to come so do visit once in a while...