safe safety level, CLR (Common Language Runtime), 956
SafeHandle class, 704
SafeTransactionHandle, 704
safety palette
in GDI+, 1098
graphics display modes and, 1097
overview of, 1098
Sans serif font families, 1108
satellite assemblies, languages, 662
SaveFile( ) method, ReadWriteText application, 820
SaveSettings( ) method, 837–838, 842–843
SAX, XmlReader vs., 907
scalars, 173
sc.exe, 733–734
scheduled replication, 1588
schema
Active Directory, 1585, 1589–1590
data table, 870
overview of, 870
strongly typed XML, 981–982
schema generation, 874–876
SCM (Service Control Manager)
communication function with services, 711–712
interaction with service classes, 722
main, service-main, and handler functions, 712
scope
ambient transactions and, 691–693
nested scopes with ambient transactions, 693–695
variable, 36–38
<script> element, 1325
scripting languages, interoperability, 7
ScriptManager control, ASP.NET AJAX
client-side JavaScript references and, 1318
detecting partial-page postbacks, 1317–1318
as extension, 1306
overview of, 1317
Web service references, 1318–1319
<Scripts> element, 1318
scrollable windows, drawing, 1088–1094
ScrollableControl, 1023
ScrollBar control, WPF, 1148
ScrollMoreShapes application, 1101–1102
SDI (Single Document Interface), Windows Forms, 1016
sealed keyword, 117–118
search, Active Directory
building UserSearch application, 1610–1614
overview of, 1606–1610
through DSML, 1615–1618
search, lists, 277–279
search, Windows Vista, 1666–1673
Advanced Query Syntax, 1671–1673
OLE DB Provider, 1668–1671
overview of, 1666–1668
SearchRoot, 1606
SearchScope, 1606–1607
secondary indexes, XML, 980
security
adding events to database, 1242
ClickOnce, 461
code access. See code access security
configuration categories, 509
configuring with Component Services Explorer, 1464–1465
Enterprise Service, 1457
file, 824–829
with .NET Remoting, 1442–1444
role-based. See role-based security
role-based vs. code-based, 14
serialized objects and, 1424–1425
SQL Server hosting .NET runtime, 956
WCF (Windows Communication Foundation) and, 1512
security, ASP.NET, 1276–1284
directories, 1281–1282
forms authentication, 1276–1279
login system, 1280
overview of, 1276
in PCSDemoSite, 1282–1284
Web server controls, 1280–1281
security configuration file, 614–617
security policies
levels, 601–603
limitations of .NET security policy, 613–614
resetting, 618
security zones
Internet Zone, 461–462
managing, 632–636
SecurityAction enumeration, 607
secutil.exe, 628
Select( ) extension method, LINQ, 1693
Select methods, XPathNavigator, 922
SELECT statements
Advanced Query Syntax, 1671–1673
OLE DB Provider, 1671
Select/Case statement, switch statements in Visual Basic, 1635–1636
SelfPlacingWindow application, 834–840
Semaphore class, 576–578
Send( ) method
Course Order sample application, 1502
response queues, 1508
sending complex messages, 1496
sending message to queue, 1493–1495
Sequential Workflow, 1565, 1579–1580
SequentialWorkflowActivity, 1565
Serializable level, transactions, 857
serialization
marshal-by-value classes and, 1421
.NET base classes for, 789
security and, 1424–1425
serialization, in XML
overview of, 943–950
without source code access, 950–953
Serif font families, 1108
server context sinks, 1421
server controls, ASP.NET. See controls, ASP.NET
Server Explorer
creating database connection, 1058–1062
managing services, 734
Visual Studio 2005 windows, 422
server.exe. config file, 1447–1448
serverless binding, 1596
servers, 1446
Active Directory binding server name, 1596
channels, 1412
client from Web Server deployment, 456–457
client-activated objects, 1416–1417
code using configuration files, 1433–1434
configuration file, 1447–1448
configuration for client-activated objects, 1432–1433
configuration for well-known objects, 1431
hosting in ASP.NET, 1438–1440
installing ASP.NET Web sites on built-in, 1216–1217
lifetime management for, 1426–1429
overview of, 1408–1409
requirements for .NET-based applications, 443–444
security, 1442–1444
for well-known objects, 1416
server-side UpdatePanel updates, 1320–1321
service configuration program, 713
service contracts
defined, 1522
overview of, 1515–1516
properties, 1522–1524
service implementation, 1528–1529
Service Control Manager. See SCM (Service Control Manager)
service control program, 712, 713
service host, WCF
duplex communication between client and, 1538–1540
hosting process, 1535–1536
overview of, 1517–1519
service implementation and, 1529–1530
service program, Windows Services, 711, 712
<service> element
defined, 1430
server configuration for client-activated objects, 1432–1433
service host, 1518–1519
Service.asmx file, 1377–1380, 1385
ServiceBase class, 722–723, 744
ServiceBehavior attribute, 1526–1528, 1536
ServiceContract property, service contract, 1523
ServiceController class
controlling services, 741–742
methods, 741
monitoring services, 735–740
overview of, 734–735
properties, 735–736
ServicedComponent class, 1458
ServiceHost, 1517–1522
ServiceInstaller, 727–730
ServiceInstallerDialog, 730
service-main function, Windows Services, 712
ServiceModel Metadata (Svcutil.exe) utility, 1536–1537
ServiceProcessInstaller, 727–730
services, WF, 1572–1578
custom services, 1577–1578
overview of, 1572–1573
persistence service, 1574–1575
tracking service, 1575–1576
services, Windows. See Windows Services
Services administration tool, 710
Services snap-in, MMC, 732
<Services> element, 1318–1319
sessions
defined, 1251
WCF binding supporting, 1534
set accessor, 94, 1631–1632
SetAccessControl method, 828
SetData( ) method, CallContext, 1450–1452
SetError( ) method, ErrorProvider, 1004–1005
SetOrderId( ) method, OrderData, 1475
SetShowHelp( ) method, HelpProvider, 1005
Setup Project, Visual Studio 2005, 447
Setup Wizard Project, Visual Studio 2005, 447
SetValue( ) method
arrays, 140–141
registry keys, 833
SelfPlacingWindow application, 839
transactional resources, 700
shapes
drawing, 1076–1079, 1100–1102
painting, 1079–1080
WPF and, 1144–1147
shared assemblies
creating, 503–504
defined, 478
delayed signing of private keys, 507
encrypting, 501–502
installing, 505
names, 500–503
overview of, 19, 500
private assemblies compared with, 472–473
publisher policy files and, 515
references to, 508
strong names, 504–505
versioning, 510
working with, 506–507
shared classes, ADO.NET, 849
Shared keyword, static members in Visual Basic, 1633–1634
shield icons, Windows Vista, 1656–1658
shortcut keys, assigning to menu item, 1016
shortcut operators, 157–159
Show( ) method
displaying task dialog, 1662
drawing shapes, 1077
ShowActivatedServiceTypes( ) method, 1433–1434
ShowChannelProperties( ) method, 1413
ShowWellKnownServiceTypes( ) method, 1433–1434
side-by-side feature
assemblies and, 473
DLLs and, 471
signtool.exe, 624
simple binding, 1053, 1194–1196
simple controls, WPF, 1147–1148
Simple Object Access Protocol. See SOAP (Simple Object Access Protocol)
SimpleClientApp solution, installation packages, 448–456
SimpleWebApp solution, installation packages, 456–457
Single Document Interface (SDI), Windows Forms, 1016
single-call objects
in configuration files, 1430
defined, 1416
server configuration for wellknown objects, 1431
single-threaded apartment (STA), 581, 752–753
singleton objects
in configuration files, 1430
defined, 1416
lifetime management for, 1426–1429
sink providers, 1415
sinks. See message sinks
site map XML files, providing for site, 1273–1275
SiteMapPath Web server control, ASP.NET, 1273–1275
sites, Active Directory, 1587
size
calculating item and text document, 1118–1119
of controls, 995–996
Size struct
drawing scrollable windows, 1089–1094
overview of, 1084–1085
SizeF struct, 1084–1085
sizeof operator, 161, 337
.skin files, in themes, 1284
Slider control, WPF, 1148
SOAP (Simple Object Access Protocol)
configuring, 1464
defined, 1373
exchanging data using headers, 1392–1397
.NET Remoting and, 1401
syntax, 1374–1375
SoapHeaderAttribute attribute, 1393–1394
Soapsuds utility, 1440–1441
Socket class
building client application, 1369–1371
building server console
application, 1367–1369
defined, 1362
overview of, 1367
socket server, Windows Services, 714–717
Software Publisher Certificate Test tool (Cert2spc.exe), 624
solid brushes, 1098–1099
solutions, Visual Studio 2005
adding projects to, 408–410
creating in ASP.NET, 22
projects compared to, 407–408
Sort( ) method
arrays, 142–145
cultures, 648–650
generic delegates with Array class, 261, 263
list elements, 280–281
numbers, 205
queries, 1679
sorted lists, 297–299
methods, 298–299
overview of, 297
properties, 298
SortedList<TKey, TValue> class, 297
sorting
cultures, 648–650
list elements, 280–281
rows within DataView, 1044–1045
source
creating event sources, 535–536
tracing architecture, 524–525
source code, 950–953
source journaling, message queues, 1488
special characters, regular expressions, 237
SpecialFolder enumeration, Windows Vista, 1658–1659
SplitContainer control, 1011
sponsoring lease renewal, 1426
sprintf function, 808
SQL persistence service, 1574
SQL Server 2005, 955–984
hosting .NET runtime, 956–957
key generation, 895–898
Microsoft.SqlServer.Server namespace, 957–958
overview of, 955
stored procedures, 968–970
triggers, 972–974
user-defined functions, 970–972
user-defined types, 958–968
XML data type, 974–982
SQL Server 2005 Express Edition Starter Kit (Wiley Publishing, Inc.), 955
SqlCommand, 888–889
SqlConnection class, 851
SqlDataAdapter class, 888–889
SqlDataReader, 976
SqlDataSource Web server controls, 1238–1239, 1247
SqlTrackingService, 1575–1576
SqlTrigger, 973–974
SqlUserDefinedTypeAttribute, 960–961
SqlWorkflowPersistenceService, 1574
STA (single-threaded apartment), 581
STA (single-threaded apartments), 752–753
Stack class, 288
stack pointers, 320
Stack<T> class, 288
stackalloc keyword, 345–348
stack-based arrays, 345–348
StackPanel, 1153
stacks, 287–289
methods, 288
overview of, 287
value types stored on, 9, 39
working with, 287–289
standard query operators, 1689–1693
standard Web server controls, 1224–1229
standards
Active Directory, 1584
XML, 902
StartRuntime method, 1572
startup settings, 509
state, managing in ASP.NET, 1215
State Machine Workflow, 1565–1568, 1579–1580
stateful remote objects, 1408
stateless remote objects, 1408
static classes, 105–106
static constructors, 96–98
static Equals( ) method, 169–170
static keyword, 106, 1633–1634
static members, 256, 1633–1634
StaticResource markup extension, 1197
StatusEventArgs, 1444–1446
stored procedures
executing, 858
naming conventions, 899
returning nothing, 863–864
returning output parameters, 864–866
SQL Server 2005, 968–970
using in data adapters, 888–889
storyboard, animation, 1183–1184, 1188
Stream class, 1355–1356
StreamReader class
defined, 808–809
editing text document, 1113–1114
overview of, 816–818
reading to text files using, 816
ReadWriteText example, 820–822
streams
buffered, 810
overview of, 808–810
reading/writing data in files with, 793
working with XmlReader class, 906–912
working with XmlWriter class, 912–914
StreamWriter class
defined, 808–809
overview of, 818–819
ReadWriteText example, 820–822
writing to text files using, 816
String class
immutable data types, 223
methods, 222–223
overview of, 222
value conversion, 1203–1204
string concatenation operators, 156
string tables. See resources
StringArrayConverter class, 1203–1204
StringBuilder class
AppendFormat( ), 230–231
building strings, 221, 224–226
members, 226–227
methods, 227
StringInfo class, 638
strings, 221–233.
See also regular expressions
building, 223–226
format strings, 67–68, 227–229
FormattableVector example, 231–233
how they are formatted, 229–231
overview of, 221
predefined reference types, 46–47
regular expressions for processing, 234–235
StringBuilder members, 226–227
summary, 242
System.String class, 222–223
ToString( ) method, 107–109
user-defined types, 962–964
strong data typing, 9–12
Active Directory, 1584, 1589–1590
language interoperability and, 10
overview of, 9–10
type safety and type conversion and, 163
XML, 981
strong names
applying to assemblies, 617
code distribution with, 622–623
creating, 504–505
features of, 500
shared assemblies and, 19, 478, 500–503
struct keyword, 1624–1625
structs, 101–104
classes compared with, 102
constructors for, 103–104
creating objects and, 84
defining types as, 101
derived from System.ValueType, 113
functions, 101–102
inheritance and, 103, 112–113
pointers to, 337–338
sizeof operator, 337
as value types, 102–103
vector struct example of operator overloading, 173–175
Structure keyword, 1624–1625
structured pages, ASP.NET, 22
styles
assigning property triggers, 1167–1169
for ListBox, 1176–1182
storing in resources, 1163–1167
template, 1175–1176
with WPF, 1162–1163
StyleSheetTheme, 1284, 1285
Sub keyword, Visual Basic, 1627
Sub statement, Visual Basic, 1628
submitButton_Click( ) event handler, 1242–1244
SubordinateTransaction class, 683
substraction (-) operator, 163
svcconfigeditor.exe utility, 1518–1519
Svcutil.exe (ServiceModel Metadata) utility, 1536–1537
switch statement, in C# and C++/CLI, 1635–1636
switch…case statement, conditional statements, 50–51
switches
tracing architecture, 524, 526
used with XSD, 882
symmetric encryption, 501–502
SyncDispatchMessage( ) method, IChannelReceiver, 1414
synchronization, 565–588.
See also threads
background workers, 581–585
COM apartments, 581
enable cancel of background workers, 585–586
enable progress of background workers, 586–587
events, 578–580
Interlocked class, 571–572
lock statement for synchronizing multiple threads, 565–571
Monitor class, 572–573
Mutex class, 574–576
overview of, 565
Semaphore class, 576–578
summary, 588
WaitHandle class, 573–574
SyncProcessMessage( ) method, formatters, 1415
Sys.Debug class, 1331–1332
Sys.Services.AuthenticationService, 1334
Sys.Services.ProfileService, 1334
System namespace, 60
system queues, message queues, 1488
system resources, 1165
System.Attribute, 351–353
System.Collections, 270
bit array classes, 311
Generic namespace, 265
List<T> class, 245
queue classes, 283
SystemColors, 1165
System.Convert, 185
System.Data.Common
classes found in, 849
defined, 848
System.Data.SqlClient
defined, 848
using database connections, 851–853
using stored procedures, 969–970
System.DateTime, 227
System.Delegate, 197
System.Diagnostics
event logging classes, 534
performance monitoring, 542
tracing, 523
System.DirectoryServices, 747, 1594
System.DirectoryServices.Protocols, 1594, 1616
System.Drawing
Brush class, 1098–1099
Color struct, 1095
defined, 1075
Graphics class, 1076, 1100–1102
Image class, 1103–1104
Pen class, 1077, 1099–1100
Printing, 1130
Rectangle, 1081–1082
structs in, 1082
System.EnterpriseServices, 680.
See also Enterprise Services
System.Exception
classes, 372–373
properties, 381–382
SystemFonts, 1165
System.GC, 325
System.Globalization, 638
region classes, 638
System.IO
file browser example, 796
for file system operations, 789
hierarchy of stream-related classes in, 808–809
IOException class, 372
System.Messaging, 1503.
See also message queues
System.MulticastDelegate, 197
System.Object
methods, 106–107
methods for comparing object equality, 169
.NET classes derived from, 106
SystemParameters, 1165
System.Reflection
assembly attributes, 483–484
Assembly class, 363
System.Resources, 651–652, 657
classes, 657
ResourceManger class, 654
System.Runtime.InteropServices, 775
System.Runtime.Serialization, 789
System.Security, 603
System.Security.AccessControl, 824–829
System.ServiceModel, 1517
System.ServiceProcess, 713
System.String, 222–223
System.Text
RegularExpressions, 221, 234
StringBuilder, 221, 224–226
System.Transactions, 675, 683–685.
See also transactions
System.Type
methods, 360
overview of, 358
properties, 359–360
reflection, 358
TypeView example, 360–363
System.ValueType, 113
<system.web.extensions>, 1315
System.Windows.Forms
class hierarchy, 993–995
Control class of, 995–998
defining Message struct, 1503
Integration, 1209
System.Windows.Shapes, 1144–1147
System.Workflow.Activities, 1544
System.Xml, 862
for ADO.NET. See ADO.NET, XML and classes, 906
defined, 901
overview of, 902–903
Serialization, 943–950
XPath, 921–927
Xsl, 926–931