Monday, May 23, 2011

Asp.net Web Config

Asp.net Config files some of the aspects and points to be remember

Purpose of the Config File in Asp.net:- The asp.net Config file is the mechanism which force the website to have common mechanism. We can fine tune our application with some configuration setting.

Configuration file is XML file.

The ASP.NET runtime processes configuration information hierarchically, proceeding from a
root common to all applications on the machine—machine.config—down to all the web.config files found in the various folders of the particular application.
Asp.Net Hierarchy :-

Machin.Config -> Web.Config -> Each folder
The first level of the configuration root is element

The section has two attributes: Path and allow Override. The Path attribute represents the virtual path to which the embedded settings apply.

The Section

Anonymous identification is a feature that assigns a predefined identity to users who connect
anonymously to an application. Anonymous identification has nothing to do with the anonymous
user you can set at the IIS level, nor does it affect the authentication mechanism of
ASP.NET. The feature is designed to work with the user profile API to simplify the way you
write code in scenarios where both authenticated and unauthenticated users can use the site.

The section will create Cookie or Coolie less token and attach it with our request.
AutoDetect Uses cookies if the browser has cookie support currently enabled. It uses the
cookieless mechanism otherwise.

UseCookie Always uses cookies, regardless of the browser capabilities.

UseDeviceProfile Uses cookies if the browser supports them, and uses the cookieless mechanism otherwise. When this option is used, no attempt is made to check
whether cookie support is really enabled for the requesting device. This is the
default option.

UseUri Never uses cookies, regardless of the browser capabilities.

The Section :-
The section enumerates the characteristics and capabilities of the supported
browsers, including mobile devices. The section is tightly coupled with the
HttpBrowserCapabilities class and MobileCapabilities, which allows the ASP.NET runtime to
gather technical information about the browser that is running on the client.


The Section
The section allows you to register application-specific HTTP handlers that take care of ad hoc
URLs invoked over given HTTP verbs. I’ll dissect the syntax and usage of the
section in the next chapter.

The Section
The section allows you to register application-specific HTTP modules that
take care of hooking up specific stages during the processing of an ASP.NET request. I’ll
dissect the syntax and usage of the section in the next chapter.

No comments: