Senin, 07 Oktober 2013

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




Tidak ada komentar:

Posting Komentar