Index

SYMBOLS

& (AND) operators, 16

&& (AND) operators, 16

{} (braces), 10

{0} placeholders, 24

^ (XOR) operators, 16

= (single equals) operators, 16

== (double-equals) operators, 16

! (NOT) operators, 16

<connectionStrings> element (Web.config files)

Profile providers, creating, 455-456

Role provider, configuring, 448

<machineKey> elements, 344

<membership>, 440-441

<roleManager> element (Web.config files), configuring Role provider, 448

| (OR) operators, 16

|| (OR) operators, 16

NUMBERS

2D arrays, 37

jagged arrays, mixing with, 40-41

sample of, 38-39

3D arrays, 37

4D arrays, 37

A

Abandon method, 330

Abort method, 125

abstract classes, 59

AccessDataSource, 396

accessors, add/remove, 114-117

Add method, 44, 330, 568

AddingNew event, 569

AddNew method, 568

AddNewItem property, 570

AddRange method, 44

AddUser(s)ToRole(s) method, 417, 441

ADO.NET, 219

asynchronous data access, 241-242

batch updates, 242-245

connection strings, building, 220-223

data providers, 251

connection strings, 255-256

customizing, 260-261

data sources, enumerating, 256-257

provider factories, 252-255

RetreiveStatistics method, 258-259

schema information, 259-260

data readers, 227-229

data source communications

commands, executing, 224-226

data readers, 227-229

data source connections, establishing, 220-223

DataAdapter class, 233-236

DataSet class, 231-233

DataTable class, 237-240

DataTableReader class, 240-241

DbCommand class, code sequences, 224

DbConnectionStringBuilder class, 220

DbDataReader class, 227

Schema Discovery, 229-230

SqlCommand class, 227

parameterized SQL statements, executing, 224

stored procedures with output parameters, 226

stored procedures, executing, 225-226

System.Transactions namespace, 245

explicit transactions, 246-247

implicit transactions, 247-250

typed datasets, data binding, 563-567

AdRotator control, 399

AL.EXE (Assembly Linker) tool, 158

aliases (.NET data types), 9

Allocation tab (.vsp files), 213

AllowNew property, 569

AllowUserToAddRows property, 573

AllowUserToDeleteRows property, 573

AllowUserToOrderColumns property, 573

AllowUserToResizeColumns property, 573

AllowUserToResizeRows property, 573

AlternatingRowsDefaultCellStyle property, 573

Anchor selection pop-up (Windows Forms Designer), 527

AND (&) operators, 16

AND (&&) operators, 16

annotating typed DataSets, 273-275

anonymous methods, delegates, 107-108

anonymous profiles (ASP.NET), properties, 368-371

AnonymousTemplate view (LoginView control), 420

APIs

DPAPI, 202-205

Win32, unmanaged DLLs, 176-177

AppDomain class, 165-168

AppendChild method, 92

AppendFormat method (StringBuilder class), 210

appending files (I/O), 81-82

application services (ASP.NET), configuring, 364

application settings system, 589-591

Application Start events, 326

application start times, improving, 212

application state, 325

Application Start events, 326

Application.Lock() method, 326

Application.UnLock() method, 326

usage example, 327-328

web farms, 343

Application.Lock() method, 326

Application.UnLock() method, 326

ApplicationActivation attribute (Enterprise Services), 620

ApplicationDeployment class, 613

ApplicationID attribute (Enterprise Services), 620

ApplicationName attribute (Enterprise Services), 620

ApplicationName property, 414, 417, 428, 441

ApplicationQueuing attribute (Enterprise Services), 620

applications. See also smart clients

ASP.NET

building, 310

debugging, 311

deploying, 310

multithreaded, writing, 123-128

Windows Forms 2.0

Console Applications, 522

cultures, changing, 561-562

Windows Applications, 522

array indexer notation, 33

Array of Arrays notation, 40

ArrayList collection, 43-45

arrays

array indexer notation, 33

collections, comparing to, 43

declaring, 33

defining, 33

initializing, 34

IntelliSense, opening, 34

jagged arrays, 40-42

multidimensional arrays, 37-41

one-dimensional arrays, 34-36

operations list, accessing, 34

resizing, 43

artificial dependencies (software), 504

ASP.NET

application services, configuring, 364

applications

building, 310

debugging, 311

deploying, 310

state, 325-328, 343

ASP.NET SQL Server Configuration Wizard, 364

client callbacks, 315-319, 322

compiler, 300

controls

hierarchies, 300

overview of, 307-309

state, 468-471

data binding, 395-400

Data Source Configuration Wizard, 396-397

data sources, 396

DataSource property, ViewState objects, 471

event handling, 312-314

health monitoring system

Web Event providers, 473-476, 482-483

web events, 473-482

IsPostback property, 312-314

LoadControlState method, 468

Membership provider

classes, 429

configuring, 440-441

creating, 430-440

defining, 427

installing, 440-441

methods, 429

properties, 428

schemas, implementing, 429-430

pages

hierarchies, 300

life cycles, 303-306

performance counters, 483-485

postbacks, 306

profile providers

classes, 449

configuring, 365-366, 455-456

creating, 450-455

installing, 455-456

methods, 449

schemas, implementing, 449

properties, user controls, 462

Role provider

classes, 441

configuring, 448

creating, 442-448

installing, 448

methods, 441-442

properties, 441

schemas, implementing, 442

SaveControlState method, 468

security, 301

authentication, 407

authentication, Forms, 410-412

authentication, Membership API, 412-415

authentication, Passport, 409

authentication, user management, 412-415

authentication, Windows, 408

authorization, 416

authorization, Roles, 416-418

ChangePassword control, 422

CreateUserWizard control, 422

encrypted configuration files, 424-426

Login control, 419

LoginName control, 419

LoginStatus control, 420

LoginView control, 420-421

PasswordRecovery control, 421

server controls

bubbling, 466-467

creating, 463-467

properties, 464

state management, 468-472

session state

ASP.NET State Server providers, 333-336

default in-process state providers, 329

SessionState provider, 456-457

SiteMap provider, 457-458

SQL Server Configuration Wizard, configuring application services, 364

state management, 301

State Server providers

out-of-process servers, 334-336

Serializable classes, 334

turning on/off, 333

usage example, 335-336

Web.conf files, modifying, 333-334

System.Diagnostics.Debug class, 311

System.Web.TraceContext class, 311

themes

creating, 360

customizing, 371-373

editing, 362

global themes, 363

runtime errors, 361

skins, 360

skins, adding, 362-363

theme-specific images, 364

viewing, 362

usage example, 331

event handling, 339-340

HTTPSessionState class, methods list, 330

HTTPSessionState class, properties list, 329-330

managing, 329

session IDs, 328

Session objects, 332

SQL Server Session State providers, 337-338

storing, 329

web farms, 343

user controls

creating, 460-462

pages, adding to, 460

properties, 462

user profiles

anonymous profiles, 368-371

application services, configuring, 364

customizing, 371-373

profile providers, configuring, 365-366

properties, 367-371

view state, 468-472

Restoring, 341

usage example, 342

web farms, 344-345

web configuration, 302

ASP.NET 1.1, GUI consistency, 348

aspnet regsql command-line tool, 337

assemblies

creating, 158-160

external, 159-160

loading, 155

manifests, 156-157

multifiles, 156

partially trusted callers, 186

PIA (Primary InterOp Assembly), 171-174

reflection, 158

resources

embedding, 160

storing/retrieving, 160-163

satellite, localization, 163-165

Assembly class, 158-159

Assembly Linker tool (AL.EXE), 158

asynchronous data access (ADO.NET), 241-242

asynchronous files, 85-86

asynchronous web service consumption, smart clients, 597-598

attributes

custom (reflection), creating, 150-153

instance members, 52

static members, 52

Attributes property, 92

Authenticate method, 412

authentication (users), smart clients, 594-596

authentication checks, shared properties, 631

authentication controls list (ASP.NET), 309

authorization (users), smart clients, 594-596

AutoGenerateColumns property, 573

automated updates, ClickOnce, 608

automatic COM+ registration, 620-622

Automatic reset events, 136-138

B

BackgroundWorker component (Windows Control Libraries), 542, 598-600

batches, updating ADO.NET, 242-245

BeginEdit method, 573, 581

BeginTransaction method, 222

binding (data)

automatically bound controls, 567

BindingNavigator component, 565, 570-571

BindingSource component, 565-569

DataGridView component, 565

cells, customizing, 576-578

cells, formatting, 576

cells, painting, 577-578

ComboBox columns, 574-575

events, 572-573

forms, ledger-style coloring, 576

methods, 573

properties, 573-574

unbound columns, 578

objects, 579-584

parent-detail binding pattern, 584

typed datasets, 563

binding sample, 566

Data Sources window, 564-565

forms, adding to, 565

web services, Data Sources Panel (Windows Forms), 514-515

BindingComplete event, 569

BindingNavigator component (data binding), 565, 570-571

BindingNavigator control (Windows Control Libraries), 542

BindingSource component (data binding), 565-568

BindingSource control (Windows Control Libraries), 541

bitwise operators, 16

block ciphers, 194

bool aliases (.NET data types), 9

Boolean expressions, 16

Boolean operators, 16

boxing/unboxing, 208-209

braces ({}), 10

branching and conditional logic

Boolean expressions, 16

conditional statements

goto statements, 18

if/else statements, 17-19

switch statements, 18

bubbling server controls (ASP.NET), 466-467

Button control (Windows Control Libraries), 532

byte aliases (.NET data types), 9

C

C#

basic syntax of, 10-11

capabilities of, 12

“Hello World” application, 10-11

CacheRolesInCookie property, 417

Caesar cipher, 193

Call Tree tab (.vsp files), 213

callbacks

client callbacks, 315-319, 322

delegates, 103

CancelEdit method, 568, 573, 581

CancelNew method, 568

CancelRowEdit event, 572

Capacity property, 44

Cartesian coordinate systems, 2D arrays, 37

CAS (Code Access Security), 181

administering, 184-185

code permissions, 182-184

declarative security, 189-191

imperative security, 185-189

CatalogZone control (Web Parts), 377, 387

CD, publishing ClickOnce applications to, 606

CelBeginEdit event, 572

CellClick event, 572

CellContentClick event, 572

CellContentDoubleClick event, 572

CellDoubleClick event, 572

CellEndEdit event, 572

CellFormatting event, 572, 577

CellPainting event, 572, 577-578

CellValueChanged event, 572

ChangeDatabase method, 222

ChangePassword control, 422

ChangePassword method, 429

ChangePasswordQuestion-AndAnswer method, 429

char aliases (.NET data types), 9

CheckBox control (Windows Control Libraries), 532

CheckBoxList control, 399

CheckedListBox control (Windows Control Libraries), 532

CheckForUpdateCompleted event, 613

CheckForUpdateProgressChanged event, 613

ChildNodes property, 92

Class Libraries (Windows Forms 2.0), 522

Clear method, 35, 44, 47, 330, 568

ClearSelection method, 573

ClickOnce

automated updates, 608

deploying applications, 607-610

Download ClickOnce Update dialog, 611

manifest signing, 608

Publish Now button, 611

Publish Wizard, 607-609

publishing applications, 605-606

System.Deployment.Application namespace, 613-616

updating applications, 610-612

Windows Installer versus, 604-605

client callbacks, 315-319, 322

Clone method, 92

Close link (Web Part Pages), 382

Close method, 222

CLR (Common Language Runtime), 6

assemblies, loading, 155

GC, 8

SQL Server, 279, 284-290

code

access permissions, 182-183

blocks, 10

marshaling, 170

permissions, 182-184

profilers

FxCop, 215

Performance Wizard, 212-213

Unicode streams, 80

Code Access Security. See CAS (Code Access Security)

collections

ArrayList, 43-45

arrays, comparing to, 43

FIFO, 73

generics, 72-74

Hashtable, usage example, 45-46

LIFO, 74

Queue, 46-48

resizing, 43

SortedList, usage example, 49-50

Stack, usage example, 48-49

color, user interface design, 527

ColorDialog component (Windows Control Libraries), 546

ColumnCount property, 573

Columns property, 573

COM (Component Object Model) objects

“DLL hell,” 6

.NET classes, 174-175

.NET Framework, evolution of, 6

PIA, 171-174

COM+, 6

automatic registration, 620-622

JIT activation, 623

loosely coupled events, 631-634

manual registration, 620

pooling, 623

queued components, 624-626

role-based security, 626

shared properties, 629-631

transactions, 627

CRM, 628

ComboBox columns, DataGridView component, 574-575

ComboBox control (Windows Control Libraries), 532

Comment property, 429

CommitEdit method, 573

Common Controls Toolbox (Windows Control Libraries), 531

Button control, 532

CheckBox control, 532

CheckedListBox control, 532

ComboBox control, 532

DateTimePicker control, 532-533

Label control, 533

LinkLabel control, 533

ListBox control, 534

ListView control, 534

MaskedTextBox control, 534

MonthCalendar control, 534

NotifyIcon control, 535

NumericUpDown control, 535

PictureBox control, 536

ProgressBar control, 536

RadioButton control, 536

RichTextBox control, 536

TextBox control, 536

ToolTip control, 537

TreeView control, 537

WebBrowser control, 538

Common Language Runtime (CLR), 6

assemblies, loading, 155

GC, 8

SQL Server, 279, 284-290

Common Type System, 7

CompareTo string instance method, 27

compiler (ASP.NET), 300

complexity of design (user interface design), 528

Components Toolbox (Windows Control Libraries)

BackgroundWorker component, 542, 598-600

DirectoryEntry component, 542

DirectorySearcher component, 543

ErrorProvider component, 543

EventLog component, 543

FileSystemWatcher component, 543

HelpProvider component, 544

ImageList component, 544

MessageQueue component, 544

PerformanceCounter component, 545

Process component, 545

SerialPort component, 545

ServiceController component, 545

Timer component, 545

composition, 78

ComVisible attribute (Enterprise Services), 620

conditional logic

Boolean expressions, 16

conditional statements

goto statements, 18

if/else statements, 17-19

switch statements, 18

conditional operators, 19

connecting

typed DataSets, 267

Web Parts, 389-393

connection pooling, 221

connection strings, 255-256

building, 220-223

connection pooling, 221

Membership API, creating for, 413

connections (data sources), 253-255

ConnectionString property, 222

<connectionStrings> element (Web.config files)

Profile providers, creating, 455-456

Role provider, configuring, 448

ConnectionTimeout property, 222

Console Applications (Windows Forms 2.0), 522

constraining type parameters, 67-69

Constructor methods, 55

Contact class, 581-584

containers (Windows Control Libraries), 538-539

Contains method, 44, 568

Contains string instance method, 27

Content Page, 349

creating, 351

MasterPageFile statements, 352

rendering, 353

Context property, 367

ContextMenuStrip control (Windows Control Libraries), 540

contravariance, 106

Control Events event (ASP.NET page life cycle), 304

control hierarchies (ASP.NET), 300

Control Libraries (Windows), 522

Common Controls Toolbox, 531

Button control, 532

CheckBox control, 532

CheckedListBox control, 532

ComboBox control, 532

DateTimePicker control, 532-533

Label control, 533

LinkLabel control, 533

ListBox control, 534

ListView control, 534

MaskedTextBox control, 534

MonthCalendar control, 534

NotifyIcon control, 535

NumericUpDown control, 535

PictureBox control, 536

ProgressBar control, 536

RadioButton control, 536

RichTextBox control, 536

TextBox control, 536

ToolTip control, 537

TreeView control, 537

WebBrowser control, 538

Components Toolbox

BackgroundWorker component, 542, 598-600

DirectoryEntry component, 542

DirectorySearcher component, 543

ErrorProvider component, 543

EventLog component, 543

FileSystemWatcher component, 543

HelpProvider component, 544

ImageList component, 544

MessageQueue component, 544

PerformanceCounter component, 545

Process component, 545

SerialPort component, 545

ServiceController component, 545

Timer component, 545

containers, 538-539

data-related controls section, 541-542

dialog components section, 546-547

menus and toolbars section, 540-541

Printing section, 545-546

control state (ASP.NET), 468-472

controls

AdRotator, 399

authentication controls, 309

ChangePassword, 422

CheckBoxList, 399

CreateUserWizard, 422

data-bound

DetailsView, 401

FormView, 401-402

GridView, 397, 400, 405

hierarchy table, 399-400

TreeView, 403

data controls, 308

DetailsView, 399

DropDownList, 399

FormView, 400

GridView, 400

HTML controls, 309

ListBox, 399

Login, 419

LoginName, 419

LoginStatus, 420

LoginView, 420-421

navigation controls, 309

PasswordRecovery, 421

RadioButtonList, 399

server controls

bubbling, 466-467

creating, 463-467

