Professional Documents
Culture Documents
Tracing is actually the process of collecting information about the program's execution.
Debugging is the process of finding & fixing errors in our program. Tracing is the ability of an
application to generate information about its own execution. The idea is that subsequent
analysis of this information may help us understand why a part of the application is not
behaving as it should and allow identification of the source of the error.
We shall look at two different ways of implementing tracing in .NET via the
System.Web.TraceContext class via the System.Diagnostics.Trace and
System.Diagnostics.Debug classes. Tracing can be thought of as a better alternative to the
response.writes we used to put in our classic ASP3.0 code to help debug pages.
If we set the Tracing attribute of the Page Directive to True, then Tracing is enabled. The
output is appended in the web form output. Messeges can be displayed in the Trace output
using Trace.Warn & Trace.Write.
NOTE The only difference between Trace.Warn & Trace.Write is that the former has output in
red color. If the trace is false, there is another way to enable tracing. This is done through the
application level. We can use the web.config file and set the trace attribute to true. Here we
can set <trace enabled=false .../>
Note that the Page Directive Trace attribute has precedence over th application level trace
attribute of web.config. While using application level tracing, we can view the trace output in
the trace.axd file of the project.
The Authentication Provider performs the task of verifying the credentials of the user ans
decides whether a user is authenticated or not. The authentication may be set using the
web.config file.
Windows Authentication provider is the default authentication provider for ASP.NET
applications. When a user using this authentication logs in to an application, the credentials
are matched with the Windows domain through IIS.
There are 4 types of Windows Authentication methods:
1) Anonymous Authentication - IIS allows any user
2) Basic Authentication - A windows username and password has to be sent across the
network (in plain text format, hence not very secure). 3) Digest Authentication - Same as
Basic Authentication, but the credentials are encrypted. Works only on IE 5 or above
4) Integrated Windows Authentication - Relies on Kerberos technology, with strong
credential encryption
Gridview1.DataSource = ds
Gridview1.DataMember = "YourTableName"
Gridview1.Databind()