How to enable tracing in MVC

Introduction

Tracing is way to show diagnostic information about a single request for an ASP.NET Page. According to msdn article , ASP.NET tracing enables you to follow a page's execution path, display diagnostic information at run time, and debug your application. (http://msdn.microsoft.com/en-us/library/bb386420.ASPX )

Steps to follow how to enable tracing in MVC

Step-1: Open Web.config file
Step-2:  Enable tracing so add <trace> tag  which is inside in  <System.Web>

<system.web>
    <trace enabled ="true" pageOutput ="false"/>

</ system.web>

Step-3:  IgnoreRoute("{resource}.axd/{*pathInfo}") method create a trace file with .axd extension(This method is available in RouteConfig.cs file)

Step-4: Run your application
Step-5: Open trace.axd file in url

How to enable tracing in MVC




How to enable tracing in MVC How to enable tracing in MVC Reviewed by Jacob Lefore on October 07, 2013 Rating: 5

No comments