properties, 464

state management, 468-472

standard controls, 307

user controls

creating, 460, 462

pages, adding to, 460

properties, 462

validation controls, 309

ConvertAll method, 35

CookieMode property, 329

CookieName property, 417

CookiePath property, 417

CookieProtectionValue property, 417

CookieRequireSSL property, 417

cookies, Passport authentication, 409

CookieSlidingExpiration property, 417

CookieTimeout property, 417

CopyTo string instance method, 27

count awareness, user interface design, 528

Count property, 44, 329, 569

covariance, 106

Create Test Certificate button (Publish Wizard), 608

CreateAttribute method, 93

CreateCDataSection method, 93

CreateCommand method, 222

CreateComment method, 93

CreateDocumentFragment method, 93

CreateElement method, 93

CreateNavigator method, 92

CreateNewStoreData method, 456

CreateNode method, 93

CreatePersistentCookie property, 417

CreateRole method, 417, 441

CreatesUninitializedItem method, 456

CreateTextNode method, 93

CreateUser method, 415, 429

CreateUserWizard control, 422

CreateWhitespace method, 93

CreationDate property, 429

credentials option (Forms authentication), 410

CRM (Compensated Resource Managers), transactions (COM+), 628

cryptography, 193

digital signatures, 196, 200-202

DPAPI (Data Protection API), 202-205

hashing, 195-196

public-key encryption, 194-195, 198-200

secret-key encryption, 194-198

cultures (Windows Forms applications), changing, 561-562

Current property, 569

CurrentCell property, 573

CurrentChanged event, 569

CurrentItemChanged event, 569

CurrentRow property, 573

custom attributes (reflection), creating, 150-153

Custom Event providers, 482-483

custom events, 478-482

custom session state support (SQL Server), 337

D

data, accessing asynchronously (ADO.NET), 241-242

data binding, 395

automatically bound controls, 567

BindingNavigator component, 565, 570-571

BindingSource component, 565-569

data sources

configuring, 396-397

creating, 396

GridView controls, 397

model of, 396

object data sources, 405

data-bound control hierarchy table, 399-400

DataGridView component, 565

cells, customizing, 576-578

cells, formatting, 576

cells, painting, 577-578

ComboBox columns, 574-575

events, 572-573

forms, ledger-style coloring, 576

methods, 573

properties, 573-574

unbound columns, 578

objects, 579-584

parent-detail binding pattern, 584

typed datasets, 563

binding sample, 566

Data Sources window, 564-565

forms, adding to, 565

data controls list (ASP.NET), 308

Data Protection API (DPAPI), 202-205

data providers (ADO.NET), 251

connection strings, 255-256

customizing, 260-261

data sources, enumerating, 256-257

provider factories, 252-255

RetreiveStatistics method, 258-259

schema information, 259-260

data readers, 227-229

data source communications (ADO.NET)

commands, executing, 224-226

data readers, 227-229

Data Source Configuration wizard, 396-397

data source connections, establishing (ADO.NET)

connection strings, building, 220-223

DataAdapter class, 233

data sources

AccessDataSource, 396

configuring, 396-397

creating, 396

enumerating (ADO.NET), 256-257

GridView controls, 397

model of, 396

ObjectDataSource, 396

objet data sources, 405

SiteMapDataSource, 396

SqlDataSource, 396

XmlDataSource, 396

Data Sources panel (Windows Forms)

typed datasets

data binding, 564

properties, viewing, 565

web services, binding, 514-515

data types

aliases table, 9

common types table, 8-9

namespaces, 9

reference types, defining, 10

shortcuts table, 9

value types, defining, 10

data-bound controls

DetailsView, 401

FormView, 401-402

GridView, 400

data sources, configuring, 397

object data sources, 405

hierarchy table, 399-400

TreeView, 403

data-related controls section (Windows Control Libraries), 541-542

DataAdapter class, 233

DataSet/Data Source connection example, 234-236

typed DataSets, populating, 267-268

Database property, 222

Database reference dialog (SQL Server), 280

DataBindingComplete event, 572

DataError event, 569

DataGridView component (data binding), 565

cells

customizing, 576-578

formatting, 576

painting, 577-578

ComboBox columns, 574-575

events, 572-573

forms, ledger-style coloring, 576

methods, 573

properties, 573-574

unbound columns, 578

DataGridView control (Windows Control Libraries), 541

DataMember property, 569, 573

DataMemberChanged event, 569

DataSet class, 231-233

DataSet control (Windows Control Libraries), 541

DataSets (typed)

annotating, 273-275

connecting, 267

creating, 263

Visual Studio designer, 265-266

XSD schemas, 264-265

data binding, 563

binding sample, 566

BindingNavigator component, 565

BindingSource component, 565-567

Data Sources window, 564-565

DataGridView component, 565

forms, adding to, 565

partial classes, extending with, 275-276

populating, 267-271

programming with, 266-267

queries, adding, 272-273

DataSource property, 222, 471, 569, 573-574

DataSourceChanged event, 569

DataTable class, 237-240

DataTableReader, 227

DataTableReader class, 240-241

DateTime format specifiers table (strings), 25

DateTimePicker control (Windows Control Libraries), 532-533

DbCommand class, code sequences, 224

DBConnection class, 222

DbConnectionStringBuilder class, 220, 255-256

DbDataReader class, 227

debugging ASP.NET applications, 311

decimal aliases (.NET data types), 9

declarative security (CAS), 189-191

decryptionKey attribute (<machineKey> element), 344

DefaultCellStyle property, 574

DefaultValuesNeeded event, 572

delegates

anonymous methods, 107-108

callbacks, 103

contravariance, 106

covariance, 106

declaring, 104

defining, 103

events, creating, 111

manipulating, examples of, 104-105

multicast delegates, 109-110

naming conventions, 104

scope, 104

static keyword, 104

Target properties, 114

ThreadStart, 124

DeleteCommand, 233

DeleteCookie method, 417

DeleteInactiveProfiles method, 449

DeleteItem property, 570

DeleteProfiles method, 449

DeleteRole method, 417, 441

DeleteUser method, 415, 429

demands, imperative security, 185

dependencies (software), 504

Dequeue method, 47

design complexity (user interface design), 528

design intuitiveness (user interface design), 528

DetailsView control, 399, 401

dialog components section (Windows Control Libraries), 546-547

Dictionary class, 72

digital signatures, 196, 200-202

directories, managing (I/O), 83-85

DirectoryEntry component (Windows Control Libraries), 542

DirectorySearcher component (Windows Control Libraries), 543

Discovery (Web Services), 507-509

DisplayMember property, 574

division by zero, 248

DLL

“DLL hell,” 6

unmanaged (interoperability), 176-178

do loops, 21

Dock selection pop-up (Windows Forms Designer), 526

Document Outline window (Windows Forms Designer), 524

documents (Word), creating with PIA (Primary InterOp Assembly), 172-173

DOM (Document Object Models), 91

Domain property, 417

double aliases (.NET data types), 9

Download ClickOnce Update dialog (ClickOnce), 611

DPAPI (Data Protection API), 202-205

drawing shapes, GDI+, 552-554

DropDownList control, 399

E

-E option (aspnet regsql command-line tool), 337

EditMode property, 574

EditorZone control (Web Parts), 377, 385

Email property, 429

embedding assembly resources, 160

Enabled property, 417

EnablePasswordReset property, 414, 428

EnablePasswordRetrieval property, 414, 428

encryption. See also cryptography

ASP.NET configuration files, 424-426

public-key, 194-195, 198-200

secret-key, 194-198

Web.config files, 424-426

EndEdit method, 568, 573, 581

EndRequest method, 456

EndsWith string instance method, 27

EnlistTransaction method, 222

Enqueue method, 47

Enterprise Services

ApplicationActivation attribute, 620

ApplicationID attribute, 620

ApplicationName attribute, 620

ApplicationQueuing attribute, 620

automatic registration, 620-622

ComVisible attribute, 620

JIT activation, 623

loosely coupled events, 631-634

manual registration, 620

pooling, 623

queued components, 624-626

role-based security, 626

shared properties, 629-631

transactions, 627-628

enumerating data sources (ADO.NET), 256-257

equality expressions, 16

Equals string instance method, 27

ErrorProvider component (Windows Control Libraries), 543

EventLog component (Windows Control Libraries), 543

events

accessors, 114-117

AddingNew, 569

advanced programming, 114-118

BindingComplete, 569

BindingNavigator component, chain of events table, 571

BindingSource component, 569

CancelRowEdit, 572

CelBeginEdit, 572

CellClick, 572

CellContentClick, 572

CellContentDoubleClick, 572

CellDoubleClick, 572

CellEndEdit, 572

CellFormatting, 572, 577

CellPainting, 572, 577-578

CellValueChanged, 572

class subscriptions, 111-113

client subscriptions, selective method invocations, 114-118

code, reusing, 113

creating, 111

CurrentChanged, 569

CurrentItemChanged, 569

DataBindingComplete, 572

DataError, 569

DataGridView component, 572-573

DataMemberChanged, 569

DataSourceChanged, 569

declaring, 111

DefaultValuesNeeded, 572

defining, 111

handling

ASP.NET, 312-314

session state, 339-340

ListChanged, 569

loosely coupled events (COM+), 631-634

multithreaded programming synchronization, 136-138

PositionChanged, 569

publishing/subscribing sample, 112-113

reflection, 148-150

reset, 136-138

Scroll, 572

SelectionChanged, 573

UserAddedRow, 573

UserDeletedRow, 573

UserDeletingRow, 573

exclusive OR operators. See XOR (^) operators Execute option (SQL Server), 282

ExecuteReader method, 227

ExecuteXmlReader method, 227

Exists method, 35

explicit transactions (ADO.NET), 246-247

expressions, 29

equality, 16

groups, 30

input

extracting data from, 30-31

validating, 30

RegEx class, 30

XPath, 95

advanced expressions example, 97

simple expressions example, 96

extending typed DataSets, partial classes, 275-276

external assemblies, loading, 159-160

F

factory patterns (ADO.NET), 68

connections, establishing, 253-255

lists of, 252-253

FIFO (First-In First-Out) collections, 73

file management (I/O)

asynchronous files, 85-86

creating/appending files, 81-82

directories, 83-85

isolated storage, 86-88

reading existing files, 82-83

FileSystemWatcher component (Windows Control Libraries), 543

Fill method, populating typed DataSets, 269-270

filling shapes, GDI+, 552-557

Filter property, 569

Find method, 35

FindAll method, 35-36

FindInactiveProfilesByUserName method, 449

FindLast method, 35

FindProfilesByUserName method, 449

FindSiteMapNode method, 457

FindSiteMapNodeFromKey method, 457

FindUsersByEmail method, 415, 429

FindUsersByName method, 415, 429

FindUsersInRole method, 417, 442

First-In First-Out (FIFO) collections, 73

FirstChild property, 92

float aliases (.NET data types), 9

FlowLayoutPanel control (Windows Control Libraries), 538

FolderBrowserDialog component (Windows Control Libraries), 546

FontDialog component (Windows Control Libraries), 546

for loops, 20

ForEach method, manipulating one-dimensional arrays, 36

Forms 2.0 (Windows)

applications

creating, 522

cultures, changing, 561-562

authentication, 410-412

Class Libraries, 522

Console Applications, 522

Data Sources panel, binding web services, 514-515

Forms Designer, 523

Anchor selection pop-up, 527

Dock selection pop-up, 526

Document Outline window, 524

resizable forms, creating, 526-527

SnapLines, 525-526

NET Framework, 519

shaped forms/controls, creating, 557-558

user interfaces, globalizing, 560-562

visual inheritance, 558, 560

web forms versus, 520, 522

Windows Applications, 522

Windows Control Libraries, 522

Common Controls Toolbox, 531-538

Components Toolbox, 542-545

containers, 538-539

data-related controls section, 541-542

dialog components section, 546

menus and table section, 540-541

Printing section, 545-546

Windows Service, 522

FormsAuthentication class, methods, 411

FormView control, 400-402

four-dimensional arrays, 37

function pointers, unmanaged, 177-178

functions (user-defined), building via SQL Server, 283-284

FxCop, 215

G

GC (Garbage Collector), 8

GDI+, 549

gradient brushes, 555-557

Graphics objects

creating, 549

obtaining, 550

“Hello GDI+” example, creating, 550-552

shapes, drawing/filling, 552-554

GeneratePassword method, 415

generics, 65

benefits, 66

classes, creating, 69

collections

Dictionary class, 72

List class, 73

Queue class, 73-74

Stack class, 74

interfaces, creating, 71-72

methods, creating, 70-71

reflection, 145

remoting, 650-653

type parameters, 66

constraining, 67-69

factory patterns, 68

naming, 67

GetAllInactiveProfiles method, 449

GetAllProfiles method, 449

GetAllRoles method, 417, 442

GetAllUsers method, 415, 429

GetChildNodes method, 457

GetCurrentNodeAndHintNeighborhoodNodes method, 457

GetItem method, 456

GetItemExclusive method, 456

GetNumberOfInactiveProfiles method, 449

GetNumber(s)OfUsersOnline method, 415, 429

GetParentNode method, 457

GetParentNodeRelativeToCurrentNodeAndHintDownFromParent method, 457

GetParentNodeRelativeToNodeAndHintDownFromParent method, 457

GetPassword method, 429

GetRange method, 44

GetRolesForUser method, 417, 442

GetSchema method, 222, 259-260

columns provided for each schema collection used table, 230

SQL Server 2005 invocation results table, 229-230

GetUser method, 415, 429

GetUserNameByEmail method, 415, 429

GetUsersInRole method, 417

global themes, ASP.NET, 363

global.asax files, session state event handling, 339-340

globalizing user interfaces, 560-562

goto statements, 18

gradient brushes (GDI+), 555-557

Graphics objects

creating, 549

obtaining, 550

GridView control, 400

data sources, configuring, 397

object data sources, 405

GridView controls, configuring data sources, 397

GroupBox control (Windows Control Libraries), 539

groups, 30

GUI (graphical user interfaces), consistency, 348

H

HasChildNodes property, 92

hashing, 195-196, 200-202

HashPasswordForStoringInConfigFile method, 411

Hashtable collection, usage example, 45-46

health monitoring system (ASP.NET)

Web Event providers, 473

Custom Event providers, 482-483

list of, 474

Web.config files, 475-476

web events, 473

base events, inheriting from, 478

custom events, 478-482

lifetime events, 477-478

list of, 474

Web.config files

custom events, 478-482

lifetime events, 476-478

Web Event providers, 475-476

“Hello GDI+” example, creating, 550-552

“Hello World” application, 10-11

HelpProvider component (Windows Control Libraries), 544

HintAncestorNodes method, 457

HintNeighborhoodNodes method, 457

HitTest method, 573

HTML (hypertext markup language)

controls list (ASP.NET), 309

Master Pages, 356

HttpSessionState class

methods list, 330

properties list, 329-330

hub-and-spoke model, resource localization, 163

I

I/O (input/output), 77

file management asynchronous files, 85-86

creating/appending files, 81-82

directories, 83-85

isolated storage, 86-88

reading existing files, 82-83

streams, 77

composition, 78

instantiating, 79-80

MemoryStream class, 78-81

Unicode, 80

ICallbackEventHandler interface, 315

identity

imperative security, enforcing via, 188-189

permissions, 183

IDs (session), 328

IEditableObject interface, 581-584

if/else statements, 17-19

Image Library (Visual Studio), 544

ImageList component (Windows Control Libraries), 544

imperative security (CAS), 185-189

implicit transactions (ADO.NET), 247-250

ImportNode method, 93

IndexOf method, 27, 44, 568

IndexOfAny method, 27

inheritance (classes)

multiple inheritance, 57

new keyword, 57

override keyword, 58

single inheritance, 57

usage example, 58-59

visual inheritance, 558-560

Initialization stage (ASP.NET page life cycle), 303

initialization vector (IV), 194

Initialize method, 35, 457

InitializeRequest method, 456

InnerText property, 92

InnerXml property, 92

INotifyPropertyChanged interface, 581-584

Insert method, 568

InsertAfter method, 92

InsertBefore method, 92

InsertCommand, 233

Install button (Publish Wizard), 609

Installer (Windows), ClickOnce versus, 604-605

InstallSqlState.sql script, 337

instance members, 52

instance methods (strings), 27-28

instantiating streams, 79-80

int aliases (.NET data types), 9

IntelliSense, opening arrays in, 34

interfaces, 61

classes, comparing to, 53

designing, 52-53, 527-528

generics, creating, 71-72

globalizing, 560-562

implementing, example of, 61-62

members, accessibility, 61

methods, passing, 63

naming conventions, 54

typecasting, 63

Interlocked class, 133

internal member visibility level, 56

