Thursday, December 20, 2007

Tips & Tricks: Start-Up Options and Instances of ASP.Net Development Server in a Multi-project Solution

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:

image 

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:

image

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

Edit & Continue feature for Web Application Projects (WAPs)

 

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:

image

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

image

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

Workaround: Debugging Global.aspx.cs with ASP.Net Web Server within Visual Studio

 

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

image

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

image 

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:

image

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

image

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

Hope this helps...

Our team Visual Web Developer is hiring...

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.

Here are links to our current openings:

To submit your interest in any of these positions, please email -- vijoshi-at-microsoft-dot-com -- with an attached resume.

Sunday, December 09, 2007

ASP.Net 3.5 Extensions just released

 

We just released ASP.Net 3.5 Extensions on Microsoft Download Center... This release includes preview of following technologies:

  • ASP.NET MVC
  • ASP.NET Dynamic Data
  • Silverlight controls for ASP.NET
  • ADO.NET Data Services
  • Entity Framework runtime, and
  • New features for ASP.NET AJAX.

You can download ASP.Net 3.5 Extensions from below:

http://www.microsoft.com/downloads/details.aspx?FamilyId=A9C6BC06-B894-4B11-8300-35BD2F8FC908&displaylang=en


I will blog about many of these technologies in time to come...
you can also find more interesting links on the release on Brad Abrams blog @ http://blogs.msdn.com/brada/archive/2007/12/09/the-wait-is-over-asp-net-3-5-extensions-preview-posted.aspx

Thursday, December 06, 2007

PDC 2008 is announced

PDC which was earlier slotted for Oct 2007 was moved to Oct 2008 and is planned in LA Convention Center from Oct 27th to Oct 30th 2008... More information can be found below:

http://msdn2.microsoft.com/en-us/events/bb288534.aspx

Saturday, December 01, 2007

Web Deployment Projects for VS 2008 Dec 07 CTP Released

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 have created a blog post on our team blog which talks more about this release... You can click here to view the post (http://blogs.msdn.com/webdevtools/archive/2007/12/01/web-deployment-projects-wdp-for-visual-studio-2008-december-2007-ctp-released.aspx)...

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