10.02.2014 Views

Beginning Ajax With ASP.NET (2006).pdf

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 13<br />

When an <strong>ASP</strong>.<strong>NET</strong> web page is requested (for example, www.SomeSite.com/SomePage.aspx), the<br />

<strong>ASP</strong>.<strong>NET</strong> runtime engine parses the web page and also the code that is associated with the page. This<br />

code is usually in the form of a code file present in the App_Code directory of a web site, or the code<br />

can be embedded within the web page (<strong>ASP</strong>X) itself. The web page and code are compiled into a .<strong>NET</strong><br />

assembly and loaded into the assembly cache for execution.<br />

A .<strong>NET</strong> assembly is a very rich unit of deployment, in that it can contain an extensive amount of information<br />

that allows it to be self-describing. This means that the <strong>ASP</strong>.<strong>NET</strong> runtime can interrogate the<br />

assembly and obtain a large amount of information about the assembly, such as security requirements<br />

and other operating parameters. In addition, special debugging information can be included when the<br />

assembly is compiled. As a result of this, the debugging experience on the server for <strong>ASP</strong>.<strong>NET</strong> applications<br />

can be very rich and interactive.<br />

First, let’s look at how debugging support and information can be enabled so that a developer can utilize<br />

the debugging features available on the server.<br />

Enabling Debugging Support<br />

Debugging support needs to be enabled specifically before debugging can be used. For <strong>ASP</strong>.<strong>NET</strong> web<br />

applications, this means including the following setting within the Web.Config web<br />

application configuration file:<br />

<br />

<br />

<br />

<br />

<br />

<br />

If you try to run a web application using Visual Studio .<strong>NET</strong> 2005 in debug mode, and the configuration entry has not been set, you will be prompted to enable debugging support<br />

(see Figure 13-1).<br />

Figure 13-1<br />

For other project types such as class libraries, Debug must be selected as the active configuration within<br />

Visual Studio .<strong>NET</strong> 2005, as shown in Figure 13-2.<br />

330

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!