Internet, ClickOnce applications

launching directly from, 606

publishing to, 605

interoperability, 169

COM objects, 170

.NET classes, 174-175

PIA (Primary InterOp Assembly), 171-174

unmanaged DLLs, 176-178

intuitiveness of design (user interface design), 528

IPC (Inter-Process Communication) channels, remoting, 641-645

IsAccessibleToUser method, 457

IsAnonymous property, 367

IsApproved property, 429

IsCookieLess property, 329

IsDirty property, 367

IsFixedSize property, 35, 44

IsLockedOut property, 429

IsMatch static method, 30

IsNewSession property, 329

isolated storage, 86-88

IsOnline property, 430

IsPostback property, 312-314

IsReadOnly property, 35, 44, 329

IsSynchronized property, 329, 367

IsUserInRole method, 417, 442

Item property, 44, 329, 367, 569

Items property, 575

Items.xml document, 93-94

items.xsd document, 100-101

itemsTransform.xslt document, 97-98

IV (initialization vector), 194

J – K – L

jagged arrays

2D arrays, mixing with, 40-41

Array of Arrays notation, 40

declaring, 40

demonstration of, 41-42

initializing, 40

JIT (Just-in-Time) activation (COM+), 623

Join method, 128

joining multithreaded applications, 128

key containers, 198

keys, storing, 198

Keys property, 330

Label control (Windows Control Libraries), 533

Last-In First-Out (LIFO) collections, 74

LastActivityDate property, 367, 430

LastChild property, 92

LastLockoutDate property, 430

LastLoginDate property, 430

LastPasswordChangedDate property, 430

LastUpdatedDate property, 367

LCID property, 330

Length property, 35

libraries

Class Libraries (Windows Forms 2.0), 522

Image Library (Visual Studio), 544

server-side SQL libraries, 290-293

Windows Control Libraries (Windows Forms 2.0), 522

Common Controls Toolbox, 531-538

Components Toolbox, 542-545

containers, 538-539

data-related controls section, 541-542

dialog components section, 546

menus and table section, 540-541

Printing section, 545-546

lifetime events, 476-478

lifetime leases, 648-649

LIFO (Last-In First-Out) collections, 74

LinkLabel control (Windows Control Libraries), 533

List class, 73

List property, 569

ListBox control (Windows Control Libraries), 399, 534

ListChanged event, 569

ListView control (Windows Control Libraries), 534

Load method, 93

Load stage (ASP.NET page life cycle), 303

LoadControlState method, 468

loading

assemblies, 155

DataTables, 238-240

external assemblies, 159-160

LoadXml method, 93

localization

resources, hub-and-spoke model, 163

satellite assemblies, 163-165

lock keyword, 129

LoggedInTemplate view (LoginView control), 420

logical operators table, 16

Login control, 419

LoginName control, 419

LoginStatus control, 420

LoginView control, 420-421

long aliases (.NET data types), 9

loops

do, 21

for, 20

performance, troubleshooting, 211

while, 20

loosely coupled events (COM+), 631-634

M

<machineKey> elements, 344

managing files (I/O)

asynchronous files, 85-86

creating/appending files, 81-82

directories, 83-85

isolated storage, 86-88

reading existing files, 82-83

manifest signing, 608

manifests, assemblies, 156-157

manual COM+ registration, 620

Manual reset events, 136-138

MARS (Multiple Active RecordSets), 293-295

MarshalByRefObject class, 639

marshaling, 170

MaskedTextBox control (Windows Control Libraries), 534

Master Pages

Content Page, 349

creating, 351

MasterPageFile statements, 352

rendering, 353

HTML, 356

Master Page, 349

default Master Pages, specifying, 353

empty page example, 350

nesting, 354

placeholders, creating, 350-351

Master property, 354-356

nesting, 354

placeholders, creating, 350-351

relative paths, 356

Master property, 354-356

MasterPageFile statements, 352

MaxCachedResults property, 417

MaxInvalidPasswordAttempts property, 414, 428

MemberInfo class, 146-148

members (classes)

accessibility, controlling, 56-57

declaring, 54

interfaces, 61

visibility levels table, 56

<membership>, 440-441

Membership API, 412-415

Membership class, 414-415

Membership provider

classes, 429

configuring, 440-441

creating, 430-440

defining, 427

installing, 440-441

methods, 429

properties, 428

schemas, implementing, 429-430

MembershipUser class, 429-430

MembershipUserCollection class, 429

MemoryStream class, 78-81

menus and toolbars section (Windows Control Libraries), 540-541

MenuStrip control (Windows Control Libraries), 540

MessageQueue component (Windows Control Libraries), 544

MethodInfo class, 143-146

MethodTest method, 70

MethodTest2 method, 70

MinRequiredNonAlphaNumericCharacters property, 414, 428

MinRequiredPasswordLength property, 414, 428

Mode property, 330

Monitor class, 132-133

MonthCalendar control (Windows Control Libraries), 534

MoveFirst method, 568

MoveFirstItem property, 570

MoveLast method, 568

MoveLastItem property, 570

MoveNext method, 568

MoveNextItem property, 571

MovePrevious method, 568

MovePreviousItem property, 570

multicast delegates, 109-110

multidimensional arrays, 37-41

multifile assemblies, 156

multiple inheritance, 57

MultiSelect property, 574

multithreaded programming, 121-122

synchronization

Interlocked class, 133

lock keyword, 129

Monitor class, 132-133

Mutex class, 130-132

ReaderWriterLock class, 133-136

reset events, 136-138

ThreadPool class, 138-139

writing applications, 123-128

multithreaded web service consumption, smart clients, 597-598

Mutex class, 130-132

N

Name property, 92

namespaces, 9

System.IO, classes, 83

System.Transactions, 245

explicit transactions, 246-247

implicit transactions, 247-250

navigation controls list (ASP.NET), 309

nested transaction scopes, 248-250

.NET classes, COM interoperability, 174-175

.NET data types

aliases table, 9

common types table, 8-9

namespaces, 9

reference types, 10

shortcuts table, 9

System.Boolean, 8

System.Byte, 8

System.Char, 8

System.Decimal, 8

System.Double, 8

System.Int16, 9

System.Int32, 9

System.Int64, 9

System.SByte, 9

System.Single, 8

System.String, 9

System.UInt16, 9

System.UInt32, 9

System.UInt64, 9

value types, 10

.NET Framework, 184

CLR, 6-8

COM objects, 6

COM+ 2.0, 6

Common Type System, 7

evolution of, 6

Forms 2.0 (Windows), 519

regular expressions, 29-31

StringBuilder, 29

strings, 24

network shares, ClickOnce applications, 605-606

network status, monitoring (smart client example), 592-594

NetworkAddressChanged events, 592-593

NetworkAvailabilityChanged events, 592-593

new keyword, inheritance, 57

NewRowIndex property, 574

NGen.exe (Native Image Generator) tool, improving application start times, 212

NodeType property, 92

NOT (!) operators, 16

NotifyIcon control (Windows Control Libraries), 535

numeric custom format specifiers table (strings), 26

NumericUpDown control (Windows Control Libraries), 535

O

ObjectDataSource, 396

objects

data binding, 579-584

data sources, 405

inheritance

multiple inheritance, 57

new keyword, 57

override keyword, 58

single inheritance, 57

usage example, 58-59

pooling (COM+), 623

Session, 332

Objects Lifetime tab (.vsp files), 214

OdbcDataReader, 227

one-dimensional arrays, 34-36

OOD (object-oriented design), 51

classes, 52-54

interfaces, 53-54

OOP (object-oriented programming)

classes

abstract classes, 59

inheritance, 57

inheritance, usage example, 58-59

members, controlling accessibility of, 56-57

members, declaring, 54

members, visibility levels table, 56

methods, adding, 55

polymorphism, 60-61

properties, adding, 55

simple classes, creating, 54-55

interfaces

implementation example, 61-62

member accessibility, 61

methods, passing, 63

typecasting, 63

Open method, 222

OpenFileDialog component (Windows Control Libraries), 546

operators

bitwise, 16

Boolean, 16

Options button (Publish Wizard), 608

OR (|) operators, 16

OR (||) operators, 16

OR operators. See also XOR (^) operators

OracleDataReader, 227

out-of-process servers, ASP.NET State Server providers, 334-336

OuterXml property, 92

override keyword, inheritance, 58

OwnerDocument property, 92

P

PadLeft string instance method, 27

PadRight string instance method, 27

page hierarchies (ASP.NET), 300

Page Init event (ASP.NET page life cycle), 304

page life cycle (ASP.NET), 302-306

Page Load event (ASP.NET page life cycle), 304

Page PreInit event (ASP.NET page life cycle), 304

Page PreRender event (ASP.NET page life cycle), 304

Page Start stage (ASP.NET page life cycle), 303

Page Unload event (ASP.NET page life cycle), 304

PageSetupDialog component (Windows Control Libraries), 545

Panel control (Windows Control Libraries), 539

parameters (type)

constraining, 67-69

factory patterns, 68

generics, 66-67

naming, 67

ParentNode property, 92

partially trusted callers, assemblies, 186

Passport authentication, 409

PassportIdentity class, 409

PasswordAttemptWindow property, 414, 428

PasswordFormat property, 428

PasswordQuestion property, 430

PasswordRecovery control, 421

PasswordStrengthRegularExpression property, 414, 428

-pe option, Web.config files, 424-426

Peek method, 47

performance counters (ASP.NET), list of, 483-485

Performance Wizard, 212-213

PerformanceCounter component (Windows Control Libraries), 545

permissions, 182-184

persistent session state support (SQL Server), 337

PersonalizableAttribute class, creating connected Web Parts, 391

personalization providers, 378-379

PIA (Primary InterOp Assembly), 171-174

PictureBox control (Windows Control Libraries), 536

placeholders, creating in Master Pages, 350-351

Point3D UDT example, 285-287

polymorphism, example of, 60-61

pooling (COM+), 623

Position property, 569

PositionChanged event, 569

Postback Event Handling stage (ASP.NET page life cycle), 303

postbacks, 306

pre-emptive multitasking, 129

PrependChild method, 92

Prerequisites button (Publish Wizard), 608

PreviousSibling property, 92

Primary InterOp Assembly (PIA), 171-174

PrintDialog component (Windows Control Libraries), 545

PrintDocument component (Windows Control Libraries), 546

Printing section (Windows Control Libraries), 545-546

PrintPreviewControl component (Windows Control Libraries), 546

PrintPreviewDialog component (Windows Control Libraries), 546

private member visibility level, 56

private protected member visibility level, 56

Process component (Windows Control Libraries), 545

profile provider

classes, 449

configuring, 365-366, 455-456

creating, 450-455

installing, 455-456

methods, 449

schemas, implementing, 449

ProfileBase class, properties of, 367

ProfileProvider class, 449

profilers (code)

FxCop, 215

Performance Wizard, 212-213

Program.cs document, building ADO.NET connection strings, 222-223

programming

AppDomain class, 166-168

multithreaded programming, 121-122

synchronization, 129-138

ThreadPool class, 138-139

writing applications, 123-128

typed DataSets, 266-267

progress reports, System.Deployment.Application namespace, 613-616

ProgressBar control (Windows Control Libraries), 536

prompts (Visual Studio 2005 Command), opening, 157

Properties property, 367

PropertyValues property, 367

protected member visibility level, 56

protection option (Forms authentication), 410

provider factories

connections, establishing, 253-255

lists of, 252-253

Provider property, 414, 417

ProviderName property, 430

providers

ADO.NET data, 251

connection strings, 255-256

customizing, 260-261

data sources, enumerating, 256-257

provider factories, 252-255

RetreiveStatistics method, 258-259

schema information, 259-260

Membership

classes, 429

configuring, 440-441

creating, 430-440

defining, 427

installing, 440-441

methods, 429

properties, 428

schemas, implementing, 429-430

Profile

classes, 449

configuring, 455-456

creating, 450-455

installing, 455-456

methods, 449

schemas, implementing, 449

Role

classes, 441

configuring, 448

creating, 442-448

installing, 448

methods, 441-442

properties, 441

schemas, implementing, 442

SessionState, 456-457

SiteMap, 457-458

Providers property, 367, 414, 417

ProviderUserKey property, 430

public member visibility level, 56

public protected member visibility level, 56

public-key encryption, 194-195, 198-200

Publish Now button (ClickOnce), 611

Publish Wizard

ClickOnce applications, publishing to CD, 606

Create Test Certificate button, 608

Install button, 609

launching, 607-608

Options button, 608

Prerequisites button, 608

Q – R

queries, adding via typed DataSets, 272-273

Queue class, 73-74

Queue collection, 46

methods table, 47

usage example, 47-48

queued components (COM+), 624-626

RadioButton control (Windows Control Libraries), 536

RadioButtonList control, 399

Rank property, 35

RCW (Runtime Callable Wrapper), 170

ReaderWriterLock class, 133-136

reading files, existing (I/O), 82-83

ReadOnly property, 574

real dependencies (software), 504

RedirectFromLoginPage method, 411-412

RedirectToLoginPage method, 411

reference counting, 648

reference types

boxing/unboxing, 208-209

defining, 10, 207

referencing .NET-hosted COM objects, 175

reflection, 141-143

assemblies, 158

custom attributes, creating, 150-153

events, 148-150

generics, 145

MemberInfo class, 146-148

MethodInfo class, 143-146

System.Type class, methods/properties, 142

RegEx class, 30

registering

.NET-hosted COM objects, 175

COM+, 620-622

RegisterWellKnownServiceType method, remoting, 641

regular expressions, 29-31

ReleaseItemExclusive method, 456

remoting

aspects of, 638

channels, 641

IPC channels, 641-645

TCP channels, 645-648

generics, 650-653

lifetime leases, 648-649

MarshalByRefObject class, 639

overview of, 637

RegisterWellKnownServiceType method, 641

RemotingConfiguration class, 641

single call objects, 639

singleton objects, 639

RemotingConfiguration class, 641

remove accessors, 114-117

Remove method, 44, 330, 568

Remove string instance method, 27

RemoveAll method, 92, 330

RemoveAt method, 44, 330, 568

RemoveChild method, 92

RemoveCurrent method, 568

RemoveItem method, 456

RemoveUser(s)FromRole(s) method, 417, 442

Render stage (ASP.NET page life cycle), 303

repetition, loops, 20-21

Replace string instance method, 27

ReportViewer control (Windows Control Libraries), 542

Request for Page stage (ASP.NET page life cycle), 302

RequiresQuestionAndAnswer property, 414, 428

RequiresUniqueEmail property, 428

reset events, 136-138

ResetBindings method, 568

ResetCurrentItem method, 568

ResetItem method, 568

ResetItemTimeout method, 457

ResetPassword method, 429

resizable forms, creating (Windows Forms Designer), 526-527

Resize method, 35

resources (assemblies)

embedding, 160

localization, hub-and-spoke model, 163

storing/retrieving, 160-163

ResumeBinding method, 568

RetrieveStatistics method, 258-259

retrieving assembly resources, 160-163

Reverse method, 44

RichTextBox control (Windows Control Libraries), 536

Role Groups view (LoginView control), 420

Role provider, 418

classes, 441

configuring, 448

creating, 442-448

installing, 448

methods, 441-442

properties, 441

schemas, implementing, 442

role-based security (COM+), 626

RoleExists method, 417, 442

<roleManager> element (Web.config files), configuring Role provider, 448

RoleProvider class, 441

Roles, 416-418

Roles class

methods, 417

properties, 416-417

Rows property, 574

Runtime Callable Wrapper (RCW), 170

runtime errors, ASP.NET themes, 361

S

satellite assemblies, localization, 163-165

Save method, 93

SaveControlState method, 468

SaveFileDialog component (Windows Control Libraries), 547

saving DataTables, 238-240

sbyte aliases (.NET data types), 9

Schema Discovery

columns provided for each schema collection used table, 230

SQL Server 2005 invocation results table, 229-230

schemas

obtaining information (ADO.NET), 259-260

XML Schema home page, 264

XSD, creating typed DataSets, 264-265

scope, isolated storage, 87

Scroll event, 572

secret-key encryption, 194-198

security. See also cryptography

ASP.NET, 301

ASP.NET applications authentication, 407

authentication, Forms, 410-412

authentication, Membership API, 412-415

authentication, Passport, 409

authentication, user management, 412-415

authentication, Windows, 408

authorization, 416

authorization, Roles, 416-418

ChangePassword control, 422

CreateUserWizard control, 422

encrypted configuration files, 424-426

Login control, 419

LoginName control, 419

LoginStatus control, 420

LoginView control, 420-421

PasswordRecovery control, 421

CAS, 181

administering, 184-185

code permissions, 182-184

declarative security, 189-191

imperative security, 185-189

