ASP.NET

1. ASP.NET Introduction 2. Comp of .Net Framework 3.5 3. Sys.Req for VS 2008 4. ASP.NET Envrmnt Setup 5. VS2010 Ultimate Sys.Req 6. Installing VS 2010 7. VS 2012 Sys.Req 8. Installing VS Exp 2012 9. Start the VS 2008 10. Application Life Cycle 11. Page Life Cycle 12. Page Life Cycle Events 13. ASP.NET Example 14. Event Handling 15. Default Events 16. Server Side 17. Request Object 18. Response Object 19. Server Controls 20. Server Controls Properties 21. Server Controls Methods 22. HTML Server Controls 23. Client Side 24. ASP.NET Basic Controls 25. TextBox Control 26. CheckBox Controls 27. RadioButton Controls 28. ListBox Control 29. HyperLink Control 30. Image Control 31. BulletedList Control 32. ASP.NET Directives 33. Implements Directive 34. Master Type Directive 35. Page Directive 36. PreviousPage Type 37. Managing State 38. Control State 39. Cookies 40. Query Strings 41. Server-Side State 42. Session State 43. Validation Controls 44. Required FieldValidator 45. Range Validator 46. Compare Validator 47. RegularExpressionValidator 48. Custom Validator 49. Validation Summary 50. Data Source Control 51. AdRotator Control 52. Calendar Control 53. Calendar Control Example 54. Panel Control 55. Panel Control Example 56. Multi Views Control 57. MultiView & View controls 58. MultiView Control Example 59. FileUpload Control 60. FileUpload Control Eg 61. AJAX Control 62. UpdatePanel control 63. UpdateProgress Control 64. Custom Controls 65. Custom Control Eg 66. Personalization 67. Create Simple Profile 68. ADO.NET 69. ADO.NET Objects 70. DataTable 71. DataRow 72. DataColumn 73. Object Example 74. Error Handling 75. Tracing Errors 76. Debugger 77. Security 78. Authentication 79. Authorization 80. LINQ 81. LINQ Query Operators 82. LINQ Example 83. Caching 84. Data Caching 85. Output Caching 86. Object Caching 87. Web Services 88. Create Web Services Eg 89. Web & Machine.config 90. Settings Schema 91. ASP.NET Deployment 92. XCopy Deployment 93. Web Setup Project 94. ASP Interview Part 1 95. ASP Interview Part 2 96. ASP Interview Part 3 97. ASP Interview Part 4 98. ASP Interview Part 5 99. ASP Interview Part 6
Pr.Pg Next Pg

Tracing Errors tutorials

  • ASP.NET tracing enables you to view diagnostic information about a single request for an ASP.NET page. ASP.NET tracing enables you to follow a page's execution path, display diagnostic information at run time, and debug your application.

  • ASP.NET tracing can be integrated with system-level tracing to provide multiple levels of tracing output in distributed and multi-tier applications.

  • Debugging an application by using the Visual Studio .NET debugger is a great way to track down problems; however, there are many scenarios in which things happen too quickly to follow interactively or in which you simply need to know the sequence of events that lead to a problem before the problem occurs.

  • Tracing is an alternative to using a debugger to step through each line of code as your application executes. You can configure ASP.NET tracing by using two methods: pagelevel tracing and application-level tracing. Both types of tracing provide similar results; however, the difference is in how you access the results for each approach.

  • Page-level tracing provides trace details on the ASPX page when it completes executing, and application-level tracing stores the details of the trace in a file called (by default) trace.acx, which is located in the same directory as the ASP.NET application you can view the file by using your browser.

  • When you enable tracing, which is disabled by default, ASP.NET records detailed information about the page request, trace messages, control information, cookies, header information, the contents of any form fields, and a raw output of the contents of server variables (like CONTENT_TYPE and HTTP_REFERRER).

  • Enable page level tracing: to enable page level tracing, you need to modify the page directive and add trace attribute wich is shown in below:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs"

Inherits="errorhandling._Default" Trace ="true" %>

  • The following table shows a fragment of a trace output from a simple ASP.NET page.

Category

Message

From First(s)

From Last(s)

aspx.page

Begin Init

 

 

aspx.page

End Init

0.000096

0.000096

aspx.page

Begin LoadViewState

0.000189

0.000092

aspx.page

End LoadViewState

0.000308

0.000119

aspx.page

Begin ProcessPostData

0.000393

0.000085

aspx.page

EndProcessData

0.000551

0.000158

 

  • Example:The below Example Shows Tracing the errors of a pages.

The aspx code of TracingError.aspx is:

 

 

Following example shows the use of ASP.NET Tracing the Error:

Sam Sir

 

<%@ Page Language="C#" CodeFile="TracingError.aspx.cs" Inherits="TracingError" Trace="true" AutoEventWireup="true"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

<title> cbtSAM ASP.NET Tracing the Error Example</title>

<style type="text/css">

.style1

{

width: 100%;

}

</style>

</head>

<body>

<form id="form1" runat="server">

<table class="style1">

<tr>

<td>

&nbsp;</td>

<td>

Tracing the Page:<br />

</td>

</tr>

<tr>

<td>

User Name:</td>

<td>

<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>

</td>

</tr>

<tr>

<td>

Password:</td>

<td>

<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>

</td>

</tr>

<tr>

<td>

&nbsp;</td>

<td>

<br />

<asp:Button ID="Button1" runat="server" Text="Button" />

</td>

</tr>

</table>

<div>

</div>

</form>

</body>

</html>

Output

asp.net tracing error page example

 

Pr.Pg border                                              Next Pg