Preface |
|
xxiii | |
Organization |
|
xxiii | |
Sample Programs |
|
xxv | |
Web Site |
|
xxv | |
Acknowledgments |
|
xxvi | |
About this Series |
|
xxvii | |
|
Web Sites in a .NET World |
|
|
1 | (30) |
|
|
2 | (4) |
|
|
2 | (1) |
|
The Costs of Collaboration |
|
|
3 | (1) |
|
|
4 | (1) |
|
Site-to-Site Collaboration |
|
|
5 | (1) |
|
|
5 | (1) |
|
|
6 | (8) |
|
Conventional Online Brochures |
|
|
7 | (1) |
|
|
7 | (1) |
|
Conventional Support Sites |
|
|
8 | (1) |
|
|
9 | (1) |
|
Conventional Online Stores |
|
|
10 | (1) |
|
|
11 | (1) |
|
Conventional Web Applications |
|
|
12 | (1) |
|
|
12 | (1) |
|
|
13 | (1) |
|
|
13 | (1) |
|
|
14 | (6) |
|
Experiences in Web Services |
|
|
14 | (1) |
|
|
15 | (1) |
|
Evolving to Deep Experiences |
|
|
16 | (1) |
|
|
17 | (1) |
|
|
18 | (2) |
|
Building and Maintaining a Web Site |
|
|
20 | (5) |
|
|
20 | (1) |
|
|
21 | (1) |
|
|
21 | (1) |
|
Building and Maintaining with .NET |
|
|
22 | (1) |
|
|
23 | (1) |
|
|
23 | (2) |
|
|
25 | (2) |
|
|
25 | (1) |
|
|
26 | (1) |
|
|
26 | (1) |
|
|
27 | (1) |
|
|
27 | (4) |
|
|
29 | (2) |
|
|
31 | (20) |
|
|
31 | (4) |
|
|
32 | (1) |
|
.NET Framework Class Library |
|
|
33 | (1) |
|
|
33 | (2) |
|
|
35 | (3) |
|
Managed Execution Processes |
|
|
35 | (1) |
|
Multilanguage Execution Environment |
|
|
36 | (1) |
|
Microsoft Intermediate Language (MSIL) |
|
|
36 | (1) |
|
|
37 | (1) |
|
|
38 | (1) |
|
|
38 | (8) |
|
|
38 | (1) |
|
|
39 | (1) |
|
|
40 | (3) |
|
Assembly Security Considerations |
|
|
43 | (1) |
|
|
43 | (2) |
|
|
45 | (1) |
|
|
45 | (1) |
|
|
46 | (3) |
|
What Are Application Domains? |
|
|
46 | (2) |
|
Application Domains and Assemblies |
|
|
48 | (1) |
|
Application Domain and Threads |
|
|
48 | (1) |
|
|
49 | (2) |
|
|
50 | (1) |
|
The Programming Environment of .NET Framework |
|
|
51 | (44) |
|
Cross-Language Interoperability |
|
|
51 | (1) |
|
The Programming Environment |
|
|
52 | (9) |
|
|
53 | (1) |
|
|
54 | (1) |
|
|
55 | (1) |
|
Common Language Specification |
|
|
56 | (1) |
|
|
57 | (1) |
|
|
57 | (2) |
|
|
59 | (2) |
|
Console Programs That Say ``Hello!'' |
|
|
61 | (9) |
|
|
61 | (1) |
|
Required Classes and Methods |
|
|
61 | (4) |
|
|
65 | (2) |
|
|
67 | (2) |
|
|
69 | (1) |
|
Components That Say ``Hello!'' |
|
|
70 | (3) |
|
|
70 | (1) |
|
Component as a Derived Class in C# |
|
|
71 | (1) |
|
Component as a Derived Class in Visual Basic |
|
|
72 | (1) |
|
Component as a Derived Class in C++ |
|
|
72 | (1) |
|
Client Programs of the Components |
|
|
73 | (11) |
|
|
73 | (2) |
|
Console Program in Visual Basic |
|
|
75 | (1) |
|
|
76 | (2) |
|
|
78 | (4) |
|
|
82 | (2) |
|
|
84 | (11) |
|
|
85 | (2) |
|
|
87 | (2) |
|
|
89 | (2) |
|
TCPListener and Server Programming |
|
|
91 | (2) |
|
|
93 | (2) |
|
|
95 | (88) |
|
|
96 | (2) |
|
|
98 | (8) |
|
Coding in ASP.NET versus ASP |
|
|
99 | (2) |
|
ASP.NET and Common Language Runtime |
|
|
101 | (3) |
|
|
104 | (2) |
|
|
106 | (20) |
|
|
106 | (2) |
|
|
108 | (1) |
|
|
108 | (4) |
|
|
112 | (6) |
|
Page Directive and Tracing |
|
|
118 | (2) |
|
HttpRequest and HttpResponse Classes |
|
|
120 | (1) |
|
|
120 | (2) |
|
|
122 | (1) |
|
Request/Response Programming in ASP.NET |
|
|
123 | (3) |
|
|
126 | (6) |
|
|
127 | (1) |
|
Creating an ASP.NET Web Application Using VS.NET |
|
|
128 | (1) |
|
HTML Controls in Visual Studio |
|
|
129 | (2) |
|
Examples of HTML Controls |
|
|
131 | (1) |
|
|
132 | (6) |
|
Required Field Validation |
|
|
133 | (2) |
|
Regular Expression Validation |
|
|
135 | (1) |
|
Other Validation Controls |
|
|
135 | (3) |
|
|
138 | (4) |
|
|
142 | (1) |
|
|
143 | (32) |
|
Building the TAUM Web Site Using Visual Studio.NET |
|
|
143 | (1) |
|
Configuring the TAUM Web Site |
|
|
144 | (1) |
|
Building Supporting Libraries |
|
|
144 | (2) |
|
|
146 | (5) |
|
|
151 | (3) |
|
|
154 | (2) |
|
ASP.NET State Fundamentals |
|
|
156 | (1) |
|
Session State: ASP.NET Versus ASP |
|
|
157 | (1) |
|
|
157 | (2) |
|
|
159 | (3) |
|
|
162 | (1) |
|
Configuration Under ASP.NET |
|
|
163 | (1) |
|
|
163 | (2) |
|
|
165 | (1) |
|
|
166 | (1) |
|
Application Security Under ASP.NET |
|
|
167 | (1) |
|
|
167 | (2) |
|
Authentication in ASP.NET |
|
|
169 | (1) |
|
Forms-Based Authentication and Authorization |
|
|
170 | (4) |
|
|
174 | (1) |
|
Migrating from ASP to ASP.NET |
|
|
175 | (8) |
|
To Migrate or Not to Migrate |
|
|
175 | (1) |
|
|
176 | (1) |
|
Option 2: Start from Scratch Now |
|
|
176 | (1) |
|
|
176 | (1) |
|
|
177 | (1) |
|
Changes in Intrinsic Objects |
|
|
177 | (2) |
|
Changes in Layout and Coding Style |
|
|
179 | (1) |
|
Changes in Application Configurations |
|
|
179 | (1) |
|
Changes in Session and State Management |
|
|
180 | (1) |
|
Changes in Security Model and Practice |
|
|
180 | (1) |
|
Best Practices to Prepare for Migration |
|
|
180 | (1) |
|
|
181 | (2) |
|
|
183 | (58) |
|
|
183 | (3) |
|
|
184 | (1) |
|
|
185 | (1) |
|
|
186 | (5) |
|
|
191 | (6) |
|
The SQL Server .NET Data Provider |
|
|
192 | (1) |
|
The OLE DB .NET Data Provider |
|
|
192 | (1) |
|
Choosing a .NET Data Provider |
|
|
193 | (1) |
|
|
194 | (3) |
|
Using .NET Data Provider to Access Data |
|
|
197 | (12) |
|
|
197 | (1) |
|
|
198 | (1) |
|
|
199 | (2) |
|
|
201 | (1) |
|
|
201 | (2) |
|
|
203 | (1) |
|
Stored Procedures and Functions |
|
|
203 | (4) |
|
|
207 | (2) |
|
|
209 | (24) |
|
Building Blocks of DataSet |
|
|
209 | (1) |
|
Populate DataSet from Database |
|
|
210 | (3) |
|
|
213 | (2) |
|
|
215 | (1) |
|
|
215 | (1) |
|
|
216 | (2) |
|
|
218 | (4) |
|
|
222 | (1) |
|
|
222 | (3) |
|
Relation Between DataTables |
|
|
225 | (3) |
|
Update Database from Dataset |
|
|
228 | (1) |
|
|
229 | (1) |
|
A Scenario with a Single Table |
|
|
229 | (1) |
|
A Scenario with Multiple Tables |
|
|
230 | (2) |
|
|
232 | (1) |
|
XML Integration With ADO.NET |
|
|
233 | (8) |
|
Data Exchange Between XML and DataSet |
|
|
233 | (1) |
|
Writing XML from a DataSet |
|
|
233 | (2) |
|
Loading a DataSet from XML |
|
|
235 | (1) |
|
Schemas of DataSet and XML |
|
|
236 | (1) |
|
Writing DataSet Schema as XSD |
|
|
237 | (1) |
|
Loading DataSet Schema by Reading XSD |
|
|
237 | (1) |
|
Inferring DataSet Schema from XML |
|
|
237 | (1) |
|
|
238 | (1) |
|
|
239 | (2) |
|
|
241 | (22) |
|
|
241 | (9) |
|
|
242 | (2) |
|
``Hello!'' Service in Visual Basic |
|
|
244 | (3) |
|
``Hello!'' Service in JScript |
|
|
247 | (3) |
|
|
250 | (5) |
|
|
250 | (2) |
|
Console Program as a Client of Web Services |
|
|
252 | (1) |
|
ASP.NET Page as a Client of Web Services |
|
|
253 | (2) |
|
Asynchronous Invocation of Web Services |
|
|
255 | (8) |
|
Synchronous Mode versus Asynchronous Mode |
|
|
255 | (1) |
|
Standard Approach to Asynchronous Invocation |
|
|
255 | (5) |
|
Shortcut for Web Services |
|
|
260 | (1) |
|
|
261 | (2) |
|
Programming XML with .NET Framework |
|
|
263 | (46) |
|
|
263 | (30) |
|
Tree---XML DOM---Random Hierarchy Access Model |
|
|
264 | (3) |
|
|
267 | (1) |
|
|
268 | (2) |
|
Using the Properties of an XmlNode |
|
|
270 | (2) |
|
Query by XPath and Insert New Node |
|
|
272 | (2) |
|
Cursor---Reader/Writer---Sequential Access Mode, Forward Only |
|
|
274 | (1) |
|
Read Through the Entire Tree |
|
|
274 | (8) |
|
Read the Required Nodes Only |
|
|
282 | (2) |
|
|
284 | (1) |
|
Validation Type Property and ValidationEventHandler Event |
|
|
284 | (5) |
|
|
289 | (3) |
|
|
292 | (1) |
|
Working with Relational Data: XmlDataDocument and DataSet |
|
|
293 | (8) |
|
DataSet and Schema: DataSet.ReadSchema |
|
|
293 | (4) |
|
Mapping XML to Tables: DataSet.Tables |
|
|
297 | (2) |
|
Data Record in Rows: DataSet.Tables().Rows |
|
|
299 | (2) |
|
|
301 | (4) |
|
Working With XML Style Sheet: Xml.Xsl.XslTransform |
|
|
301 | (1) |
|
Transform to XHTML or Another XML |
|
|
302 | (3) |
|
|
305 | (4) |
|
Serve XML from Web Servers |
|
|
305 | (2) |
|
|
307 | (1) |
|
|
307 | (1) |
|
Web Services and Object Remoting |
|
|
308 | (1) |
|
|
308 | (1) |
|
|
309 | (26) |
|
|
309 | (4) |
|
Communication Between Applications |
|
|
309 | (1) |
|
Building Blocks for Object Remoting |
|
|
310 | (1) |
|
|
310 | (1) |
|
|
311 | (1) |
|
|
311 | (1) |
|
Registration of Well-Known Object |
|
|
311 | (1) |
|
Configuration of Remoting |
|
|
312 | (1) |
|
|
313 | (1) |
|
Object Remoting over an HTTP Channel |
|
|
313 | (9) |
|
Server with Registration of Well-Known Object |
|
|
314 | (1) |
|
Client Using Activator.GetObject |
|
|
315 | (2) |
|
Server with Registration of Remoting |
|
|
317 | (2) |
|
Client with Registration of Remoting |
|
|
319 | (1) |
|
|
320 | (2) |
|
Object Remoting over a TCP Channel |
|
|
322 | (3) |
|
Server with Registration of Well-Known Object |
|
|
322 | (1) |
|
Client Using Activator.GetObject |
|
|
323 | (2) |
|
Server with Registration of Remoting |
|
|
325 | (1) |
|
Client with Registration of Remoting |
|
|
325 | (1) |
|
|
325 | (1) |
|
Asynchronous Invocation of Remote Method |
|
|
325 | (3) |
|
Deployment of a Service Without Its Implementation |
|
|
328 | (7) |
|
|
329 | (3) |
|
|
332 | (2) |
|
|
334 | (1) |
|
|
335 | (36) |
|
|
336 | (10) |
|
|
336 | (2) |
|
The SOAP Message Exchange Model and XML |
|
|
338 | (1) |
|
|
338 | (2) |
|
|
340 | (1) |
|
|
340 | (1) |
|
|
341 | (1) |
|
|
342 | (2) |
|
Using SOAP in HTTP and for RPC |
|
|
344 | (1) |
|
|
344 | (1) |
|
|
345 | (1) |
|
|
346 | (4) |
|
|
346 | (1) |
|
|
347 | (1) |
|
|
348 | (1) |
|
|
349 | (1) |
|
|
349 | (1) |
|
Building Simple SOAP Clients Under .NET |
|
|
350 | (21) |
|
Accessing Web Services Using SOAP Clients |
|
|
350 | (1) |
|
Creating a Web Service Using VS.NET |
|
|
351 | (5) |
|
Creating a VB.NET SOAP Client Using VS.NET |
|
|
356 | (3) |
|
Putting the Client and Server Together |
|
|
359 | (6) |
|
.NET Remoting Using SOAP Clients |
|
|
365 | (3) |
|
|
368 | (3) |
|
Interoperating .NET with Other Platforms |
|
|
371 | (32) |
|
|
372 | (9) |
|
|
372 | (5) |
|
|
377 | (1) |
|
|
378 | (1) |
|
|
378 | (1) |
|
|
379 | (1) |
|
|
380 | (1) |
|
Interoperating with .NET by Examples |
|
|
381 | (18) |
|
Accessing .NET Web Services from an Apache SOAP Client |
|
|
382 | (1) |
|
Customizing NET Web Services forInteroperating |
|
|
382 | (2) |
|
Configuring Apache SOAP Server and Client |
|
|
384 | (3) |
|
Our First Apache SOAP Client for .NET Web Services |
|
|
387 | (2) |
|
Enhancing the Apache SOAP Client |
|
|
389 | (4) |
|
Accessing Apache Web Services from a .NET SOAP Client |
|
|
393 | (1) |
|
Creating and Deploying Apache SOAP Web Services |
|
|
393 | (2) |
|
Generating WSDL Documents Based on Apache SOAP |
|
|
395 | (3) |
|
Generating Proxy for Web Services Under .NET |
|
|
398 | (1) |
|
Running the C# Client for Apache SOAP Web Services |
|
|
398 | (1) |
|
Universal Description, Discovery, and Integration |
|
|
399 | (4) |
|
|
399 | (1) |
|
Connecting Enterprises Using SOAP, UDDI, and WSDL |
|
|
400 | (1) |
|
The State of UDDI Development Today |
|
|
401 | (1) |
|
|
402 | (1) |
|
A Case Study: A Distributed Web Application |
|
|
403 | (22) |
|
|
404 | (1) |
|
The Goals of TAU.NET System Design |
|
|
405 | (3) |
|
|
405 | (1) |
|
|
406 | (1) |
|
|
406 | (1) |
|
|
406 | (2) |
|
|
408 | (11) |
|
|
408 | (2) |
|
|
410 | (1) |
|
Schema for Inquiries About TAU Products and Services |
|
|
410 | (2) |
|
Data Schema for Inquiries About Member Services |
|
|
412 | (3) |
|
Other Schema for Data Exchange |
|
|
415 | (1) |
|
|
415 | (1) |
|
|
416 | (1) |
|
Server Objects for Web Services |
|
|
416 | (2) |
|
Proxy Objects for Web Services |
|
|
418 | (1) |
|
|
419 | (6) |
|
TAU.NET Node Adaptor to Link Cell System Database |
|
|
419 | (2) |
|
TAU.NET Node Adaptor to Serve a Web Page |
|
|
421 | (3) |
|
|
424 | (1) |
APPENDIX A Web Programming Fundamentals |
|
425 | (38) |
|
A.1 Classical Web Technology |
|
|
426 | (10) |
|
|
426 | (2) |
|
A.1.1.1 Uniform Resource Locators |
|
|
428 | (1) |
|
|
428 | (1) |
|
|
428 | (3) |
|
|
431 | (1) |
|
|
431 | (1) |
|
|
432 | (1) |
|
A.1.3.2 Web Server Response |
|
|
432 | (1) |
|
|
433 | (1) |
|
|
433 | (1) |
|
A.1.4.1 A Dynamic Web Page |
|
|
434 | (1) |
|
A.1.4.2 More About HTML Forms |
|
|
435 | (1) |
|
A.2 An Internet Programming Testbed |
|
|
436 | (6) |
|
A.2.1 Internet Explorer 6.0 |
|
|
436 | (1) |
|
A.2.2 Internet Information Services 5.0 |
|
|
437 | (1) |
|
A.2.2.1 Publishing to Your Web Site |
|
|
437 | (2) |
|
A.2.2.2 Directory Browsing |
|
|
439 | (1) |
|
A.2.2.3 Running CGI Scripts |
|
|
440 | (2) |
|
A.3 Microsoft Web Technologies |
|
|
442 | (15) |
|
A.3.1 Microsoft Client-Side Web Technologies |
|
|
443 | (1) |
|
|
444 | (1) |
|
A.3.1.2 VBScript and JavaScript |
|
|
445 | (1) |
|
|
446 | (2) |
|
A.3.1.4 Safety Configuration in Internet Explorer |
|
|
448 | (1) |
|
1.3.1.5 Downloading an ActiveX Control |
|
|
448 | (4) |
|
A.3.2 Microsoft Server-Side Web Technologies |
|
|
452 | (1) |
|
A.3.2.1 Internet Server API (ISAPI) |
|
|
452 | (3) |
|
|
455 | (2) |
|
|
457 | (6) |
|
|
458 | (1) |
|
A.4.2 Request and Response Using ASP |
|
|
459 | (1) |
|
|
460 | (3) |
APPENDIX B New Features of VB. NET |
|
463 | (26) |
|
|
463 | (12) |
|
|
464 | (1) |
|
B.1.2 Method Overriding and Polymorphism |
|
|
465 | (1) |
|
|
466 | (1) |
|
|
467 | (1) |
|
B.1.5 Termination of Objects and Garbage Collection |
|
|
467 | (2) |
|
|
469 | (1) |
|
|
470 | (2) |
|
B.1.8 Shared Methods and Class Members |
|
|
472 | (1) |
|
|
472 | (1) |
|
B.1.10 Structured Exception Handling |
|
|
473 | (2) |
|
|
475 | (5) |
|
|
475 | (1) |
|
|
476 | (2) |
|
B.2.3 Decisions on Modularization |
|
|
478 | (1) |
|
|
479 | (1) |
|
B.3 More Formal, Less Casual |
|
|
480 | (4) |
|
|
480 | (1) |
|
|
480 | (1) |
|
B.3.3 Def<Type>Statements |
|
|
481 | (1) |
|
|
481 | (1) |
|
|
481 | (1) |
|
|
482 | (1) |
|
|
482 | (1) |
|
B.3.8 Nonstructured Programming Constructs |
|
|
482 | (1) |
|
B.3.9 VarPtr, StrPtr, and ObjPtr |
|
|
482 | (1) |
|
|
482 | (1) |
|
|
483 | (1) |
|
|
483 | (1) |
|
B.3.13 Optional Parameters |
|
|
483 | (1) |
|
B.3.14 Static Local Variables |
|
|
484 | (1) |
|
B.4 Safer, More Powerful, and Improved Performance |
|
|
484 | (5) |
|
B.4.1 Cross-Language Interoperability |
|
|
484 | (1) |
|
|
484 | (1) |
|
|
485 | (1) |
|
|
485 | (1) |
|
|
485 | (1) |
|
|
485 | (1) |
|
|
486 | (1) |
|
|
486 | (3) |
APPENDIX C C# for C++ or Java Programmers |
|
489 | (18) |
|
C.1 C# for C++ Programmers |
|
|
489 | (7) |
|
|
491 | (1) |
|
C.1.1.1 Memory Management |
|
|
491 | (1) |
|
|
491 | (2) |
|
|
493 | (1) |
|
C.1.1.4 Syntax Improvement |
|
|
493 | (2) |
|
|
495 | (1) |
|
C.2 C# for Java Programmers |
|
|
496 | (11) |
|
C.2.1 C# Simple Type versus Java Primitive Type |
|
|
496 | (1) |
|
C.2.2 C# Namespace and Assembly versus Java Package |
|
|
497 | (1) |
|
|
498 | (2) |
|
|
500 | (3) |
|
|
503 | (1) |
|
|
503 | (1) |
|
|
503 | (1) |
|
C.2.6 Method Parameter Passing, ref, and out |
|
|
504 | (1) |
|
|
504 | (1) |
|
C.2.8 Operator Overloading |
|
|
504 | (1) |
|
|
504 | (1) |
|
C.2.10 XML Documentation versus JavaDoc |
|
|
505 | (1) |
|
|
505 | (2) |
APPENDIX D New Features in JScript.NET |
|
507 | (22) |
|
|
508 | (1) |
|
|
508 | (1) |
|
D.3 The Two Uses of JS.NET |
|
|
509 | (1) |
|
D.4 JScript Tour in Visual Studio.NET |
|
|
509 | (2) |
|
D.4.1 Working with JS.NET in VS.NET |
|
|
509 | (1) |
|
D.4.2 Creating a JS.NET File |
|
|
510 | (1) |
|
D.4.3 Building a JS.NET Executable |
|
|
510 | (1) |
|
D.4.4 Running Your JS.NET Executable |
|
|
510 | (1) |
|
D.5 Object-Oriented Features |
|
|
511 | (8) |
|
|
511 | (1) |
|
|
512 | (1) |
|
|
513 | (4) |
|
|
517 | (1) |
|
|
517 | (2) |
|
D.6 Performance Enhancements |
|
|
519 | (1) |
|
D.7 Packaging and Deployment (EXE, DLLs, and Packaging) |
|
|
520 | (2) |
|
|
521 | (1) |
|
D.7.2 Package and Import Keywords |
|
|
521 | (1) |
|
|
522 | (2) |
|
|
524 | (5) |
|
D.9.1 Conditional Compilation |
|
|
524 | (1) |
|
D.9.2 Command Line Arguments |
|
|
524 | (4) |
|
|
528 | (1) |
APPENDIX E Visual Studio.NET |
|
529 | (18) |
|
E.1 Overview of Visual Studio.NET |
|
|
529 | (3) |
|
|
532 | (2) |
|
E.3 Creating a Console Application |
|
|
534 | (2) |
|
E.3.1 Creating a C# Project |
|
|
535 | (1) |
|
|
535 | (1) |
|
E.4 Using the VS.NET Text Editor |
|
|
536 | (2) |
|
E.4.1 Building the Project |
|
|
537 | (1) |
|
E.4.2 Running the Program |
|
|
537 | (1) |
|
E.4.3 Running the Program in the Debugger |
|
|
537 | (1) |
|
E.5 Project Configurations |
|
|
538 | (2) |
|
E.5.1 Creating a New Configuration |
|
|
538 | (1) |
|
E.5.2 Setting Build Settings for a Configuration |
|
|
539 | (1) |
|
|
540 | (7) |
|
E.6.1 Just-in-Time Debugging |
|
|
540 | (2) |
|
|
542 | (1) |
|
|
542 | (1) |
|
E.6.2.2 Watching Variables |
|
|
543 | (1) |
|
|
544 | (1) |
|
|
545 | (1) |
|
|
545 | (2) |
Index |
|
547 | |