cookies, Passport authentication, 409

role-based security (COM+), 626

web services, WSE, 512

SelectAll method, 573

SelectCommand, 233

SelectionChanged event, 573

SelectNodes method, 92

SelectSingleNode method, 92

Serializable classes, ASP.NET State Server providers, 334

SerialPort component (Windows Control Libraries), 545

server controls (ASP.NET)

bubbling, 466-467

creating, 463-467

properties, attributes of, 464

state management, 468-472

server-side SQL libraries, 290-293

ServerVersion property, 222

Service (Windows), Windows Forms 2.0, 522

ServiceController component (Windows Control Libraries), 545

Session End events, 339-340

session IDs, 328

Session objects, 332

Session Start events, 339-340

session state

ASP.NET State Server providers

out-of-process servers, 334-336

Serializable classes, 334

turning on/off, 333

usage example, 335-336

Web.conf files, modifying, 333-334

default in-process state providers, 329-332

event handling, 339-340

HttpSessionState class, 329-330

managing, 301, 329

session IDs, 328

Session objects, 332

SQL Server Session State providers, 337-338

storing, 329

web farms, 343

SessionID property, 330

SessionState provider, 456-457

SessionStateProviderBase class, 456

SetAndReleaseItemExclusive method, 457

SetAuthCookie method, 411

SetItemExpireCallback method, 457

shapes

drawing/filling via GDI+, 552-557

forms/controls, creating, 557-558

shared properties (COM+), 629-631

shared scope, user access, 385

short aliases (.NET data types), 9

shortcuts (.NET data types), 9

SignOut method, 412

single call objects (remoting), 639

single inheritance, 57

singleton objects (remoting), 639

SiteMap provider, 457-458

SiteMapDataSource, 396

size, user interface design, 528

skins (ASP.NET), 360-363

Sleep method, 127

sleeping, multithreaded applications, 127

smart clients. See also applications

application settings system, 589-591

BackgroundWorker component (Windows Control Libraries), 598-600

characteristics of, 587

multithreaded web service consumption, 597-598

network status, monitoring (usage example), 592-594

NetworkAddressChanged events, 592-593

NetworkAvailabilityChanged events, 592-593

online/offline operation, 591-594

System.Net.NetworkInformation namespace, 591-592

universal login dialog example, 594-596

user authorization/authentication, 594-596

web services, 588-589

SnapLines (Windows Forms Designer), 525-526

SNK (strong-name key), 185

SOA (Service-Oriented Architectures), 503-506

SOAP headers, 509-512

software, dependencies, 504

Sort method, 44, 573

Sort property, 569

SortedList collection, usage example, 49-50

Split string instance method, 27

SplitContainer control (Windows Control Libraries), 539

SQL Server

C# stored procedures, building, 280-283

C# user-defined functions, building, 283-284

CLR, 279, 284-290

Database reference dialog, 280

Execute option, 282

MARS, 293-295

server-side SQL libraries, 290, 292-293

Session State providers, 337-338

SqlCeDataReader, 227

SqlCommand class

methods, 227

parameterized SQL statements, executing, 224

stored procedures, 225-226

SqlDataReader, 227

SqlDataSource, 396

SqlPipe class, properties of, 290

sstype option (aspnet regsql command-line tool), 337

Stack class, 74

Stack collection, usage example, 48-49

standard controls list (ASP.NET), 307

start times (applications), improving, 212

StartsWith string instance method, 28

state management

ASP.NET, 301

server controls (ASP.NET), 468-472

Web Services, 499-500

State property, 222

state providers

ASP.NET State Server providers

out-of-process servers, 334-336

Serializable classes, 334

turning on/off, 333

usage example, 335-336

Web.conf files, modifying, 333-334

default in-process providers, 329-332

SQL Server Session State providers, 337-338

statements (conditional)

goto, 18

if/else, 17-19

switch, 18

static keyword, delegates, 104

static members, 52

static methods, IsMatch, 30

StaticObjects property, 330

statistics, retrieving information (ADO.NET), 258-259

StatusStrip control (Windows Control Libraries), 540

storage

assembly resources, 160-163

isolated, 86-88

keys, 198

stored procedures, building via SQL Server, 280-283

streams, 77

composition, 78

instantiating, 79-80

MemoryStream class, 78-81

Unicode, 80

string GetCallbackResult() method (ICallbackEventHandler interface), 315

StringBuilder class, 29, 210

strings

comparing, 27-28

concatenation, 210

connection strings, building, 220-223, 255-256, 413

formatting, 24-26

immutability, defining, 209

instance methods, 27-28

manipulating, 27-28

StringBuilder, 29

strong-name key (SNK), 185

strongly typed wrappers, accessing assembly resources, 161-162

SubString string instance method, 28

Suspend method, 127

SuspendBinding method, 568

suspending multithreaded applications, 127

switch statements, 18

symmetric encryption. See secret-key encryption

synchronization

methods, 132

multithreaded programming, 129

Interlocked class, 133

lock keyword, 129

Monitor class, 132-133

Mutex class, 130-132

ReaderWriterLock class, 133-136

reset events, 136-138

synchronous files, 85. See also asynchronous files

synchronous web service consumption, smart clients, 597-598

SyncRoot property, 330

System.Boolean.NET data types, 8

System.Byte.NET data types, 8

System.Char.NET data types, 8

System.Decimal.NET data types, 8

System.Deployment.Application namespace, 613-616

System.Diagnostics.Debug class, 311

System.Double.NET data types, 8

System.Int16.NET data types, 9

System.Int32.NET data types, 9

System.Int64.NET data types, 9

System.IO namespace, classes, 83

System.Net.NetworkInformation namespace, 591-592

System.SByte.NET data types, 9

System.Single.NET data types, 8

System.String.NET data types, 9

System.Transactions namespace, 245

explicit transactions, 246-247

implicit transactions, 247-250

System.Type class, methods/properties, 142

System.UInt16.NET data types, 9

System.UInt32.NET data types, 9

System.UInt64.NET data types, 9

System.Web.TraceContext class, 311

T

TabControl control (Windows Control Libraries), 539

TableAdapters, populating typed DataSets, 268-271

TableLayoutPanel control (Windows Control Libraries), 539

Target properties, 114

TCP channels, remoting, 645-648

temporary session state support (SQL Server), 337

terminating multithreaded applications, 125-127

ternary operators, 19

TextBox control (Windows Control Libraries), 536

themes (ASP.NET)

creating, 360

customizing, 371-373

editing, 362

global themes, 363

runtime errors, 361

skins, 360-363

theme-specific images, 364

viewing, 362

Thread class, 122-123

thread contention, 123

thread scheduling, 123

Thread.ResetAbort() method, 126-127

threading, pre-emptive multitasking, 129

ThreadPool class, 138-139

ThreadStart delegate, 124

three-dimensional arrays, 37

timeout option (Forms authentication), 410

Timeout property, 330

Timer component (Windows Control Libraries), 545

TLBIMP.EXE tool, 171

ToArray method, 44, 47

ToCharArray string instance method, 28

token stores, 513

ToLower string instance method, 28

ToolStrip control (Windows Control Libraries), 540, 570

ToolStripContainer control (Windows Control Libraries), 541

ToolStripItem property, 570

ToolTip control (Windows Control Libraries), 537

ToUpper string instance method, 28

Transactional Services, creating, 498-499

TransactionAttribute class, properties of, 627

transactions

(COM+), 627-628

explicit (ADO.NET), 246-247

implicit (ADO.NET), 247-250

TransactionScope class, implicit transactions, 247-250

TreeView control (Windows Control Libraries), 403, 537

Trim string instance method, 28

TrimEnd string instance method, 28

TrimStart string instance method, 28

troubleshooting

application start times, 212

loop performance, 211

turning on/off ASP.NET State Server providers, 333

two-dimensional arrays, 37

jagged arrays, mixing with, 40-41

sample of, 38-39

type parameters

constraining, 67-69

factory patterns, 68

generics, 66-67

naming, 67

typecasting (interfaces), 63

typed datasets

annotating, 273-275

connecting, 267

creating, 263

Visual Studio designer, 265-266

XSD schemas, 264-265

data binding, 563

binding sample, 566

BindingNavigator component, 565

BindingSource component, 565-567

Data Sources window, 564-565

DataGridView component, 565

forms, adding to, 565

extending with partial classes, 275-276

populating, 267-271

programming with, 266-267

queries, adding, 272-273

types

aliases table, 9

common types table, 8-9

