C# Cookbook TOC 4

Recipe14.11.Caching Data with Multiple Dependencies
Recipe14.12.Prebuilding an ASP.NET Web Site Programmatically
Recipe14.13.Escaping and Unescaping Data for the Web
Recipe14.14.Using the UriBuilder Class
Recipe14.15.Inspect and Change Your Web Application Configuration
Recipe14.16.Working with HTML
Recipe14.17.Using Cached Results When Working with HTTP for Faster Performance
Recipe14.18.Checking out a Web Server's Custom Error Pages
Recipe14.19.Determining the Application Mappings for ASP.NET Set Up on IIS
Chapter 15. XML
Recipe15.1.Reading and Accessing XML Data in Document Order
Recipe15.2.Reading XML on the Web
Recipe15.3.Querying the Contents of an XML Document
Recipe15.4.Validating XML
Recipe15.5.Creating an XML Document Programmatically
Recipe15.6.Detecting Changes to an XML Document
Recipe15.7.Handling Invalid Characters in an XML String
Recipe15.8.Transforming XML
Recipe15.9.Tearing Apart an XML Document
Recipe15.10.Putting Together an XML Document
Recipe15.11.Validating Modified XML Documents Without Reloading
Recipe15.12.Extending XSLT Transformations
Recipe15.13.Getting Your Schema in Bulk from Existing XML Files
Recipe15.14.Passing Parameters to XSLT Transformations
Chapter 16. Networking
Recipe16.1.Writing a TCP Server
Recipe16.2.Writing a TCP Client
Recipe16.3.Simulating Form Execution
Recipe16.4.Downloading Data from a Server
Recipe16.5.Using Named Pipes to Communicate
Recipe16.6.Pinging Programmatically
Recipe16.7.Send SMTP Mail Using the SMTP Service
Recipe16.8.Check out Your Network Connectivity
Recipe16.9.Use Sockets to Scan the Ports on a Machine
Recipe16.10.Use the Current Internet Connection Settings
Recipe16.11.Download a File Using FTP
Chapter 17. Security
Recipe17.1.Controlling Access to Types in a Local Assembly
Recipe17.2.Encrypting/Decrypting a String
Recipe17.3.Encrypting and Decrypting a File
Recipe17.4.Cleaning up Cryptography Information
Recipe17.5.Verifying that a String Remains Uncorrupted Following Transmission
Recipe17.6.Wrapping a String Hash for Ease of Use
Recipe17.7.A Better Random Number Generator
Recipe17.8.Storing Data Securely
Recipe17.9.Making a Security Assert Safe
Recipe17.10.Preventing Malicious Modifications to an Assembly
Recipe17.11.Verifying That an Assembly Has Been Granted Specific Permissions
Recipe17.12.Minimizing the Attack Surface of an Assembly
Recipe17.13.Obtaining Security/Audit Information
Recipe17.14.Granting/Revoking Access to a File or Registry Key
Recipe17.15.Protecting String Data with Secure Strings
Recipe17.16.Securing Stream Data
Recipe17.17.Encrypting web.config Information
Recipe17.18.Obtaining the Full Reason a SecurityException Was Thrown
Recipe17.19.Achieving Secure Unicode Encoding
Recipe17.20.Obtaining a Safer File Handle
Chapter 18. Threading and Synchronization
Recipe18.1.Creating Per-Thread Static Fields
Recipe18.2.Providing Thread-Safe Access to Class Members
Recipe18.3.Preventing Silent Thread Termination
Recipe18.4.Polling an Asynchronous Delegate
Recipe18.5.Timing out an Asynchronous Delegate
Recipe18.6.Being Notified of the Completion of an Asynchronous Delegate
Recipe18.7.Determining Whether a Request for a Pooled Thread Will Be Queued
Recipe18.8.Configuring a Timer
Recipe18.9.Storing Thread-Specific Data Privately
Recipe18.10.Granting Multiple Access to Resources with a Semaphore
Recipe18.11.Synchronizing Multiple Processes with the Mutex
Recipe18.12.Using Events to Make Threads Cooperate
Recipe18.13.Get the Naming Rights for Your Events
Recipe18.14.Performing Atomic Operations Among Threads
Chapter 19. Unsafe Code
Recipe19.1.Controlling Changes to Pointers Passed to Methods
Recipe19.2.Comparing Pointers
Recipe19.3.Navigating Arrays
Recipe19.4.Manipulating a Pointer to a Fixed Array
Recipe19.5.Returning a Pointer to a Particular Element in an Array
Recipe19.6.Creating and Using an Array of Pointers
Recipe19.7.Switching Unknown Pointer Types
Recipe19.8.Converting a String to a char*
Recipe19.9.Declaring a Fixed-Size Structure with an Embedded Array
Chapter 20. Toolbox
Recipe20.1.Dealing with Operating System Shutdown, Power Management, or User Session Changes
Recipe20.2.Controlling a Service
Recipe20.3.List What Processes an Assembly Is Loaded In
Recipe20.4.Using Message Queues on a Local Workstation
Recipe20.5.Finding the Path to the Current Framework Version
Recipe20.6.Determining the Versions of an Assembly That Are Registered in the Global Assembly Cache (GAC)
Recipe20.7.Getting the Windows Directory
Recipe20.8.Capturing Output from the Standard Output Stream
Recipe20.9.Running Code in Its Own appdomain
Recipe20.10.Determining the Operating System and Service Pack Version of the Current Operating System