The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Start monitoring an ASP.NET application or web site

Visual Studio 2013

Application Insights is in preview.

Add Application Insights to your application to monitor its availability, performance, and how people use it. You’ll be notified if it runs slowly or throws exceptions, or is unavailable. And you’ll be able to find out which features are most popular and which are difficult to use.

If you want to quickly diagnose the performance of a web application on an IIS server without rebuilding it, go to Monitoring a web application without updating the code.

But for the best experience, stay with this topic and add the Application Insights SDK into your application project. You need Visual Studio 2013. If you have the Ultimate or Test edition, you’ll be able to create more detailed availability tests.

Application Insights works with a variety of types of web services. If you want to apply it to other types of app, go to Monitor a Windows Store or Windows Phone app.

Caution note Caution

This is about the older version of Application Insights in Visual Studio Online. There’s a new version in Microsoft Azure.

How do I know which I’m using, and how do I choose?

The Application Insights Tools simplify some of the set-up.

  1. Open Tools, Extensions and Updates.

  2. Select Installed. If there is a version 2.* of Application Insights Tools, delete it. (The 2.* versions send data to the Azure version of Application Insights.)

  3. Select Online.

  4. Search on "Application Insights".

  5. Install Application Insights Tools for Visual Studio, version 1.*. (The 1.* versions send data to the Visual Studio Online portal.)

TOOLS, Extensions, Online, Application Insights

Everyone on your team should install the tools.

If you already have a C# or Visual Basic web application: Add Application Insights to the web app project.

In project context menu, Add Application Insights

If you’re creating a new C# or Visual Basic web application: Just create the new project the way you usually do. You’ll see some extra options in the New Project dialog. Make sure Add Application Insights is checked.

Create a project and select Application Insights

If you haven’t yet set up a Visual Studio Online account, or if you haven’t connected to your account yet, you’ll see some extra dialogs that help you do that.

If you are using Visual Studio 2012 add Application Insights SDK manually to your project.

  1. Run your application in debug mode (F5). Try some simple navigations between pages.

  2. In Solution Explorer, in the context menu of the web project, choose Open Application Insights portal.

    Project menu: Open Application Insights in Portal

    Your browser will open (after a security confirmation) on a dashboard that shows a tile like this:

    Data stream tile on the default dashboard

    Data from your application should show up within seconds. (If it doesn’t, take a look at Troubleshooting.)

  3. Click the tile for a more detailed view. Or at any time, you can go to DIAGNOSTICS, Streaming data and select your application.

    Debug data in DIAGNOSTICS, Streaming

    The Streaming page is used only in development, to verify that the right data is getting to Application Insights. Stream data is only shown when your active build configuration is set to Debug.

  4. After a few minutes, go to USAGE to see the first processed results. If you see a configuration page instead of data, wait a few minutes and refresh the page. Here’s an example page of first results:

    Refresh after a few minutes and select your app

Learn more about tracking usage.

Once you’ve coded your application, deploy it in the usual way, either to an IIS server or to Microsoft Azure Cloud Services. In Application Insights, you’ll be able to see how many people are using your app.

Choose Usage, Users, Active Users

Usually you set your solution’s build configuration to Release before publishing. In that case, data will no longer appear on the Streaming page.

  1. Availability Tests – Open the Availability page to set up tests that notify you if your website becomes unavailable or responds slowly.

  2. Monitor performance and exceptions – Watch how your application responds under load, diagnose any issues with resources, get stack traces if there are exceptions, and be notified of issues when they arise.

  3. Track web service events and metrics and Track web page events and metrics – insert lines of code to find out what your users do with your application.

  4. Organize your insights in dashboards

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft