Pages

Thursday, 23 June 2011

ASP.NET


                          -::ASP.NET::-

Querry?? What  is the process-flow for ASP.Net?

1. User requests an ASPx page in their browser

2. An HTTP requests is sent to IIS

3. The xspisapi.dll isapi filter intercepts the request and passes the request on to the XSP worker process (xspwp.exe)

4. Xspwp takes care of handing the request to the appropriate HTTPModules and finally an HTTPHandler as defined in the configuration files.

5. The ASPX page is read from the HardDisk or cache and server code is loaded into memory and executed.

6. The server side code outputs normal HTML which is handed back through the chain of modules and eventually to IIS, which sends the response back to the client's browser.

7. If the user clicks or otherwise acts on an HTML element (say, a textbox) that has a server side event handler, the form is posted back to the server with hidden form fields containing information as to what control and event occurred. Some controls do not automatically post by default, but wait for a button_click event to post. This is configurable by the developer.

8. The ASPx page is again loaded into memory using the same sequence of events as before, but this time ASP.net reads in the hidden form field data and automagically triggers the appropriate _OnChange, OnClick and other appropriate event handlers.

9. Resulting HTML is sent to the browser

10. The process continues in a continual "Post Back" cycle.
Querry?? What are HTTP Modules?


Definition of HTTP Modules: (ISAPI : Internet Service Application Programming)
HTTP modules are a logical replacement for ISAPI filters. Modules are a class that can participate in every web request. This is appropriate for code that should run on every request, such as caching, authentication or state management
Querry?? What are HTTP Handlers?

HTTP Handlers provide the end point in the processing of a web request and are equivalent to ISAPI Extensions today. For example, many handlers can be involved in the request for an ASPX page, but only 1 handler is invoked. The handler runs after the HTTP modules have run. Which handler is invoked is determined by configuration settings in the config.web file. Handlers are assigned to handle requests based on the extension of the page requested.

Querry?? What an Asp.net Web Application Consists?

A simple ASP.NET Web Application Consists of Four Things.
1.A virtual Directory in IIS , configured as an Application Root, to hold the files that make up the application and to control access to the files.
2. One or more .aspx files.
3. A Global.asax file that is used to provide Application and Session Startup and Cleanup code.
4. A Web.Config file used to store configuration Settings.
Querry?? What Global.asax Contains?
The Global. asax file, also known as the ASP.NET application file, is an optional file that contains code for responding to application-level events, session-level events and CustomHttpModules events raised by ASP.NET.Global.asax file resides in the root directory of an ASP.NET based application.
Global. asax is a file used to provide Application and Session Startup and Cleanup code.
The following Tasks can be performed in Global.asax
1.Respond to selected Application and Session Events.
a)Application_OnStart :Event is fired when first Request for any .aspx page is received.
This even is used to
a). Initialize Application Variables.
b).To execute Startup Code.
b)Session_Onstart: Event is fired, When a request comes from a user who does not have a current session in Application Current Session is identified by SessionID cookie..
This even is used to
a). Initialize Session -level Variables.
b).To execute per user Startup Code.
c)Application_BeginRequest
d)Application_EndRequest
e)Session_OnEnd
f)Application_OnEnd
2.Respond to Events of Custom HttpModules you have created for applications.
NB:- HttpModules are Classes that inherit the IHttpModule interface and Participate in Processing ASP.NET Requests.
3.Import Namespaces into the application using @Import Directive.
So without need of Import Namespace in each page and without having to fully qualify the member Names.
NB:- If two or more Namespaces contain same members then must use Fully qualified member names to avoid conflicts.
4.Register Assemblies for use in Your application using @Assembly Directive.
5.Create Instances of application level objects using

9 comments:

  1. Инстраграмм являться самой популярной площадкой для продвижения своего бизнеса. Но, как показывает практика, люди гораздо чаще подписываются на профили в которых уже достаточное количество подписчиков. Если заниматься продвижение своими силами, потратить на это можно очень много времени, потому гораздо лучше обратиться к спецам из Krutiminst.ru подробнее https://forum.veriagi.com/viewtopic.php?pid=3735960

    ReplyDelete

Thanks For your Comments Please Continue with your precious Time and greate Knowladge will be benificial for learner like me thanks a lot...........