• Home
  • New Entries
  • Popular Entries
  • Submit a Story
  • About

Configure ASP.NET AJAX Extensions ...

In this column, I'll focus on ASP.NET AJAX configuration entries in web.config as well as on the role new HttpHandler and HttpModule classes play in AJAX-enabling Web sites.

Create a New ASP.NET AJAX Web Site
Once you have installed the ASP.NET AJAX Extensions from http://ajax.asp.net, you will see a new template named "ASP.NET AJAX-Enabled Web Site" in Visual Studio .NET 2005 is New Web Site dialog (see Figure 1).

When you use the ASP.NET AJAX-Enabled Web Site template to create a new Web site, you add a specialized web.config file that contains various configuration entries for enabling ASP.NET AJAX functionality on the server side. The ASP.NET AJAX Extensions documentation breaks down each of the configuration tags added into web.config here.

The top portion of the web.config file contains several different section configuration tags. These tags define classes that perform the task of parsing configuration data defined in web.config at run time. For example, the scriptResourceHandler section tag specifies that the System.Web.Configuration.ScriptingScriptResourceHandlerSection class should be used to parse data defined in the scriptResourceHandler tag shown here:

<scriptResourceHandler  
  enableCompression="true"
  enableCaching="true" />

This tag provides configuration information used by the run-time engine to determine if script resources embedded in assemblies are compressed and/or cached. Both compression and caching are enabled by default, although the compression setting will not have an effect in browsers that don support compression.

Other configuration sections in web.config include the ASP.NET AJAX profile service, which is used to access personalization information, and the authentication service, which is used to log users in and out of an application. You can also use the JSON [JavaScript Object Notation] serialization configuration to limit JSON message sizes that will be processed, restricting the number of object levels that can be processed and integrating custom JSON serialization classes.

The authentication, profile and JSON serialization configuration tags are commented out by default, but you can easily enable them by removing the appropriate comment tags. (In a future column, I will discuss the profile and authentication services and show you how they can be used in AJAX applications.)

Prefixes, Handlers and Modules
In addition to defining custom configuration sections used by the ASP.NET AJAX Framework, web.config maps the standard "asp" server control prefix to the System.Web.Extensions assembly (see Listing 1).

This allows you to use AJAX server-side controls, such as the ScriptManager and UpdatePanel, as you would any other standard ASP.NET server control. Prefix the desired control with "asp" and it is ready to use:

<asp:ScriptManager id="sm"
  runat="server" />

Web.config also defines two HttpHandlers and one HttpModule. All three play key roles. Review the definitions for these sections in Listing 2.

The two HttpHandlers that are defined include ScriptHandlerFactory and ScriptResourceHandler. ScriptHandlerFactory performs a variety of tasks such as handling calls made to back-end services (Web Services, profiles and authentication services). ScriptResourceHandler handles requests made to scripts embedded in the ASP.NET AJAX Extensions assemblies.

An HttpModule called ScriptModule is also defined. It handles authentication as well as routing calls to Web services using REST [Representational State Transfer]. REST is internally used for ASP.NET AJAX Web service calls. You can find more information about REST here.

Using the new ASP.NET AJAX-Enabled Web Site template simplifies the process of configuring a Web site to use ASP.NET AJAX data, controls and HttpHandlers and HttpModules. In this column, you have learned about some of the configuration sections in web.config, and learned how handlers and modules fit into the overall picture. In the next column, I will introduce a few of the ASP.NET AJAX server controls that you can use to AJAX-enable a Web site.
source: 123aspx

 View Full Story.
Posted at 08:54:49 am | Permalink | Posted in .Net  

Related Stuff

  • MooV: Using cutting edge Video phones and Software Video Phones - coupling all that with VoIP and empowering the disabled.

  • Moo Telecom: VoIP communications made easy - Ring anyway with the fun and ease of using a normal phone

  • TagR:Mobile Social Network with Real Time Locations Based services, and Ambience Intelligence, VoiP, IM, Skype, Googletalk, Mapping, Flickr, Events, Calendaring, Scheduling, SecondLife Support

  • ClearSMS : ClearSMS is a Web-based application that lets you send bulk SMS messages to your customers, contacts, or just about anyone.

  • Jajah:jah is a VoIP (Voice over IP) provider, founded by Austrians Roman Scharf and Daniel Mattes in 2005[1]. The Jajah headquarters are located in Mountain View, CA, USA, and Luxembourg. Jajah maintains a development centre in Israel.

  • Skype: It’s free to download and free to call other people on Skype. Skype the number one voice over ip software

  • PrivatePhone: a free local phone number with voicemail and messages you can check online or from any phone.

Be the first ... |Add your comment.

Your Comment ...

  Name (required)

  Email (required, hidden)

  Website


Top Stuff

e-messenger

MessengerFX

eBuddy

ILoveIM

AIM Express

Top 20 Ruby CMS


Our Partners

Facebook Applications

Ajax Projects

Web 2.0 Sites

Webloglines

Human Development Handbook

Software Development Company

Ajaxlines

Stock Exchange Chat


About Ajaxlines

Ajaxlines is a project focused on providing its audience with a database of most of Ajax related articles, resources, tutorials and services from around the world.

Its purpose is to showcase the power of Ajax and to act as a portal to the Ajax development community.


Search


Topics

  • .Net (111)
  • Articles (85)
  • Bookmarking (35)
  • Calendar (19)
  • Chat (39)
  • ColdFusion (3)
  • CSS (41)
  • Email (23)
  • Facebook (23)
  • Flash (15)
  • Games (6)
  • Google (28)
  • Html (14)
  • Image (11)
  • International Calls & VOIP (7)
  • Java (36)
  • Javascript (171)
  • JSON (21)
  • Perl (2)
  • PHP (88)
  • Presentation (19)
  • Python (3)
  • Resources (2)
  • RSS (1)
  • Ruby (10)
  • Storage (4)
  • Toolkits (90)
  • Tutorials (199)
  • UI (12)
  • Utilities (167)
  • Web2.0 (13)
  • XmlHttpRequest (20)
  • YUI (4)

© 2006 www.ajaxlines.com. All Rights Reserved. Powered by IRange