Part Ⅰ Create User Services 1
1 Create ASP.NET Pages:Build the Interface 3
Add and Set Directives onASP.NET Pages 4
The.NET Framework 4
The ASP.NET Execution Model 7
ASP.NET Directives 7
Exercise 1-1:Create an ASP.NET Project in Visual Studio.NET 11
Add HTML Server,Web Server,User Controls,and HTML Code to ASP.NET Pages 12
Add HTML Server Controls 12
Add Web Server Controls 13
Add User Controls 14
Exercise 1-2:Add Server Controls 17
Add HTML code 21
Apply Templates 24
Exercise 1-3:Apply Templates to the Repeater Control 25
Set Styles onASP.NET Pages by Using Cascading Style Sheets 27
Implement Navigation for the User Interface 29
Manage the View State 30
Manage Data During Postback Events 30
Exercise 1-4:Manage ViewState with IsPostBack 31
Using Session State to Manage Data Across Pages 32
Separate User Interface Resources from Business Logic 35
Create and Use Code-Behind Pages 35
Exercise 1-5:Using Visual Studio to Implement Code-Behind Pages 36
Two-Minute Drill 39
Q&A SelfTest 41
Lab Question 46
Self Test Answers 47
Lab Answer 49
2 Create ASP.NET Pages:Enable the Interface 51
Validate User Input 52
Using Input Validation Controls 53
Exercise 2-1:Add Validation Controls 58
Validate the Page 60
Exercise 2-2:Using the Validation Summary Control 62
Implement Error Handling in the User Interface 65
Structured Exception Handling 66
Implement Global.asax,Application,Page-level,and Page Event Error Handling 68
Exercise 2-3:Using the Page_Error Event 69
Exercise 2-4:Using the Application_Error Event to Write to the Windows Event Log 73
Exercise 2-5:Using the Application_Error Event to Send E-Mail 76
Configure Custom Error Pages 76
Exercise 2-6:Configure Custom Error Pages 78
Exercise 2-7:Implement Online User Assistance 80
Implement Online User Assistance 80
Incorporate Existing Code into ASP.NET Pages 83
Code-behind Pages 83
User Controls and Custom Controls 83
Server-Side Includes 83
Exercise 2-8:Using Server-SideIncludes 84
Two-Minute Drill 87
Q&A SelfTest 89
Lab Question 93
Self Test Answers 94
Lab Answer 96
3 Create ASP.NET Pages:Extend the Interface 97
Instantiate and Invoke Web Services or Components 98
Instantiate and Invoke a Web Service 99
Exercise 3-1:Build an XML Web Service 100
Exercise 3-2:Using an XML Web Service from a Web Form 108
Instantiate and Invoke a COM or COM+Component 111
Instantiate and Invoke a.NET Component 113
Exercise 3-3:Build and Invoke a.NET Component 113
Call Native Functions by Using Platform Invoke 115
Implement Globalization 117
Implement Localizability for the User Interface 117
Exercise 3-4:Identify the Browser's Culture Settings 118
Prepare Culture-Specific Formatting 120
Exercise 3-5:Set the Culture and UICulture Values from Code 121
Exercise 3-6:Create and Use.resource Files 122
Convert Existing Encodings 125
Implement Right-to-Left and Left-to-Right Mirroring 126
Implement Accessibility Features 127
Use Intrinsic Objects 127
Exercise 3-7:Create and Use Cookies 131
Two-Minute Drill 135
Q&A Self Test 137
Lab Question 141
Self Test Answers 142
Lab Answer 144
Part Ⅱ Create and Manage Components and.NET Assemblies 145
4 Create and Modify a.NET Assembly 147
Create Resource-Only Assemblies 148
Global Applications 149
Resource Files 152
Assemblies 168
Exercise 4-1:Create Resource Files and Package Them into Assemblies 171
Create and Implement Satellite Assemblies 173
Neutral and Culture-Specific Assemblies 174
Location of Assemblies in the Virtual Directory 176
How the Framework Finds the Right Assembly for the Job 177
Exercise 4-2:Create a GlobalizedApplication 181
Two-Minute Drill 185
Q&A Self Test 187
Lab Question 192
Self Test Answers 193
Lab Answer 196
5 Create Controls 197
Create Custom Controls and User Controls 199
Create Custom Controls 199
Exercise 5-1:Create a Custom Control Using Composition 245
Create User Controls 249
Two-Minute Drill 254
Q&A SelfTest 255
Lab Question 259
Self Test Answers 260
Lab Answer 263
Part Ⅲ Consume and Manipulate Data 265
6 Data Access with SQL Server 267
Access and Manipulate Data from a Microsoft SQL Server Database 268
Overview of Data Access 269
Structured Query Language:A Review 272
Access SQL Server with ADQ.NET 277
Exercise 6-1:Access and Manipulate Data from a SQL Server Database 306
Use Stored Procedures 315
Two-Minute Drill 318
Q&A Self Test 319
Lab Question 323
Self Test Answers 325
Lab Answer 327
7 Data Access from a Data Store 331
Access and Manipulate Data from a Data Store 332
Access Data from a Relational Database 333
Access Data from XML Documents 358
Exercise7-1:Access and Manipulate Data from a Data Store 368
Handle Data Errors 371
Two-Minute Drill 376
Q&A Self Test 377
Lab Question 381
Self Test Answers 383
Lab Answer 385
8 Test and Debug an ASP.NET Application 387
Create a Unit Test Plan 389
Structured Basis Test 392
Data-Flow Testing 394
Equivalence Partition 396
Error Guess 396
Test Data 401
Implement Tracing 402
Trace and Debug Objects 403
Add Trace Listeners and Trace Switches to an Application 414
Debug,Rework,and Resolve Defects in Code 420
Configure the Debugging Environment 420
Using the Debugger 424
Execute Tests 436
Resolve Errors and Rework Code 437
Two-Minute Drill 439
Q&A SelfTest 440
Lab Question 445
Self Test Answers 446
Lab Answer 449
Part Ⅳ Deploy a Web Application 449
9 Plan and Deploy a Web Application 451
Plan the Deployment of a Web Application 452
Requirements for Deployment 453
Exercise 9-1:Prepare and Deploy a Web Application Using XCOPY 455
Exercise 9-2:Deploy a Web Application Using Copy Project 460
Plan a Deployment that Uses Removable Media 461
Exercise 9-3:Create a Web Setup Project to Deploy with Removable Media 462
Plan a Web-Based Deployment 465
Use Deployment Editors 466
Plan the Deployment of an Application to a Web Garden,a Web Farm,or a Cluster 482
Create a Setup Program that Installs a Web Application and Allows It to Be Uninstalled 483
Exercise 9-4:Uninstall the Chapter9Setup Web Application 483
Add Assemblies to the Global Assembly Cache 485
Exercise 9-5:Using a Web Setup Project to Add an Assembly to the Global Assembly Cache 486
Deploy a Web Application 488
Two-Minute Drill 490
Q&A Self Test 492
Lab Question 496
Self Test Answers 497
Lab Answer 499
Part Ⅴ Maintain and Support a Web Application 501
10 Support Web Applications 503
Optimize the Performance of a Web Application 504
ASP.NET Caching 504
Exercise 10-1:Using the OutputCache Directive 506
Exercise 10-2:Create Multiple Cached Pages Using the VaryByParam Attribute 508
Exercise 10-3:Fragment Caching 512
Exercise 10-4:Using the Cache Method 515
Exercise 10-5:Cache Data Dependent on an XML File 516
Diagnose and Resolve Errors and Issues 524
Monitor Application Performance 524
Exercise 10-6:Monitor and Performance Test an ASP.NET Application 536
Two-Minute Drill 542
Q&A Self Test 544
Lab Question 548
Self Test Answers 549
Lab Answer 551
Part Ⅵ Configure and Secure a Web Application 553
11 Configure a Web Application 555
Configure a Web Application 556
Application Settings in the web.config File 558
Machine-Level Settings in the machine.config File 576
Exercise 11-1:Configure a Web Application 577
Configure and Implement Session State 578
Exercise 11-2:Configure and Implement Session State 582
Install and Configure Server Services 583
Install and Configure a Web Server 583
Install and Configure Microsoft FrontPage Server Extensions 592
Exercise 11-3:Install and Configure Server Services 595
Two-Minute Drill 599
Q&A Self Test 600
Lab Question 604
Self Test Answers 605
Lab Answer 608
12 Configure Security for a Web Application 611
Select and Configure Authentication 612
Security Basics 612
Authentication 615
Exercise 12-1:Configure IIS and Windows Authentication 617
Exercise 12-2:Using Forms-Based Authentication 621
Exercise 12-3:Using the web.config File as a Credential Store 623
Exercise 12-4:Create a Hashing Tool for User Passwords 625
Configure Authorization 631
File Authorization 631
Exercise 12-5:Using File Authorization 632
URL Authorization 635
Exercise 12-6:Using URLAuthorization 637
Implement Impersonation 640
Two-Minute Drill 643
Q&A SelfTest 645
Lab Question 650
Self Test Answers 651
Lab Answer 653
Part Ⅶ Appendixes 655
A About the CD-ROM 657
System Requirements 658
LearnKey Online Training 658
Installing and Running MasterExam and MasterSim 658
MasterExam 659
MasterSim 659
Electronic Book 659
Help 659
Removing Installation(s) 660
Technical Support 660
LearnKey Technical Support 660
B Exam 70-305:Certification Objective Mapping 661
Index 667