ARCHITECTURE OF ASP.NET R A C H E T IR U O E F N . P S A T E HTTPREQUEST inet_info.exe Machine.configWeb.config HTTPRESPONSEAspnet_isapi.dllAsp.dll Process Req W e b S e r v e r A S P .

n e t Aspnet_wp.exe App Domain HTTP Handlers (.aspx)(.asp) • Inet_info.exe

R u n t i m e

E n v

à identifies the request and submits the request to the aspnet_isapi.dll. • Aspnet_isapi.dll à is a script engine which process the .aspx page • Then the script engine will submit the request to the ASP.NETruntime env. • After verifying all the security issues of both machine.config and web.config then anAppDomain will be defined for the request and after processing the request the responsewill be given to the client as HTTP response. • Machine.Config à it is used to maintain the complete configuration details of all the webapplications registered on to the web server of • Web.Config à It is used to maintain the config details about a single web application. • Where configuration details includes security,database connectivity,statemanagement,trace details of the web application,,authentication and authorization of theapplications and globalizations •

net or web service to implement the work done on arequest.This is responsible for handling the requests and sending the each application runs its own application domain and therefore it is protectedfrom other asp.The disadvantage of this is memory resources from IIS then ASP.AppDomain: All windows appns run inside a process and these process own resourcessuch as memory and kernel objects and the threads execute code loaded into aprocess.IIS supports a low level API known as builds upon a extensible architecture known as HTTPruntime.Process are protected from each other by the implements a similar concept with HTTP handlers.A request is assigned to ASP. All these appns are run onhigh isolation mode to work applications on the same machine so it ignores the process isolationspecified on IIS. So in. ASP.It is uptoan individual handlers such as .So to achieve this in a single process all the applications should be made to runwhich is good to an extent but the draw back is if one crashes all other are the code verification feature takes care that the code is safe to run. • HTTPHandlers: ASP.

ASP • Up gradation of ASP to ASPX is not required it supports side by side executionand hence a request can be given from ASP to ASPX and vice versa. Features of asp.Where as for ASP CUTE FTP is used for deploying manually we have to upload.NET • Simplified deployment • • Better Performance • As the ASPX pages are complier based the performance of the web applicationwill be faster then the ASP pages (as they are interpreter based) • Caching • It is a process of maintaining the result or output of a web page temporarily for some period of time . • Security • In ASP security is done by IIS or writing the code manually.Netsupports both client side and server side. Where as ASP.JavaScript or VBScript to implement ASP.Net isdefined with built in security features such as à windows authentication à Forms Authentication à Passport Authentication à Custom Authentication • . • Simplified Programming Model • ASP.Net supports setup and deployment and hence the web app can be definedwith a web set up project which can be easily deployed on to the web server.ASP supports Client Side caching where as ASP.Net is a technology which can be implemented using any dot net languagesuch as VB.C# etc and hence there is no requirement of • ASPX.examines entries in the <httphandlers> section based on the extension of the request todetermine which handler the request should be send to.

Net can be maintained using the database and aswell cookieless sessions are also supported.NET models5) uses crystal reports6)Uses COM for languageinteroperability7)Does not support multi threading8)Uses DCOM to support distributedtechnology9) Supports web tech.Net andC# and hence the database access using ASPX pages will be very powerful. • A web page is in 2 parts 1} Designing part (HTML Content. ADO objectmodels for database connectivity5)Uses Data projects as its defaultreporting tool1) It is an object oriented programming2)Here its mandatory3) Uses Unstructured / Structured methods for handling exception4) supports ADO and ADO. 2) Code Behind Techniquewhen design part code is represented with in ASPX file and logic part code isrepresented with in dll file then it is called as code behind technique.NET 1) It is an object based programming2)Variables or member declarations arenot mandatory3)Uses Unstructured method for handling exceptions4) Uses DAO.Flash.Net provides validation controls using which any type of client sidevalidations are performed without writing any supports ADO and ADO. • Better session Management • Session Management in ASP.client side appnsor server side appns can be designedusing VB6) Uses . • ASP Supports only In Page assembly for languageinteroperability7)Does support multithreading8)Uses .More powerful data access • ASP.0 & VB..It also supports enabling anddisabling of session info within a web application.Net as its database connectivity model whichwill be implemented using the most Powerful OOP’S languages like remoting to support . Difference Between VB 6. • Simplified Form Validations • ASP.Dreamweaver etc)2} logic Part (sub programs and event procedures and it has also your databaseinteraction) • ASP. • Web services • It is a code which will be published on the web which can be used by anyapplications written using any language for an platform or device. RDO.Net supports 2 techniques for creating web page1) In Page Techniquewhen you place design part code and logic part code with in a single file called asASPX then it is called as inPage Technique. • DLL file is not a readable file so it is secured.

