260 likes | 696 Views
ASP.NET and AJAX. Agenda. What is ASP.NET? ASP.NET Versions Difference Between ASP and ASP.NET ASP.NET Architecture Overview ASP.NET IIS life cycle Overview ASP.NET Page life cycle Overview ASP.NET State Management Overview ASP.NET Security JavaScript, CSS file
E N D
Agenda • What is ASP.NET? • ASP.NET Versions • Difference Between ASP and ASP.NET • ASP.NET Architecture Overview • ASP.NET IIS life cycle Overview • ASP.NET Page life cycle Overview • ASP.NET State Management Overview • ASP.NET Security • JavaScript, CSS file • Walkthrough Creating Webpage in ASP.NET • Ajax- Introduction • JavaScript Async Call back to Webservice • Packaging and Deploying ASP.NET Application
What is ASP.NET? • ASP.NET is a server side scripting technology that enables scripts (embedded in web pages) to be executed by an Internet server. • ASP.NET is a Microsoft Technology • ASP stands for Active Server Pages • ASP.NET is a program that runs inside IIS • IIS (Internet Information Services) is Microsoft's Internet server • IIS comes as a free component with Windows servers • IIS is also a part of Windows 2000 and XP Professional
Difference Between ASP and ASP.NET • ASP • Interpreted and Loosely-Typed Code • Mixes layout (HTML) and logic (scripting code) • Limited Development and Debugging Tools • No real state management • Update files only when server is down • Obscure Configuration Settings • ASP.NET • Separation of Code from HTML • Support for compiled languages • Use services provided by the .NET Framework • Graphical Development Environment • State management • Update files while the server is running! • XML-Based Configuration Files
ASP Code <% If Request.Form("login") = "Guest" AND Request.Form("password") = "Guest" Then Response.Write "This is all the <B>cool stuff</B> we are trying to protect!" Else Response.Write "Access Denied!" '*************************************************************** End If %> <FORM ACTION="login.asp" METHOD="post"> <TABLE BORDER=0> <TR> <TD ALIGN="right">Login:</TD> <TD><INPUT TYPE="text" NAME="login"></INPUT></TD> </TR> <TR> <TD ALIGN="right">Password:</TD> <TD><INPUT TYPE="password" NAME="password"></INPUT></TD> </TR> <TR> <TD ALIGN="right"></TD> <TD><INPUT TYPE="submit" VALUE="Login"></INPUT> <INPUT TYPE="reset" VALUE="Reset"></INPUT> </TD> </TR> </TABLE> </FORM>
ASP.NET Architecture Overview and .NET Framework • ASP.NET Framework
ASP.NET IIS life cycle Overview • ISAPI consists of two components: Extensions and Filters. • ISAPI extensions are implemented as DLLs that are loaded into a process that is controlled by IIS. • ISAPI filters can be registered with IIS to modify the behavior of a server • Change request data (URLs or headers) sent by the client • Control which physical file gets mapped to the URL • Control the user name and password used with anonymous or basic authentication • Modify or analyze a request after authentication is complete • Modify a response going back to the client • Run custom processing on "access denied" responses • Run processing when a request is complete • Run processing when a connection with the client is closed • Perform special logging or traffic analysis. • Perform custom authentication. • Handle encryption and compression.
ASP.NET State Management Overview • ASP.NET applications are hosted by a web server and are accessed using the stateless HTTP protocol • Client-Based State Management Options • View state • Control state • Hidden fields • Cookies • Query strings • Server-Based State Management Options • Application state • Session state (In Process Mode , ASPState Mode , SqlServer Mode ) • Profile Properties
ASP.NET Security Authentication <configuration> <system.web> <authentication mode = " [ Windows | Forms | Passport | None ] "> </authentication> </system.web> </configuration> Authorization <authorization> < [ allow | deny ] [ users ] [ roles ] [ verbs ] /> </authorization> <authorization> <allow users = "John" /> <deny users = "*" /> </authorization>
JavaScript, CSS file • JavaScript • JavaScript was designed to add interactivity to HTML pages • JavaScript is a scripting language • A scripting language is a lightweight programming language • JavaScript is usually embedded directly into HTML pages • JavaScript is an interpreted language (means that scripts execute without preliminary compilation) • CSS • Styles define how to display HTML elements • Styles were added to HTML 4.0 to solve a problem • External Style Sheets can save a lot of work • External Style Sheets are stored in CSS files
Ajax- Introduction • AJAX : Asynchronous JavaScript and XML. • AJAX is a technique for creating fast and dynamic web pages. • AJAX allows web pages to be updated asynchronously by exchanging small amounts of data with the server behind the scenes. This means that it is possible to update parts of a web page, without reloading the whole page. • http://www.asp.net/ajax/ajaxcontroltoolkit/samples/ • http://msdn.microsoft.com/en-us/library/bb399001.aspx