ASP.NET Web Forms and Web Services Mike Taulty Developer & Platform Group Microsoft Ltd mtaulty@microsoft.com http://mtaulty.com
Agenda Architectural Overview Web Services Web Forms How ASP.NET works to handle HTTP requests Web Services Web Forms
Serving up HTTP Internet Information Server Worker Process Worker Process ASP.NET ISAPI CLR Application Domain WWW Service Config Mgr Process Mgr INETINFO metabase ISAPI Extension ISAPI Filter Configure/Monitor HTTP.sys
ASP.NET Bridging IIS to the world of .NET code ASP.NET ISAPI HttpHandler Web Services (.asmx) Web Pages (.aspx) Web Controls (.ascx) Custom (.?) Config HttpModule HTTP.sys
Writing Http Handlers
Agenda Architectural Overview Web Services Web Forms How ASP.NET works to handle HTTP requests Web Services Web Forms
Distributed Web Services Them Platform Data Representation Programming languages Protocols Description Discovery Discovery Description Packaging Data Protocol UDDI WSDL SOAP XML HTTP Us
Core Technologies SOAP <Envelope> <Header> <ExtraInfo/> </Header> <Body> <Customer name=‘Mike’/> </Body> </Envelope>
Core Technologies WSDL <types…/> <message name=‘AddMsg’…/> <portType name=‘Calculator’> <operation name=‘Add’> <input message=‘AddMsg’> <output…> </operation> </portType> <binding…/> <service…/>
ASP.NET Web Services Declarative model - .NET attributes control working .NET class methods exposed over web service protocols Key attributes WebMethod, WebService Developer writes an .ASMX file for a service which points to the class providing implementation Xml Serialization XML->Parameters->Return Values->XML SOAP messages automatically populated WSDL documents automatically created Tools for generating web service proxies
Creating and consuming ASP.NET Web Services
ASP.NET Web Services Delivering Xml messages to .NET class methods ASP.NET ASMX Web Service Handler Web Service Class Web Method A Web Method B Web Method C First time compilation ASMX File Route to Method Invoke Method Return results After Xml serialization Before Xml serialization After Xml deserialization Before Xml deserialization Config Soap Extension
Agenda Architectural Overview Web Services Web Forms How ASP.NET works to handle HTTP requests Web Services Web Forms
ASP.NET Server controls encapsulate behaviour Provide VB-Like Model Support compiled languages VB, C#, JScript, COBOL, etc. Enable separation of code from content Developers and designers can work independently Support multiple clients automatically Rich DHTML, HTML 3.2, etc… Mobile controls for small devices
ASP.NET Page Execution Cycle <html> <body> <form method="post" runat=server> Name: <asp:textbox runat=server/> </form> </body> </html> .ASPX Page LiteralControl Page TextBox HtmlForm Request.aspx Code Behind Control <html> </html> Generate Code Assembly Page txt form Compile (VB/C#) HTTP.sys
ASP.NET Page Execution Cycle Assembly Page Ctl1 Ctl2 Changed? Re-use Cached? HTTP.sys Request.aspx
ASP.NET Web Forms
ASP.NET Application Services Application & Session State Session state storage choice Caching Flexible data cache Parameterised output caching for pages and controls Data Binding Diagnostics Applicaton & Page Level tracing system Performance monitor counters Security Authentication and Authorization Configuration System
Resources Web Services Web Forms http://msdn.microsoft.com/webservices Understanding web services specifications Web Services Enhancements 2.0 Web Forms http://msdn.microsoft.com/asp.net www.asp.net http://www.asp.net/tutorials/quickstart.aspx http://www.4guysfromrolla.com http://www.123aspx.com
© 2004 Microsoft Limited. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.