Programming Examples

Are you a Programmer or Application Developer or a DBA? Take a cup of coffee, sit back and spend few minutes here :)

ASP 4.0 – Turning ON Debug | Lab #002

ASP.Net Debug and Trace

In ASP.Net, one can enable debug and tracing via the Web Configuration file. Debug will enable web application debugging and tracing will enable generating the diagnostic information about web requests. In this Lab, we will see how to enable Debug and Tracing using Asp.Net Web Configuration Tool.

1: Run Visual Studio 2010 as Admin

When you start the Visual Studio, run it as an administrator. Follow these steps:

1) From the Start Menu Navigate to Visual Studio 2010 Menu Item and right click on it.
2) Then pick the option ‘Run as Administrator’.

Setp 1 - Run Visual Studion 2010 as Admin
Setp 1 – Run Visual Studion 2010 as Admin

These steps will launch Visual Studio in Administrator Mode. This will help us in making the configuration changes smoothly.

2: Asp.Net Configuration Tool

ASP.Net Configuration tool will help in editing the web.config file. All website configuration settings stay in the xml-based web.config file. Now, we will edit this file using the built-in config tool.

1) Click on the Menu Website to open the menu items.
2) Then pick the menu item named, ‘ASP.NET Configuration’. This will open your default browser to display the config tool.

Step 2 - Open ASP.Net Configuration
Step 2 – Open ASP.Net Configuration

3: Turn ON Debug & Trace

1) From the displayed Web Site Administration Tool, click the Application tab. You can see settings in different sections.
2) Move to Debugging and Tracing section, then click on the Configure option.
3) From the displayed UI, you can turn on Debugging and Tracing by checking the relevant check boxes. In the below screen, we enabled only the debugging option. After this step, you can click on the back button to go back to the main screen.
4) Quit the Browser session and Click on the Visual Studio 2010.

Step 3 - TurnOn Debug For ASP.Net
Step 3 – TurnOn Debug For ASP.Net

4: Check the Web.Config File

  1. Once you come out of ASP.Net Config tool, Visual Studio informs you that the configuration file is changed. Accept the changes and double click to open the web.config file.
  2. In the config file, you can see the debug configuration added by the ASP.Net Web Config tool.
Step 4 - Web.config Modified with Debug Setting
Step 4 – Web.config Modified with Debug Setting

Categories: ASP 4.0

Tags: ,

Do you like this Example? Please comment about it for others!!

This site uses Akismet to reduce spam. Learn how your comment data is processed.