namespaces, 9

reference types, 10

shortcuts table, 9

System.Boolean, 8

System.Byte, 8

System.Char, 8

System.Decimal, 8

System.Double, 8

System.Int16, 9

System.Int32, 9

System.Int64, 9

System.SByte, 9

System.Single, 8

System.String, 9

System.UInt16, 9

System.UInt32, 9

System.UInt64, 9

value types, 10

U

UDDI (Universal Description and Discovery Interface), web service URL, 589

UDT (user-defined types)

Point3D example, 285-287

SQL Server, creating in, 284-290

uint aliases (.NET data types), 9

ulong aliases (.NET data types), 9

unboxing/boxing, 208-209

Unicode streams, 80

universal login dialog (smart client example), 594-596

Unload stage (ASP.NET page life cycle), 303

UnlockUser method, 429

unmanaged DLLs (interoperability), 176-178

unmanaged function pointers, 177-178

Update (Windows), 520

UpdateCommand, 233

UpdateCompleted event, 613

UpdateProgressChanged event, 613

updates

batches, ADO.NET, 242-245

ClickOnce, automated updates, 608-612

System.Deployment.Application namespace, 613-616

UpdateUser method, 415, 429

URL (uniform resource locators), smart clients, 588-589

user authentication, smart clients, 594-596

user authorization, smart clients, 594-596

user controls (ASP.NET)

creating, 460-462

pages, adding to, 460

properties, 462

user interfaces

designing

color, 527

complexity of design, 528

count awareness, 528

intuitiveness of design, 528

size, 528

globalizing, 560-562

user profiles (ASP.NET)

anonymous profiles, properties, 368-371

application services, configuring, 364

customizing, 368, 371-373

profile providers, configuring, 365-366

user-defined functions, building via SQL Server, 283-284

UserAddedRow event, 573

UserDeletedRow event, 573

UserDeletingRow event, 573

UserIsOnlineTimeWindow property, 414

username groups, 30

UserName property, 367, 430

ushort aliases (.NET data types), 9

V

Validate method, 93

ValidateUser method, 415, 429

validation controls list (ASP.NET), 309

Validation stage (ASP.NET page life cycle), 303

validationKey attribute (<machineKey> element), 344

Value property, 92

value types

boxing/unboxing, 208-209

defining, 10, 207

ValueMember property, 575

variables, declaring/initializing, 8

view state, 468-472

restoring, 341

usage example, 342

web farms, 344-345

VirtualMode property, 574

visual inheritance, 558-560

Visual Studio

Command Prompt, opening, 157

Image Library, 544

typed DataSets, creating, 265-266

void RaiseCallbackEvent(string eventArgument) method (ICallbackEventHandler interface), 315

.vsp files

Allocation tab, 213

Call Tree tab, 213

Objects Lifetime tab, 214

W

Web (World Wide), ClickOnce applications

launching directly from, 606

publishing to, 605

web configuration, ASP.NET, 302

Web Event providers, 473

Custom Event providers, 482-483

list of, 474

Web.config files, 475-476

web events, 473

base events, inheriting from, 478

custom events, 478-482

lifetime events, 477-478

list of, 474

web farms

application state, 343

session state, 343

view state, 344-345

web forms, Windows Forms 2.0 versus, 520-522

Web Parts, 375

connected Web Parts, creating, 389-393

controls, 376

creating, 388

methods of, 378

personalization providers, 378-379

properties of, 377-378

shared scope, user access, 385

Web Parts Pages, 380-386

zones, 380

web services

binding, Data Sources Panel (Windows Forms), 514-515

development of, 489-490

“Hello World” service example, 490-498

multithreaded web service consumption, smart clients, 597-598

SOA, 503-506

SOAP headers, 509-512

state management, 499-500

token stores, 513

Transactional Services, creating, 498-499

URL, smart clients

obtaining for, 589

storing in, 588

usage process, 490

Web Services Discovery, 507-509

WSDL, 490, 495-498

WSE, 512

Web.conf files, ASP.NET State Server providers, 333-334

Web.config files

ASP.NET application security, 408

encrypting, 424-426

Forms authentication, 410-411

health monitoring system (ASP.NET)

custom events, 478-482

lifetime events, 476-478

Web Event providers, 475-476

<machineKey> elements, 344

Membership provider, configuring, 440

Profile providers, creating, 455-456

Role provider, configuring, 448

SQL Server Session State providers, modifying via, 338

WebBrowser control (Windows Control Libraries), 538

WebControl class, 463

WebPartManager control (Web Parts), 377, 380

WebPartZone control (Web Parts), 377, 380, 386

while loops, 20

Win32 API, unmanaged DLLs, 176-177

Windows Applications (Windows Forms 2.0), 522

Windows authentication, 408

Windows Control Libraries (Windows Forms 2.0), 522

Common Controls Toolbox, 531

Button control, 532

CheckBox control, 532

CheckedListBox control, 532

ComboBox control, 532

DateTimePicker control, 532-533

Label control, 533

LinkLabel control, 533

ListBox control, 534

ListView control, 534

MaskedTextBox control, 534

MonthCalendar control, 534

NotifyIcon control, 535

NumericUpDown control, 535

PictureBox control, 536

ProgressBar control, 536

RadioButton control, 536

RichTextBox control, 536

TextBox control, 536

ToolTip control, 537

TreeView control, 537

WebBrowser control, 538

Components Toolbox

BackgroundWorker component, 542, 598-600

DirectoryEntry component, 542

DirectorySearcher component, 543

ErrorProvider component, 543

EventLog component, 543

FileSystemWatcher component, 543

HelpProvider component, 544

ImageList component, 544

MessageQueue component, 544

PerformanceCounter component, 545

Process component, 545

SerialPort component, 545

ServiceController component, 545

Timer component, 545

containers, 538-539

data-related controls section, 541-542

dialog components section, 546-547

menus and toolbars section, 540-541

Printing section, 545-546

Windows Forms 2.0, 519

applications

creating, 522

cultures, changing, 561-562

Class Libraries, 522

Console Applications, 522

Data Sources panel, building web services, 514-515

Forms Designer, 523

Anchor selection pop-up, 527

Dock selection pop-up, 526

Document Outline window, 524

resizable forms, creating, 526-527

SnapLines, 525-526

NET Framework, 519

shaped forms/controls, creating, 557-558

user interfaces, globalizing, 560-562

visual inheritance, 558-560

web forms versus, 520-522

Windows Applications, 522

Windows Control Libraries, 522

Common Controls Toolbox, 531-538

Components Toolbox, 542-545

containers, 538-539

data-related controls section, 541-542

dialog components section, 546

menus and tables section, 540-541

Printing section, 545-546

Windows Service, 522

Windows Forms Designer, 523

Anchor selection pop-up, 527

Dock selection pop-up, 526

Document Outline window, 524

resizable forms, creating, 526-527

SnapLines, 525-526

Windows Installer, ClickOnce versus, 604-605

Windows Service (Windows Forms 2.0), 522

Windows Update, 520

WindowsAuthenticationModule class, 408

WindowsIdentity class, 408

WindowsPrincipal class, 408

wizards

ASP.NET SQL Server Configuration

Wizard, configuring application services, 364

Data Source Configuration Wizard, 396-397

Performance Wizard, 212-213

Publish Wizard, 606-609

Word documents, creating with PIA (Primary InterOp Assembly), 172-173

wrappers

Runtime Callable (RCW), 170

strongly typed wrappers, accessing assembly resources, 161-162

WSDL (Web Services Description Language), 490, 495-498

WSE (Web Services Extensions), 512

X

XML (eXtensible Markup Language)

documents

display sample, 94-95

hierarchy levels, representation of, 95

Items.xml document, 93-94

reading/writing, 91-95

XSD validations, 100-101

XSLT transformations, 97-99

itemsTransform.xslt document, 97-98

DataTables, loading/saving, 238-240

DOM, 91

querying, XPath, 95-97

XML Schema home page, 264

XmlDataSource, 396

XmlDocument class, methods table, 92-93

XmlNode class, 91-94

XMLProvider C# Class Library

Membership provider, creating, 431-440

Profile provider, creating, 450-455

Role provider, creating/installing, 442-448

XOR (^) operators, 16. See also OR operators

XPath, 95-97

XSD (XML Schema Definition)

items.xsd document, 100-101

schemas, creating typed DataSets, 264-265

XSLT (XSL Transformation), 97-99

Y – Z

zones (Web Parts), 380

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.22.61.179