Contents. Introducing C# and the.net Platform...1

Similar documents
Apex TG India Pvt. Ltd.

INTRODUCTION TO.NET. Domain of.net D.N.A. Architecture One Tier Two Tier Three Tier N-Tier THE COMMON LANGUAGE RUNTIME (C.L.R.)

DOT NET Syllabus (6 Months)

.NET-6Weeks Project Based Training

DOT NET SYLLABUS FOR 6 MONTHS

Microsoft.NET Programming (C#, ASP.NET,ADO.NET, VB.NET, Crystal Report, Sql Server) Goal: Make the learner proficient in the usage of MS Technologies

C# Syllabus. MS.NET Framework Introduction

COPYRIGHTED MATERIAL. Contents. Part I: C# Fundamentals 1. Chapter 1: The.NET Framework 3. Chapter 2: Getting Started with Visual Studio

.Net. Course Content ASP.NET

SECURED PROGRAMMING IN.NET DETAILED TRAINING CONTENT INDUSTRIAL TRAINING PROGRAM ( )

Contents. Using Interpreters... 5 Using Compilers... 5 Program Development Life Cycle... 6

Department of Computer Applications

CHAPTER 1: INTRODUCTION TO THE IDE 3

CHAPTER 1: INTRODUCING C# 3

Mastering VB.NET using Visual Studio 2010 Course Length: 5 days Price: $2,500

Course Hours

Developing Microsoft.NET Applications for Windows (Visual Basic.NET)

Developing Microsoft.NET Applications for Windows (Visual Basic.NET)

ALPHAPRIMETECH 112 New South Road, Hicksville, NY 11801

Objective of the Course: (Why the course?) Brief Course outline: (Main headings only) C# Question Bank Chapter1: Philosophy of.net

ASP.NET Web Forms Programming Using Visual Basic.NET

C# Programming: From Problem Analysis to Program Design. Fourth Edition

C# Programming in the.net Framework

Unit 1: Visual Basic.NET and the.net Framework

Visual Basic.NET and the.net Platform: An Advanced Guide

Pro C# 2005 and the.net 2.0 Platform. Andrew Troelsen

Dot Net Online Training

2609 : Introduction to C# Programming with Microsoft.NET

Program Contents: DOTNET TRAINING IN CHENNAI

M Introduction to C# Programming with Microsoft.NET - 5 Day Course

ASP.NET 2.0 p. 1.NET Framework 2.0 p. 2 ASP.NET 2.0 p. 4 New Features p. 5 Special Folders Make Integration Easier p. 5 Security p.

Contents. Illustrations. 1 Introduction to Computers, the Internet, the Web and C# 1

B.E /B.TECH DEGREE EXAMINATIONS,

MCSA Universal Windows Platform. A Success Guide to Prepare- Programming in C# edusum.com

.NET FRAMEWORK. Visual C#.Net

UNIT 1 PART A PART B

PESIT- Bangalore South Campus Hosur Road (1km Before Electronic city) Bangalore

Beginning ASP.NET. 4.5 in C# Matthew MacDonald


C# 2008 and.net Programming for Electronic Engineers - Elektor - ISBN

Microsoft Visual C# 2005: Developing Applications Table of Contents

C#.NET TRAINING / /

OUTLINE DELPHI 2005 FOR.NET JUMP START

Microsoft. Microsoft Visual C# Step by Step. John Sharp

DOT NET COURSE BROCHURE

"Charting the Course... MOC Programming in C# with Microsoft Visual Studio Course Summary

VB.NET Web : Phone : INTRODUCTION TO NET FRAME WORK

Vision V sion o n I n n 1975 V sion o n T o T d o a d y A c o c m o pu p t u er e o n o n e v e e v r e y E po p w o er e p e p o e p o l p e

Developing Microsoft.NET Applications for Windows (Visual C#.NET)

C# Programming Syllabus

Visual C# 2008 How to Program, 3/E Outline

PROGRAMMING IN VISUAL BASIC WITH MICROSOFT VISUAL STUDIO Course: 10550A; Duration: 5 Days; Instructor-led

VB.NET. Exercise 1: Creating Your First Application in Visual Basic.NET

Chapters and Appendix F are PDF documents posted online at the book s Companion Website (located at

Contents. Figures. Tables. Examples. Foreword. Preface. 1 Basics of Java Programming 1. xix. xxi. xxiii. xxvii. xxix

Microsoft Visual C# Step by Step. John Sharp

OVERVIEW ENVIRONMENT PROGRAM STRUCTURE BASIC SYNTAX DATA TYPES TYPE CONVERSION

Table Of Contents VISUAL BAISC 2005 FOR BEGINNERS

Programming in Visual Basic with Microsoft Visual Studio 2010

C# 6.0 in a nutshell / Joseph Albahari & Ben Albahari. 6th ed. Beijin [etc.], cop Spis treści

Learning C# 3.0. Jesse Liberty and Brian MacDonald O'REILLY. Beijing Cambridge Farnham Köln Sebastopol Taipei Tokyo

B.V Patel Institute of Business Management, Computer & Information Technology

.NET, C#, and ASP.NET p. 1 What Is.NET? p. 2 The Common Language Runtime p. 2 Introducing C# p. 3 Introducing ASP.NET p. 4 Getting Started p.

Chapters are PDF documents posted online at the book s Companion Website (located at

Visual Basic 2008 How to Program, 4/E Outline

Before You Begin 1 Graphing Application 1 Introducing Computers, the Internet and Visual Basic.NET

Microsoft ASP.NET Whole Course Syllabus upto Developer Module (Including all three module Primary.NET + Advance Course Techniques+ Developer Tricks)

Diploma in Microsoft.NET

3 Welcome Application 41 Introduction to Visual Programming

2310C VB - Developing Web Applications Using Microsoft Visual Studio 2008 Course Number: 2310C Course Length: 5 Days

"Charting the Course... MOC A Introduction to Web Development with Microsoft Visual Studio Course Summary

HCIM SUMMER WORKSHOP Introduction to C#

"Charting the Course... Java Programming Language. Course Summary

Subject to Change Drawing Application 1 Introducing Computers, the Internet and C#

Programming C# 5.0. Ian Griffiths O'REILLY' Beijing Cambridge * Farnham Kbln Sebastopol Tokyo

Contents. Chapter 1 Introducing ADO.NET...1. Acknowledgments...xiii. About the Authors...xv. Introduction...xix

Software Development & Education Center Complete.NET 4.5

M Introduction to Visual Basic.NET Programming with Microsoft.NET 5 Day Course

.NET Advance Package Syllabus

2559 : Introduction to Visual Basic.NET Programming with Microsoft.NET

CHAPTER 1: VISUAL STUDIO

TECHNOLOGIES. Kick Starting OOPS &.Net Encapsulation Ø Class Ø Struct Ø Interface, Ø Enum Ø Abstraction Ø Access modifiers in.net

Expert C++/CLI:.NET for Visual C++ Programmers

Deitel Series Page How To Program Series

Variable Scope The Main() Function Struct Functions Overloading Functions Using Delegates Chapter 7: Debugging and Error Handling Debugging in Visual

C# Programming. Unit 1: Introducing C# and the.net FrameworkThis module explains the.net Framework, and using C# and

S.Sakthi Vinayagam Sr. AP/CSE, C.Arun AP/IT

CONTENTS. PART 1 Structured Programming 1. 1 Getting started 3. 2 Basic programming elements 17

Type of Classes Nested Classes Inner Classes Local and Anonymous Inner Classes

.NET 4.6 MICROSOFT CURRICULUM MICROSOFT.NET 2015 (4.6)

Introduction... xv SECTION 1: DEVELOPING DESKTOP APPLICATIONS USING JAVA Chapter 1: Getting Started with Java... 1

.Net Interview Questions

Programming in C# with Microsoft Visual Studio 2010

Saikat Banerjee Page 1

INTERNAL ASSESSMENT TEST 1 ANSWER KEY

Saikat Banerjee Page 1

M4.1-R4: APPLICATION OF.NET TECHNOLOGY

"Charting the Course to Your Success!" MOC B Programming in C# Course Summary

Chapter 1:- Introduction to.net. Compiled By:- Ankit Shah Assistant Professor, SVBIT.

Introduction to.net Framework Week 1. Tahir Nawaz

Transcription:

About the Author... xxi Acknowledgments... xxiii Introduction...xxv Part One Introducing C# and the.net Platform...1 Chapter 1 The Philosophy of.net... 3 Understanding the Previous State of Affairs... 3 The.NET Solution... 6 The Building Blocks of the.net Platform (CLR, CTS, and CLS)... 7 The Role of the.net Base Class Libraries... 7 What C# Brings to the Table... 8 Additional.NET-Aware Programming Languages... 9 An Overview of.net Binaries (aka Assemblies)... 11 The Role of the Common Intermediate Language... 13 The Role of.net Type Metadata... 16 The Role of the Assembly Manifest... 17 Compiling CIL to Platform-Specific Instructions... 18 Understanding the Common Type System... 18 Intrinsic CTS Data Types... 22 Understanding the Common Language Specification... 23 Understanding the Common Language Runtime... 25 A Tour of the.net Namespaces... 28 Increasing Your Namespace Nomenclature... 33 Deploying the.net Runtime... 39 Summary... 41 vii

Chapter 2 Building C# Applications... 43 The Role of the Command Line Compiler (csc.exe)... 43 Building a C# Application Using csc.exe... 45 Working with csc.exe Response Files... 50 Generating Bug Reports... 52 Remaining C# Compiler Options... 54 The Command Line Debugger (cordbg.exe)... 55 Using the Visual Studio.NET IDE... 57 Building a VS.NET Test Application... 61 Debugging with the Visual Studio.NET IDE... 70 Other Key Aspects of the VS.NET IDE... 71 Documenting Your Source Code via XML... 76 C# Preprocessor Directives... 82 An Interesting Aside: The System.Environment Class... 88 Building.NET Applications with Other IDEs... 89 Summary... 90 Part Two The C# Programming Language...91 Chapter 3 C# Language Fundamentals... 93 The Anatomy of a Basic C# Class... 93 Creating Objects: Constructor Basics... 97 The Composition of a C# Application... 100 Default Assignments and Variable Scope... 102 The C# Member Variable Initialization Syntax... 104 Basic Input and Output with the Console Class... 105 Understanding Value Types and Reference Types... 109 The Master Node: System.Object... 115 The System Data Types (and C# Aliases)... 122 Converting Between Value Types and Reference Types: Boxing and Unboxing... 128 Defining Program Constants... 132 C# Iteration Constructs... 134 C# Control Flow Constructs... 137 The Complete Set of C# Operators... 139 Defining Custom Class Methods... 140 Understanding Static Methods... 143 Method Parameter Modifiers... 147 Array Manipulation in C#... 154 String Manipulation in C#... 160 C# Enumerations... 164 viii

Defining Structures in C#... 168 Defining Custom Namespaces... 171 Summary... 176 Chapter 4 Object-Oriented Programming with C#... 179 Formal Definition of the C# Class... 179 Defining the Default Public Interface of a Type... 184 Recapping the Pillars of OOP... 186 The First Pillar: C# s Encapsulation Services... 191 Pseudo-Encapsulation: Creating Read-Only Fields... 199 The Second Pillar: C# s Inheritance Support... 201 Keeping Family Secrets: The protected Keyword... 205 Nested Type Definitions... 211 The Third Pillar: C# s Polymorphic Support... 213 Casting Between Types... 222 Generating Class Definitions Using Visual Studio.NET... 225 Summary... 229 Chapter 5 Exceptions and Object Lifetime... 231 Ode to Errors, Bugs, and Exceptions... 231 The Role of.net Exception Handling... 232 The System.Exception Base Class... 234 Throwing a Generic Exception... 235 Catching Exceptions... 236 CLR System-Level Exceptions (System.SystemException)... 240 Custom Application-Level Exceptions (System.ApplicationException)... 243 Handling Multiple Exceptions... 247 The Finally Block... 250 The Last Chance Exception... 251 Dynamically Identifying Application- and System-Level Exceptions... 252 Debugging System Exceptions Using VS.NET... 253 Understanding Object Lifetime... 257 The CIL of new... 257 The Basics of Garbage Collection... 259 Finalizing a Type... 260 The Finalization Process... 263 Building an Ad Hoc Destruction Method... 264 Garbage Collection Optimizations... 267 The System.GC Type... 267 Summary... 272 ix

Chapter 6 Interfaces and Collections... 273 Defining Interfaces Using C#... 273 Invoking Interface Members at the Object Level... 277 Exercising the Shapes Hierarchy... 279 Understanding Explicit Interface Implementation... 281 Interfaces As Polymorphic Agents... 284 Building Interface Hierarchies... 285 Implementing Interfaces Using VS.NET... 288 Understanding the IConvertible Interface... 290 Building a Custom Enumerator (IEnumerable and IEnumerator)... 293 Building Cloneable Objects (ICloneable)... 297 Building Comparable Objects (IComparable)... 302 Exploring the System.Collections Namespace... 306 Building a Custom Container (Retrofitting the Cars Type)... 315 Summary... 318 Chapter 7 Callback Interfaces, Delegates, and Events... 321 Understanding Callback Interfaces... 321 Understanding the.net Delegate Type... 325 Members of System.MulticastDelegate... 328 The Simplest Possible Delegate Example... 329 Building a More Elaborate Delegate Example... 333 Understanding Asynchronous Delegates... 341 Understanding (and Using) Events... 347 Summary... 354 Chapter 8 Advanced C# Type Construction Techniques... 355 The Advanced Keywords of C#... 355 A Catalog of C# Keywords... 367 Building a Custom Indexer... 370 A Variation of the Cars Indexer... 372 Internal Representation of Type Indexers... 373 Using the C# Indexer from VB.NET... 374 Overloading Operators... 375 The Internal Representation of Overloaded Operators... 380 x

Interacting with Overloaded Operators from Overloaded-Operator-Challenged Languages... 383 Final Thoughts Regarding Operator Overloading... 385 Understanding Custom Type Conversions... 386 Creating Custom Conversion Routines... 387 Defining Implicit Conversion Routines... 390 The Internal Representation of Custom Conversion Routines... 391 Summary... 392 Part Three Programming with.net Assemblies...393 Chapter 9 Understanding.NET Assemblies... 395 Problems with Classic COM Binaries... 395 An Overview of.net Assemblies... 397 Building a Single File Test Assembly... 404 A C# Client Application... 408 A Visual Basic.NET Client Application... 409 Cross-Language Inheritance... 411 Exploring the CarLibrary s Manifest... 415 Exploring the CarLibrary s Types... 418 Building a Multifile Assembly... 419 Using the Multifile Assembly... 422 Understanding Private Assemblies... 425 Probing for Private Assemblies (The Basics)... 425 Private Assemblies and XML Configuration Files... 426 Probing for Private Assemblies (The Details)... 429 Understanding Shared Assemblies... 430 Understanding Strong Names... 431 Building a Shared Assembly... 432 Understanding Delayed Signing... 434 Installing/Removing Shared Assemblies... 435 Using a Shared Assembly... 436 Versioning Shared Assemblies... 437 Building SharedAssembly Version 2.0.0.0... 438 Specifying Custom Version Policies... 440 GAC Internals... 440 Assembly-Centric Odds and Ends... 442 Regarding the VS.NET Add References Dialog Box... 449 Summary... 450 xi

Chapter 10 Processes, AppDomains, Contexts, and Threads... 451 Reviewing Processes and Threads Under Traditional Win32... 451 Interacting with Processes Under the.net Platform... 453 Understanding the System.AppDomain Type... 462 Understanding Context (or How Low Can You Go?)... 468 Summarizing Processes, AppDomains, and Context... 474 The Process/AppDomain/Context/Thread Relationship... 474 Multithreaded Programming via Delegates... 476 The System.Threading Namespace... 476 Spawning Secondary Threads... 481 A More Elaborate Threading Example... 484 Concurrency Revisited... 487 Synchronization Using the C# lock Keyword... 490 Synchronization Using the System.Threading.Interlocked Type... 492 Synchronization Using the [Synchronized] Attribute... 493 Thread Safety and the.net Base Class Libraries... 494 Programming with Timer Callbacks... 494 Summary... 496 Chapter 11 Type Reflection, Late Binding, and Attribute-Based Programming... 499 The Necessity of Type Metadata... 499 Understanding Reflection... 504 The System.Type Class... 504 Investigating the System.Reflection Namespace... 511 Reflecting on a Private Assembly... 511 Reflecting on Shared Assemblies... 516 Understanding Dynamic Invocation (Late Binding)... 517 Understanding Attributed Programming... 520 Building Custom Attributes... 523 Restricting Attribute Usage... 524 Assembly- (and Module-) Level Attributes... 526 Reflecting on Attributes at Runtime... 528 Putting Reflection, Late Binding, and Custom Attributes in Perspective... 528 Summary... 535 xii

Part Four Leveraging the.net Libraries...537 Chapter 12 Object Serialization and the.net Remoting Layer... 539 Object Persistence in the.net Framework... 540 The Role of Object Graphs... 540 Configuring Objects for Serialization... 541 Serialization Using a Binary Formatter... 545 Serialization Using a SOAP Formatter... 547 Serialization Using an XML Formatter... 548 Customizing the Serialization Process... 549 Defining.NET Remoting... 554 The.NET Remoting Namespaces... 554 Understanding the.net Remoting Framework... 556 All Together Now!... 559 Terms of the.net Remoting Trade... 560 Object Marshaling Choices (MBR or MBV?)... 560 Final Notes Regarding MBR/MBV Objects... 563 Activation Choices for MBR Types (WKO or CAO?)... 563 Basic Deployment of a.net Remoting Project... 566 Building Our First Distributed Application... 568 Testing the Remoting Application... 571 Understanding the ChannelServices Type... 572 Understanding the RemotingConfiguration Type... 573 Revisiting the Activation Mode of WKO Types... 576 Deploying the Server to a Remote Machine... 577 Leveraging the TCP Channel... 578 Remoting Configuration Files... 579 Working with MBV Objects... 582 Understanding Client-Activated Objects (CAO)... 587 The Lease-Based Lifetime of CAO/WKO-Singleton Objects... 589 Server-side (and Client-side) Lease Sponsorship... 595 Alternative Hosts for Remote Objects... 597 Asynchronous Remoting... 603 The Role of the [OneWayAttribute] Type... 604 Final Thoughts...... 605 Summary... 606 xiii

Chapter 13 Building a Better Window (Introducing Windows Forms)... 607 A Tale of Three GUI Namespaces... 607 Overview of the System.Windows.Forms Namespace... 608 Interacting with the Windows Forms Types... 609 Building a VS.NET Windows Forms Project Workspace... 612 The System.Windows.Forms.Application Class... 615 The Anatomy of a Form... 621 The Component Class... 622 The Control Class... 623 Control Events... 627 Responding to Keyboard Events... 631 The Control Class Revisited... 633 The ScrollableControl Class... 636 ContainerControl Class... 637 The Form Class... 637 The Life-Cycle of a Windows Form Type... 640 Handing Form Level Events a la VS.NET... 643 Building Menus with Windows Forms... 644 Building Your Menu System... 646 Creating a Pop-Up Menu... 649 Adorning Your Menu System... 651 Building a Menu Using Visual Studio.NET... 654 Understanding Status Bars... 655 Building a Tool Bar... 660 Building ToolBars at Design Time... 664 Building an MDI Application... 666 Summary... 669 Chapter 14 A Better Painting Framework (GDI+)... 671 Survey of the GDI+ Namespaces... 671 Overview of the System.Drawing Namespace... 673 Examining the System.Drawing Utility Types... 675 Regarding the Disposal of System.Drawing Types... 680 Understanding Paint Sessions... 680 Understanding the Graphics Class... 685 The GDI+ Coordinate Systems... 687 Establishing an Active Color... 692 Manipulating Fonts... 695 Building a Font Application... 698 The FontDialog Class... 703 Survey of the System.Drawing.Drawing2D Namespace... 705 xiv

Rendering Images... 720 Dragging, Hit Testing, and the PictureBox Control... 723 Understanding the.net Resource Format... 732 System.Resources Namespace... 733 Working with ResourceWriters... 737 Working with ResourceManagers... 737 Automatic Resource Configuration a la Visual Studio.NET... 739 Summary... 742 Chapter 15 Programming with Windows Forms Controls... 743 Understanding the Windows Forms Control Hierarchy... 743 Adding Controls to Forms (IDE-Free)... 744 Adding Controls to Forms (via VS.NET)... 747 The TextBox Control... 749 The Mighty Button Type... 752 Working with CheckBoxes... 755 Working with RadioButtons and GroupBoxes... 756 ListBoxes and ComboBoxes... 761 The MonthCalendar Control... 763 More on the DateTime Type... 766 Setting the Form s Default Input Button... 767 Configuring the Tab Order... 768 Assigning ToolTips to Controls... 769 The TrackBar Control... 770 Working with Panel Controls... 773 The UpDown Controls: DomainUpDown and NumericUpDown... 774 Working with the ErrorProvider... 776 Configuring a Control s Anchoring Behavior... 779 Configuring a Control s Docking Behavior... 780 Building Custom Dialog Boxes... 781 Understanding Form Inheritance... 787 Building Custom Windows Forms Controls... 789 Building a Custom UserControl... 790 Creating the Images... 791 Building the Design Time GUI... 792 Implementing the CarControl... 792 Controlling the Animation... 796 Rendering the Pet Name... 796 Testing the CarControl Type... 797 Select Members of the System.ComponentModel Namespace... 798 Enhancing the Design Time Appearance of CarControl... 800 Summary... 803 xv

Chapter 16 The System.IO Namespace... 805 Exploring the System.IO Namespace... 805 The Directory(Info) and File(Info) Types... 806 Enumerating Files with the DirectoryInfo Type... 810 Creating Subdirectories with the DirectoryInfo Type... 811 The Static Members of the Directory Class... 812 The FileInfo Class... 814 The Abstract Stream Class... 818 Working with StreamWriters and StreamReaders... 822 Working with StringWriters... 826 Working with StringReaders... 828 Working with Binary Data (BinaryReaders and BinaryWriters)... 829 Watching Files and Directories... 831 A Brief Word Regarding Asynchronous IO... 833 A Windows Forms Car Logger Application... 834 Summary... 841 Chapter 17 Data Access with ADO.NET... 843 The Need for ADO.NET... 843 The Two Faces of ADO.NET... 844 The Role of ADO.NET Data Providers... 845 Understanding the ADO.NET Namespaces... 850 The Types of System.Data... 851 Examining the DataColumn Type... 852 Examining the DataRow Type... 858 Details of the DataTable... 861 Building a Complete DataTable... 863 Understanding the DataView Type... 871 Understanding the Role of the DataSet... 874 Expressing Relations Using the DataRelation Type... 879 Reading and Writing XML-Based DataSets... 883 Building a Simple Test Database... 886 Selecting a Data Provider... 887 The Types of the System.Data.OleDb Namespace... 888 Working with the Connected Layer of ADO.NET... 888 Working with the OleDbDataReader... 894 Inserting, Updating, and Deleting Records Using OleDbCommand... 897 Executing a Stored Procedure Using OleDbCommand... 899 The Disconnected Layer and the OleDbDataAdapter Type... 901 Working with the SQL Data Provider... 906 xvi

Auto-Generating SQL Commands Using CommandBuilder Types... 912 A Complete ADO.NET Windows Forms Example... 914 Filling a Multitabled DataSet (and Adding DataRelations)... 916 Bring In the Wizards!... 919 Working with DataSets at Design Time... 927 Summary... 931 Part Five Web Applications and XML Web Services...933 Chapter 18 ASP.NET Web Pages and Web Controls... 935 The Role of HTTP... 935 Understanding Web Applications and Web Servers... 936 The Role of HTML... 939 HTML Form Development... 940 The Role of Client-Side Scripting... 943 Submitting the Form Data (GET and POST)... 947 Building a Classic Active Server Page... 947 The Problem(s) with Classic ASP... 950 Some Benefits of ASP.NET... 950 The ASP.NET Namespaces... 952 Creating an ASP.NET Web Application by Hand... 953 The ASP.NET Compilation Cycle... 958 Creating an ASP.NET Web Application via VS.NET... 961 Coding the BetterAspNetCarApp Web Application... 966 The Composition of an ASP.NET Page... 968 The Derivation of an ASP.NET Page... 970 Interacting with the Incoming HTTP Request... 971 Interacting with the Outgoing HTTP Response... 975 The Life Cycle of an ASP.NET Web Page... 978 Understanding the ASP.NET Web Controls... 982 Key Members of the System.Web.UI.Control Type... 985 Key Members of the System.Web.UI.WebControl Type... 990 Select Examples of ASP.NET WebForm Controls... 991 The Role of the Validation Controls... 1005 Understanding the Role of ASP.NET HTML Controls... 1014 And Now for Something Completely Different: GDI+ on the Web Server... 1016 Debugging and Tracing ASP.NET Pages... 1020 Summary... 1021 xvii

Chapter 19 ASP.NET Web Applications... 1023 The Issue of State... 1023 ASP.NET State Management Techniques... 1026 Understanding the Role of ASP.NET View State... 1026 The Role of the Global.asax File... 1030 Understanding the Application/Session Distinction... 1033 Working with the Application Cache... 1037 Maintaining Session Data... 1043 Understanding Cookies... 1047 Configuring Your ASP.NET Web Application Using web.config... 1050 Configuration Inheritance... 1057 Summary... 1058 Chapter 20 XML Web Services... 1059 Understanding the Role of XML Web Services... 1059 The Building Blocks of an XML Web Service... 1062 The.NET XML Web Service Namespaces... 1064 Examining the System.Web.Services Namespace... 1064 Building an XML Web Service in the Raw... 1065 Testing Your XML Web Service... 1066 Building an XML Web Service Using Visual Studio.NET... 1069 Understanding the System.Web.Services.WebService Base Class... 1072 Understanding the [WebMethod] Attribute... 1073 Understanding the [WebService] Attribute... 1077 Exploring the Web Service Description Language (WSDL)... 1078 The Basic Format of a WSDL Document... 1079 Viewing the HelloWS WSDL Document... 1082 The wsdl.exe Command Line Utility... 1084 Revisiting the XML Web Service Wire Protocols... 1086 Transforming WSDL into C# Code (Generating a Proxy)... 1089 Leveraging the Proxy (Synchronous Invocations)... 1092 Leveraging the Proxy (Asynchronous Invocations)... 1093 Avoiding Hard-Coded Proxy Logic... 1094 Generating a Proxy with VS.NET... 1095 Exposing Arrays of Types from Web Methods... 1096 A Windows Forms Client... 1097 xviii

Exposing Custom Types: The Details... 1098 Consuming Custom Types: The Details... 1099 Updating the CarsSalesInfoWS Project... 1100 Understanding the Discovery Service Protocol (UDDI)... 1102 Summary... 1105 Index... 1107 xix