destructor.Note VB.dispose.Garbage collector.netW . Automatic releasing of resources is Differences between C#. U n s i g n e d D a t a T y p e s 2. abstraction.I s a v a i l a b l e i n C # I s n o t a v a i l a b l e i n V B .9)It does not support web technology. N E T D A T A T Y P E S 1 .1.You have toexplicitly use dispose methodOperator OverloadingI s a v a i l a b l e i n C # I s n o t a v a i l a b l e i n V B . T C # .net & and it haslimitations wrt interfaceM e m o r y M a n a g .No Unsigned Data Types2. N E T V B .No indexes in Vb. N e t Page Life Cycle Events . G a r b a g e C o l l e c t o r .It is not strongly typedO O P S C o n c e p t M o r e c o n c e p t s i n C # u have interfaces. N e t Auto cant be used to design ClientSide / Server side appns but it can used as animplementing Lang for asp.Strongly Typed Lang. R .distributedtech.Automatic releasing of resources is not available.It Boosts the performance.indexesLess Concepts here. N e t P o i n t e r s I s a v a i l a b l e i n C # I s n o t a v a i l a b l e i n V B .

The synchronisation of threads can be implemented using lock and unlock methods.webserver will allocateequal processor time to all the threads. Synchronisation is nothing but allowing user one at a particular time. Application_BeginRequest à the code written in this event will be fired when ever anywebform present in the webapplication is loaded. Global.getLastError()” should be used.asax It’s a collection of events where the code written in those events will be executedimplicitly whenever the relevant event takes place.asax” file should be used.Each client requests to the webserver is considered as thread. In order to work with the application and the session objects and to handle the events in aproper manner “global. . Application_Start à the code written in this event will be executed only once whenever the application has been encountered with the first request Session_Start à the code written in this event will be executed when ever a new sessionfor the user starts.In this aspect more then one thread canmanipulate application memory data. Application_error à the code written in this event will be executed when ever any error or exceptions occurs at webforms present in the web application.Note à in order to get the last error which has been generated on the webform“server. Application_Authenticate à the code written in this event will be executed when even theauthentication takes place.this may lead to improper result to avoid this it isrecommended for synchronisation of threads.

net supports both client side caching and server side caching.cachecontrol = public • Advantage : à only the people who are connected in the network they will be getting thepage faster.Session_End à the code written in this event will be executed whenever the session of the user ends Application_End à the code written in this event will be executed whenever the webapplication is closed. • ASP supports client side caching. Caching • It is used to maintain the result of the webform temporarily for a specific period of time. Client Side Caching •If the cache page is maintained at theclient side it is said client side caching. • Where as ASP. Server Side Caching . C1C2C3 Cache page M o d e m I S P GatewayWeb server Server ProxyServer • To Set this : à Response.

Web User Control • Web User Control à It is used to design a web control which can be used by anwebforms of ASP.{example 1} • Page Fragmentation Cache à It is used to maintain only a partial page contents as acache contents on the web server • To achieve this Page Fragmentation àà Define a web custom control à Set the cache for the custom control à use the web custom control on the web form.2} The no of clicks for the webform present in the web application should be more. Types – Server side caching • 1~~~> Page – Output Cache • 2 ~~~> Page – Fragmentation (Partial) Cache • 3 ~~~> Data Cache.• then it is said to be server side caching. Page – Output cache when ever the complete result of the webform or the o/p of the webform is maintained as acache page at the webserver then it is said to be a page-output cache. • ToSet à <% @ outputcache duration=“seconds” varybyparam=“none/controlName/VariableName”%> • VaryByParam à it is used to set an individual cache page for every distinct valueassigned for the control or the variable assigned to the . • Points to remember • Caching should be used if and only if the following properties are satisfied1} The contents of the webform should not be modified at least for a specific period of time.

aspx”%>2} place the web user control as a normal control on the webform<uci:webusercontrol2 id=“wuc2” runat=“server” /> Data Cache • It is used to maintain the data present in an object as a cache information . • Note: à once the data is been set as a cache then if the data is modified or manipulatedat the database level there wont be any reflection at the data present in the cache.datview or datareader. Page level tracing à . • 2nd method à 1} register the web user control as a tag prefix in the webform: à for eg :<% @ register tagprefix = “UC1” tagname=“webusercontrol” src=“webusercontrol2.where theobject can be dataset.• To design à Project à Add web user control • To use the web user control on the web form à • 1st method à select the name of the web user control file in the solution explorer and then drag dropthat file on to the web form. It is of 2 types à Application level tracing à If this is used then for all the webforms present in the webapplication the trace details or information will be provided. Tracing It is used to trace the flow of the application.

To set page level trace info in page directive tag : à <% @ pagelanguage=“vb” trace=“true” % . To set application level tracing à in web./>Methods to support tracing Trace.config à <trace enabled=“true” requestlimit=“10” pageoutput=“true”….warn à it is used to write the data on to the trace information using red as its forecolor such that the information will be highlighted at the trace info section.write à It is used to write the data on to the trace information. Note à if the application level and page level tracing information is set then thepreference will be given to the page level tracing only..if used then only specific web form the trace details will be set. Trace.

Sign up to vote on this title
UsefulNot useful

Master Your Semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master Your Semester with a Special Offer from Scribd & The New York Times

Cancel anytime.