Loupe - Log - Monitor - Resolve
Loupe / Getting Started / Using Loupe with ASP.NET MVC / Using Loupe with ASP.NET - Optimizing your Experience
In This Topic
    Using Loupe with ASP.NET - Optimizing your Experience
    In This Topic

    Configuring the Product, Application and Version

    With ASP.NET applications the Agent can't reasonably determine a useful Product, Application and Version to categorize the sessions with so it is highly recommended that you configure them explicitly in the web.config file.  If not, it will use a default product name of ASPNET and the virtual directory name for the web site as the Application name.  Likewise, there is no lead assembly to automatically pull file version information from so the version will be left as 0.0 by default.

    Because of the nature of ASP.NET WebForms applications it is not recommended that you attempt to configure Loupe through code by intercepting the Initializing event.  Instead, stick with configuration in the Web.Config file.  For ASP.NET MVC applications where you are not using the Loupe Agent for ASP.NET WebForms you can use the Initializing event or web.config

    How Loupe Creates Sessions

    The Loupe Agent defines a session as matching the lifespan of a single Application Domain.  Each time the IIS App Pool closes after inactivity or recycle after a certain number of requests that will end the current Loupe session.  You can configure how often this is using the IIS Administration tool.  This behavior will get a sense of how often your application is recycling and why (the last message recorded by the Loupe Agent for ASP.NET indicates why the session is ending). 

    Accessing Session Data

    You can always perform analysis right on the web server using the Loupe Desktop, but in most environments you'll want to send the data to a Loupe Server so you can dig deep.

    Loupe Desktop will only access session files that are closed.  To access a running session (like a web site that is still running in the web server) use the Live Sessions feature to view web sites running locally or, in concert with Loupe Server you can view remote sessions live.  Using the Live Sessions feature you can cause the current log file to roll over so it can be immediately viewed.

    For more information on all of the different ways you can package up data for analysis, see Developer's Guide - Packaging and Sending Data

    Record Extended Application User Information

    If your web site authenticates users you can record additional information about each user such as their full name, contact information, and organization.  To do this, subscribe to the ResolveApplicationUser Event and populate an ApplicationUser from your user identity information.  For more details, see Developer's Guide - Capturing Application Users.

    Getting Sessions from your Web Site

    Using Loupe Server

    We recommend you enable the Auto Send Sessions option which will in turn implicitly enable Auto Send On Error.  This will automatically send to the server the latest session information from your application every time there is an error (subject to a 5 minute safety interval which prevents the server from sending frequently when a server is experiencing many errors)

    Without Loupe Server

    Until the web site recycles the session data will stay on the server unless it is packaged from within the web site process itself.  It's a best practice to do two minor code additions within your web site:

    1. Subscribe to the MessageAlert event to automatically submit session data when there's an error.
    2. Add to the administration section of your web site an option to call the Packager class in the Agent to send your session data to where you do administration tasks. 

    For more information on how to do this see Developer's Guide for ASP.NET - Submitting Sessions on Error.

    See Also