Deploying your MVC app and Monitoring Requests on IIS

Posted by: Suprotim Agarwal , on 5/31/2013, in Category ASP.NET MVC
Views: 48141
Abstract: A quick refresher of how to deploy ASP.NET MVC sites to IIS using Web Deployment Wizard and use the IIS request monitoring tool to nail down slow requests

IIS has built in monitoring tools that can be leveraged to monitor site performance and bottlenecks. Today we’ll deploy our code sample from the Async Await article I wrote some time back and see what kind of performance characteristics we can extract out of it.

This article uses Visual Studio 2012/2013.


Deploy an ASP.NET MVC App to IIS

Step 1: To get started, first thing we have to do is start Visual Studio in Administrator Mode.

Step 2: Now from the Solution Explorer right click and select “Publish Web Site”


Step 3: Select New Profile and give a name


Step 4: Next setup the Publish Method as Web Deploy, provide the server name, this can be a non-development system also; the Site Name, whether it’s the root site or a sub-site of the root site. Click Validate connection to validate.


The next two steps are optional and you can hit Publish here itself. But let’s walk through the steps.

Step 5: Here I have unchecked the ‘User this connection string…” checkbox. This runs an additional transform apart from the default deployment transform that is executed on web.config, web.debug.config etc.

Click next or Publish from here.


Step 6: If you click next, you get an opportunity to see the changes being deployed. For first deployment it’s everything, thereafter only the changes are deployed.


Once you hit Publish, monitor the Output Window till the Build Succeeded and Publish Succeeded messages appear.


Deployment successful.

Monitoring Long Running Requests with IIS

To monitor requests on IIS, start the IIS Manager. From the Run dialog you can type in inetmgr to launch it. Once up, select the root node of the Connection tree on the left and check if you have ‘Worker Processes’ under IIS installed


If not, use the Web Platform Installer to install it. Once installed, double click on it to go to Worker Processes frame.


Select the ‘View Current Requests’ link on the right or double click the correct application pool in the middle.  Navigate to the main application and watch the Requests grow. If you take a closer look, this is a first time load of jQuery, MiniProfiler and Modernizer libraries are loading, hence the issue.



Once the load is complete, refresh the browser, nothing is visible in Requests list because nothing is taking as much time anymore. To test again, reset IIS, reload browser and navigate again. Conversely, you can start load the website with one of the load testing tools around stressing out the APIs to check which one is a bottle neck on load.


We had a quick refresher of how to deploy to IIS using Web Deployment Wizard. Thereafter we saw how (to obtain and) use the IIS request monitoring tool to nail down slow requests. That’s a wrap for the day, we’ll investigate more administration tools in the coming days.

This article has been editorially reviewed by Suprotim Agarwal.

Absolutely Awesome Book on C# and .NET

C# and .NET have been around for a very long time, but their constant growth means there’s always more to learn.

We at DotNetCurry are very excited to announce The Absolutely Awesome Book on C# and .NET. This is a 500 pages concise technical eBook available in PDF, ePub (iPad), and Mobi (Kindle).

Organized around concepts, this Book aims to provide a concise, yet solid foundation in C# and .NET, covering C# 6.0, C# 7.0 and .NET Core, with chapters on the latest .NET Core 3.0, .NET Standard and C# 8.0 (final release) too. Use these concepts to deepen your existing knowledge of C# and .NET, to have a solid grasp of the latest in C# and .NET OR to crack your next .NET Interview.

Click here to Explore the Table of Contents or Download Sample Chapters!

What Others Are Reading!
Was this article worth reading? Share it with fellow developers too. Thanks!
Share on LinkedIn
Share on Google+

Suprotim Agarwal, MCSD, MCAD, MCDBA, MCSE, is the founder of DotNetCurry, DNC Magazine for Developers, SQLServerCurry and DevCurry. He has also authored a couple of books 51 Recipes using jQuery with ASP.NET Controls and The Absolutely Awesome jQuery CookBook.

Suprotim has received the prestigious Microsoft MVP award for Sixteen consecutive years. In a professional capacity, he is the CEO of A2Z Knowledge Visuals Pvt Ltd, a digital group that offers Digital Marketing and Branding services to businesses, both in a start-up and enterprise environment.

Get in touch with him on Twitter @suprotimagarwal or at LinkedIn

Page copy protected against web site content infringement 	by Copyscape

Feedback - Leave us some adulation, criticism and everything in between!
Comment posted by Chandan Kumar Panda on Monday, June 3, 2013 8:04 AM
Thanks Suprotim Agarwal.Very much helpful post.

I would appreciate you to post something about logging(errors) in ASP.NET - MVC with a complete demo.

will be waiting for your reply
Comment posted by vidhatafoils on Friday, June 7, 2013 8:00 AM
Thanks for sharing fabulous information.It' s my pleasure to read it.I have also bookmarked you for checking out new posts.