Friday, November 30, 2007

Pro C# 2008 and the .NET 3.5 Platform, Fourth Edition by Andrew Troelsen

Apress has published their latest C# book: Pro C# 2008 and the .NET 3.5 Platform, Fourth Edition
By Andrew Troelsen
ISBN10: 1-59059-884-9
ISBN13: 978-1-59059-884-9
1370 pp.
Published on Nov 2007

Download a sample chapter here: Ch. 01 - The Philosophy of .NET
Download bonus chapters here

Table of contents:

Part 1 Introducing C# and the .NET Platform

CHAPTER 1 The Philosophy of .NET
Understanding the Previous State of Affairs
The .NET Solution
Introducing the Building Blocks of the .NET Platform (the CLR, CTS,
and CLS)
Additional .NET-Aware Programming Languages
An Overview of .NET Assemblies
Understanding the Common Type System
Understanding the Common Language Specification
Understanding the Common Language Runtime
The Assembly/Namespace/Type Distinction
Exploring an Assembly Using ildasm.exe
Exploring an Assembly Using Lutz Roeder’s Reflector
Deploying the .NET Runtime
The Platform-Independent Nature of .NET

CHAPTER 2 Building C# Applications
The Role of the .NET Framework 3.5 SDK.
Building C# Applications Using csc.exe
Building .NET Applications Using TextPad.
Building .NET Applications Using Notepad++.
Building .NET Applications Using SharpDevelop
Building .NET Applications Using Visual C# 2008 Express..
Building .NET Applications Using Visual Studio 2008.
A Partial Catalog of Additional .NET Development Tools

Part 2 Core C# Programming Constructs

CHAPTER 3 Core C# Programming Constructs, Part I
The Anatomy of a Simple C# Program.
An Interesting Aside: Some Additional Members of the System.Environment Class
The System.Console Class.
System Data Types and C# Shorthand Notation
Understanding the System.String Type
Narrowing and Widening Data Type Conversions
C# Iteration Constructs..
Decision Constructs and the Relational/Equality Operators..

CHAPTER 4 Core C# Programming Constructs, Part II
Methods and Parameter Modifiers..
Understanding Member Overloading
Array Manipulation in C#..
Understanding the Enum Type
Understanding the Structure Type.
Understanding Value Types and Reference Types..
Value and Reference Types: Final Details.
Understanding C# Nullable Types.

CHAPTER 5 Defining Encapsulated Class Types.
Introducing the C# Class Type
Understanding Class Constructors.
The Role of the this Keyword
Understanding the static Keyword.
Defining the Pillars of OOP
C# Access Modifiers
The First Pillar: C#’s Encapsulation Services
Understanding Constant Data
Understanding Read-Only Fields..
Understanding Partial Types
Documenting C# Source Code via XML..
Visualizing the Fruits of Our Labor.

CHAPTER 6 Understanding Inheritance and Polymorphism.
The Basic Mechanics of Inheritance
Revising Visual Studio Class Diagrams
The Second Pillar: The Details of Inheritance
Programming for Containment/Delegation
The Third Pillar: C#’s Polymorphic Support
Understanding Base Class/Derived Class Casting Rules
The Master Parent Class: System.Object.

CHAPTER 7 Understanding Structured Exception Handling
Ode to Errors, Bugs, and Exceptions
The Role of .NET Exception Handling.
The Simplest Possible Example..
Configuring the State of an Exception
System-Level Exceptions (System.SystemException)
Application-Level Exceptions (System.ApplicationException)
Processing Multiple Exceptions..
The Finally Block.
Who Is Throwing What?.
The Result of Unhandled Exceptions
Debugging Unhandled Exceptions Using Visual Studio

CHAPTER 8 Understanding Object Lifetime
Classes, Objects, and References.
The Basics of Object Lifetime
The Role of Application Roots
Understanding Object Generations..
The System.GC Type
Building Finalizable Objects
Building Disposable Objects
Building Finalizable and Disposable Types.

Part 3 Advanced C# Programming Constructs
CHAPTER 9 Working with Interfaces
Understanding Interface Types
Defining Custom Interfaces.
Implementing an Interface
Invoking Interface Members at the Object Level..
Interfaces As Parameters.
Interfaces As Return Values
Arrays of Interface Types.
Implementing Interfaces Using Visual Studio 2008.
Resolving Name Clashes via Explicit Interface Implementation
Designing Interface Hierarchies..
Building Enumerable Types (IEnumerable and IEnumerator)
Building Cloneable Objects (ICloneable)..
Building Comparable Objects (IComparable).
Understanding Callback Interfaces..

CHAPTER 10 Collections and Generics
The Interfaces of the System.Collections Namespace
The Class Types of System.Collections..
System.Collections.Specialized Namespace.
The Boxing, Unboxing, and System.Object Relationship..
The Issue of Type Safety and Strongly Typed Collections..
The System.Collections.Generic Namespace
Creating Custom Generic Methods..
Creating Generic Structures and Classes.
Creating a Custom Generic Collection
Creating Generic Base Classes
Creating Generic Interfaces.

CHAPTER 11 Delegates, Events, and Lambdas
Understanding the .NET Delegate Type..
Defining a Delegate in C#.
The System.MulticastDelegate and System.Delegate Base Classes.
The Simplest Possible Delegate Example.
Retrofitting the Car Type with Delegates..
A More Elaborate Delegate Example
Understanding Delegate Covariance
Creating Generic Delegates
Understanding C# Events.
The Generic EventHandler Delegate..
Understanding C# Anonymous Methods..
Understanding Method Group Conversions.
The C# 2008 Lambda Operator..

CHAPTER 12 Indexers, Operators, and Pointers
Understanding Indexer Methods
Understanding Operator Overloading.
Understanding Custom Type Conversions..
Working with Pointer Types
C# Preprocessor Directives.

CHAPTER 13 C# 2008 Language Features
Understanding Implicitly Typed Local Variables
Understanding Automatic Properties
Understanding Extension Methods..
Understanding Partial Methods..
Understanding Object Initializer Syntax..
Understanding Anonymous Types.

CHAPTER 14 An Introduction to LINQ
Understanding the Role of LINQ..
A First Look at LINQ Query Expressions..
LINQ and Generic Collections
LINQ and Nongeneric Collections..
The Internal Representation of LINQ Query Operators
Investigating the C# LINQ Query Operators.
LINQ Queries: An Island unto Themselves?.

PART 4 Programming with .NET Assemblies
CHAPTER 15 Introducing .NET Assemblies
Defining Custom Namespaces
The Role of .NET Assemblies
Understanding the Format of a .NET Assembly
Building and Consuming a Single-File Assembly..
Building and Consuming a Multifile Assembly
Understanding Private Assemblies..
Understanding Shared Assemblies.
Consuming a Shared Assembly..
Configuring Shared Assemblies..
Investigating the Internal Composition of the GAC
Understanding Publisher Policy Assemblies
Understanding the Element.
The System.Configuration Namespace
The Machine Configuration File

CHAPTER 16 Type Reflection, Late Binding, and Attribute-Based Programming
The Necessity of Type Metadata..
Understanding Reflection.
Building a Custom Metadata Viewer
Dynamically Loading Assemblies..
Reflecting on Shared Assemblies..
Understanding Late Binding
Understanding Attributed Programming
Building Custom Attributes
Assembly-Level (and Module-Level) Attributes
Reflecting on Attributes Using Early Binding.
Reflecting on Attributes Using Late Binding
Putting Reflection, Late Binding, and Custom Attributes in Perspective
Building an Extendable Application.

CHAPTER 17 Processes, AppDomains, and Object Contexts
Reviewing Traditional Win32 Processes..
Interacting with Processes Under the .NET Platform.
Understanding .NET Application Domains.
Understanding Object Context Boundaries.
Summarizing Processes, AppDomains, and Context.

CHAPTER 18 Building Multithreaded Applications
The Process/AppDomain/Context/Thread Relationship
A Brief Review of the .NET Delegate
The Asynchronous Nature of Delegates
Invoking a Method Asynchronously.
The System.Threading Namespace.
The System.Threading.Thread Class
Programmatically Creating Secondary Threads
The Issue of Concurrency.
Programming with Timer Callbacks.
Understanding the CLR ThreadPool.
The Role of the BackgroundWorker Component

CHAPTER 19 Understanding CIL and the Role of Dynamic Assemblies
Reflecting on the Nature of CIL Programming
Examining CIL Directives, Attributes, and Opcodes.
Pushing and Popping: The Stack-Based Nature of CIL
Understanding Round-Trip Engineering
Understanding CIL Directives and Attributes.
.NET Base Class Library, C#, and CIL Data Type Mappings.
Defining Type Members in CIL
Examining CIL Opcodes..
Building a .NET Assembly with CIL.
Understanding Dynamic Assemblies

Part 5 Introducing the .NET Base Class Libraries
CHAPTER 20 File I/O and Isolated Storage
Exploring the System.IO Namespace
The Directory(Info) and File(Info) Types..
Working with the DirectoryInfo Type
Working with the Directory Type..
Working with the DriveInfo Class Type..
Working with the FileInfo Class..
Working with the File Type
The Abstract Stream Class
Working with StreamWriters and StreamReaders..
Working with StringWriters and StringReaders
Working with BinaryWriters and BinaryReaders
Programmatically “Watching” Files.
Performing Asynchronous File I/O.
Understanding the Role of Isolated Storage
A Primer on Code Access Security..
An Overview of Isolated Storage
Obtaining a Store Using IsolatedStorageFile
Isolated Storage in Action: ClickOnce Deployment..

CHAPTER 21 Introducing Object Serialization
Understanding Object Serialization.
Configuring Objects for Serialization
Choosing a Serialization Formatter.
Serializing Objects Using the BinaryFormatter
Serializing Objects Using the SoapFormatter
Serializing Objects Using the XmlSerializer.
Serializing Collections of Objects..
Customizing the Serialization Process

CHAPTER 22 ADO.NET Part I: The Connected Layer
A High-Level Definition of ADO.NET.
Understanding ADO.NET Data Providers..
Additional ADO.NET Namespaces.
The Types of the System.Data Namespace
Abstracting Data Providers Using Interfaces.
Creating the AutoLot Database
The ADO.NET Data Provider Factory Model.
Understanding the Connected Layer of ADO.NET
Working with Data Readers
Building a Reusable Data Access Library.
Creating a Console UI–Based Front End..
Asynchronous Data Access Using SqlCommand..
Understanding Database Transactions..

CHAPTER 23 ADO.NET Part II: The Disconnected Layer
Understanding the Disconnected Layer of ADO.NET.
Understanding the Role of the DataSet..
Working with DataColumns.
Working with DataRows.
Working with DataTables.
Binding DataTable Objects to User Interfaces
Filling DataSet/DataTable Objects Using Data Adapters..
Revisiting AutoLotDAL.dll.
Navigating Multitabled DataSet Objects..
The Data Access Tools of Visual Studio 2008
Decoupling Autogenerated Code from the UI Layer.

CHAPTER 24 Programming with the LINQ APIs
The Role of LINQ to ADO.NET
Programming with LINQ to DataSet.
Programming with LINQ to SQL..
Generating Entity Classes Using SqlMetal.exe
Building Entity Classes Using Visual Studio 2008
Manipulating XML Documents Using LINQ to XML..
Navigating an In-Memory Document

CHAPTER 25 Introducing Windows Communication Foundation
A Potpourri of Distributed Computing APIs.
The Role of WCF..
Investigating the Core WCF Assemblies..
The Visual Studio WCF Project Templates..
The Basic Composition of a WCF Application
The ABCs of WCF.
Building a WCF Service..
Hosting the WCF Service..
Building the WCF Client Application.
Using the WCF Service Library Project Template..
Hosting the WCF Service As a Windows Service..
Invoking a Service Asynchronously.
Designing WCF Data Contracts

CHAPTER 26 Introducing Windows Workflow Foundation
Defining a Business Process
The Building Blocks of WF
WF Assemblies, Namespaces, and Projects
Building a Simple Workflow-Enabled Application
Examining the WF Engine Hosting Code..
Invoking Web Services Within Workflows.
Building a Reusable WF Code Library
A Brief Word Regarding Custom Activities.

Part 6 Desktop User Interfaces
CHAPTER 27 Programming with Windows Forms
The Windows Forms Namespaces..
Building a Simple Windows Forms Application (IDE-Free)..
The Visual Studio Windows Forms Project Template.
The Anatomy of a Form..
Responding to Mouse Activity
Responding to Keyboard Activity..
Designing Dialog Boxes..
Rendering Graphical Data Using GDI+
Building a Complete Windows Forms Application..

CHAPTER 28 Introducing Windows Presentation Foundation and XAML
The Motivation Behind WPF
The Various Flavors of WPF Applications..
Investigating the WPF Assemblies.
Building a (XAML-Free) WPF Application..
Additional Details of the Application Type.
Additional Details of the Window Type..
Building a (XAML-Centric) WPF Application
Transforming Markup into a .NET Assembly
Separation of Concerns Using Code-Behind Files.
The Syntax of XAML
Building WPF Applications Using Visual Studio 2008.
Processing XAML at Runtime: SimpleXamlPad.exe.
The Role of Microsoft Expression Blend.

CHAPTER 29 Programming with WPF Controls
A Survey of the WPF Control Library
Declaring Controls in XAML
Understanding the Role of Dependency Properties.
Understanding Routed Events
Working with Button Types
Working with CheckBoxes and RadioButtons
Working with the ListBox and ComboBox Types..
Working with Text Areas.
Controlling Content Layout Using Panels..
Building a Window’s Frame Using Nested Panels.
Understanding WPF Control Commands.
Understanding the WPF Data-Binding Model
Data Conversion Using IValueConverter.
Binding to Custom Objects
Binding UI Elements to XML Documents.

CHAPTER 30 WPF 2D Graphical Rendering, Resources, and Themes
The Philosophy of WPF Graphical Rendering Services
Exploring the Shape-Derived Types
Working with WPF Brushes
Working with WPF Pens.
Exploring the Drawing-Derived Types..
The Role of UI Transformations..
Understanding WPF’s Animation Services.
Understanding the WPF Resource System
Defining and Applying Styles for WPF Controls..
Altering a Control’s UI Using Templates.

Part 7 Building Web Applications with ASP.NET
CHAPTER 31 Building ASP.NET Web Pages
The Role of HTTP.
Understanding Web Applications and Web Servers.
The Role of HTML.
The Role of Client-Side Scripting.
Submitting the Form Data (GET and POST)
Building a Classic ASP Page
Problems with Classic ASP
The ASP.NET Namespaces
The ASP.NET Web Page Code Model
Details of an ASP.NET Website Directory Structure.
The ASP.NET Page Compilation Cycle..
The Inheritance Chain of the Page Type.
Interacting with the Incoming HTTP Request
Interacting with the Outgoing HTTP Response
The Life Cycle of an ASP.NET Web Page.
The Role of the Web.config File..

CHAPTER 32 ASP.NET Web Controls, Themes, and Master Pages
Understanding the Nature of Web Controls
The System.Web.UI.Control Type.
The System.Web.UI.WebControls.WebControl Type.
Major Categories of ASP.NET Web Controls
Building a Feature-Rich ASP.NET Website
The Role of the Validation Controls
Working with Themes..
Positioning Controls Using HTML Tables.

CHAPTER 33 ASP.NET State Management Techniques
The Issue of State
ASP.NET State Management Techniques.
Understanding the Role of ASP.NET View State.
The Role of the Global.asax File.
Understanding the Application/Session Distinction.
Working with the Application Cache
Maintaining Session Data
Understanding Cookies.
The Role of the Element.
Understanding the ASP.NET Profile API.

Part 8 Appendixes
APPENDIX A COM and .NET Interoperability
The Scope of .NET Interoperability.
A Simple Example of .NET to COM Interop
Investigating a .NET Interop Assembly.
Understanding the Runtime Callable Wrapper
The Role of COM IDL.
Using a Type Library to Build an Interop Assembly.
Building a More Elaborate COM Server.
Examining the Interop Assembly.
Understanding COM to .NET Interoperability
The Role of the CCW.
The Role of the .NET Class Interface
Building Your .NET Types
Generating the Type Library and Registering the .NET Types
Examining the Exported Type Information.
Building a Visual Basic 6.0 Test Client

APPENDIX B Platform-Independent .NET Development with Mono
The Platform-Independent Nature of .NET
Obtaining and Installing Mono.
The Mono Development Tools.
Building .NET Applications with Mono.
Suggestions for Further Study.


Amazon Link: Pro C# 2008 and the .NET 3.5 Platform, Fourth Edition

Thursday, November 29, 2007

Visual Studio Team System Code Name Rosario November 2007 CTP (VPC Image) Available For Download

Brief Description
Visual Studio® Team System Code Name “Rosario” is the version of Team System that follows Visual Studio Team System 2008. This release provides the earliest public glimpse of the work in progress on the next generation of Team System.

Visual Studio® Team System code name "Rosario" is an integrated Application Life-Cycle Management (ALM) solution comprising tools, processes, and guidance. It enables members of your team to:

  • Collaborate and communicate more effectively with other team members and business stakeholders
  • Ensure software quality using advanced quality tools at every step of the application life cycle
  • Gain visibility into project activity and priorities to make informed decisions based on real-time data

This CTP release is available in English only.

This CTP targets early adopters of the Microsoft technology, platform, and tools offerings. It enables developers to experience the upcoming toolset and underlying platform improvements. We designed this release to enable developers to try out new technology and product changes, but not to build production systems. This limitation is fully covered in the License Terms that accompany this CTP.

To learn more about this release, please visit the Visual Studio Team System Code Name “Rosario” home page.

Download Visual Studio Team System Code Name Rosario November 2007 CTP here:

Tuesday, November 27, 2007

Word Play

When you rearrange the letters:

When you rearrange the letters:

When you rearrange the letters:


When you rearrange the letters:

When you rearrange the letters:

When you rearrange the letters:

When you rearrange the letters:

When you rearrange the letters:

When you rearrange the letters:

When you rearrange the letters:

When you rearrange the letters:

When you rearrange the letters:

When you rearrange the letters:

When you rearrange the letters:


When you rearrange the letters:

Integer Math In SQL Server

What do you think the following query will return in SQL Server?


If you said 1.5 then you are wrong! The correct answer is 1, this is because when doing division with 2 integers the result will also be an integer.
There are two things you can do
1 multiply one of the integers by 1.0
2 convert one of the integers to a decimal

Integer math is integer result
SELECT @Val1 =3, @val2 =2

SELECT @Val1/@Val2

Result 1

Convert explicit or implicit to get the correct answer
SELECT @Val1 =3, @val2 =2

SELECT @Val1/(@Val2*1.0)

Result 1.50000000000000

VS2008 Training Kit: Introduction to ASP.NET AJAX

This session was presented by Steve Marx and is from the Visual Studio 2008 training kit available from

In this session, you'll learn how to use ASP.NET AJAX to build a richer, more responsive user experience. Topics include partial rendering, web services, structured scripting, and integration with Silverlight.

Download it here:

VS2008 Training Kit: Building Web Applications with Visual Studio 2008

This session was presented by Ryan Dunn and is from the Visual Studio 2008 training kit available from

This session covers the new design and development features in Visual Studio 2008 for creating rich web applications. Topics include the new CSS and HTML design tools, much improved Javascript Intellisense and debugging support, and the new ASP.NET 3.5 controls supporting LINQ and AJAX.

Download it here:

VS2008 Training Kit: Introduction to Silverlight

This session was presented by Adam Kinney and is from the Visual Studio 2008 training kit available from

Silverlight is a cross platform UI framework for creating compelling Web experiences. Come learn the high-level architecture of Silverlight and the tools that are available to build Silverlight applications.

Download it here:

VS2008 Training Kit: What's New in Windows Presentation Foundation 3.5

This session was presented by Kevin Moore and is from the Visual Studio 2008 training kit available from

Learn about the work being done in the Orcas release of WPF, including improved 3D with UIElement3D, increased animation smoothness, better cookie and FireFox plug-in support for XBAPs, as well as support for AddInControl, LINQ, ADO.NET and much more!

Download it here:

VS2008 Training Kit: Building Windows Presentation Foundation Applications in Visual Studio 2008 and Expression Blend

This session was presented by Jaime Rodriguez and is from the Visual Studio 2008 training kit available from

Come and learn how to build Windows Presentation Foundation (WPF) applications with the help of the new WPF designer in Visual Studio 2008 This session focuses on the construction of a real-world application demonstrating how to get the best out of the designer's capabilities. Learn the basics of building WPF applications in the Visual Studio 2008 WPF designer; have a clear view on when you'll want to work in XAML Code and on the Visual Studio design surface to get your WPF application built; and see how you can use Microsoft Expression Blend in conjunction with Visual Studio 2008 WPF designer.

Watch the screencast here:

Monday, November 26, 2007

.NET Framework 3.5 Common Namespaces and Types Poster Available For Download

The .NET Framework 3.5 Common Namespaces and Types Poster is downloadable as XPS or PDF format. There is also an XPS format file which prints over 16 letter or A4 pages for easy printing. Some assembly is required if you choose this print method.

Get it here:

Friday, November 23, 2007

Whitepaper on Malware to Attack Databases

Brian Kelly on his blog mentiones a whitepaper by Cesar Cerrudo: Data0: Next generation malware for stealing databases. This whitepaper describes how malware could be crafted to steal information out of databases.

The attack will use the following techniques:
  • Discovery
  • Exploitation
  • Escalate Privileges (if necessary)
  • Cover Tracks

Print it out and read it while you wait in line on Black Friday

Wednesday, November 21, 2007

Thanksgiving SQL Teaser: COUNT

Here is a small simple Thanksgiving teaser. What do you think will the result be of the select count query?

USE tempdb

INSERT Customer VALUES (1)
INSERT Customer VALUES (2)
INSERT Customer VALUES (3)
INSERT Customer VALUES (4)

SELECT COUNT(*) Customer

Visual Studio 2005 Support for SQL Server 2008, Community Technology Preview

This CTP resolves a problem that when you try to open a database connection to SQL Server 2008 by using Visual Studio 2005 design tools, you may receive the following error message:
“This server version is not supported. Only servers up to Microsoft SQL Server 2005 are supported.”
This CTP addresses this issue, and enables the following Visual Studio functionality for SQL Server 2008 CTP5 :

  • Server Explorer successfully connects to SQL Server 2008, and database objects such as stored procedures and table data can be viewed and edited. Note that table schemas still cannot be viewed or edited in this release.
  • SQL CLR projects that target SQL Server 2008 CTP5 can be created and deployed to the server.
  • T-SQL and SQL CLR debugging are now enabled for SQL Server 2008 CTP5.
    Data binding features in Client and Web Projects are enabled.

This CTP does not support the following features for SQL Server 2008 Nov CTP:
  • Creating and editing table schemas in Table Designer or Database Diagrams. The table designer feature in SQL Server Management Studio 2008 can be used to edit table schemas in SQL Server 2008 CTP5.

Download it here:

Tuesday, November 20, 2007

Surface Area Configuration Tool Is Discontinued, SQL-DMO Removed from Microsoft SQL Server 2008 Express

Just reading the readme file in SQL Server 2008 November CTP. I noticed that in addition to SQL Server Notification Services the following two things are also being removed.

SQL-DMO Removed from Microsoft SQL Server 2008 Express
Surface Area Configuration Tool Is Discontinued

The Surface Area Configuration Tool is discontinued for SQL Server 2008. The following table shows what you can use to configure settings, options, and component features in the November CTP.

Protocols, and connection and startup options
Use SQL Server Configuration Manager.
Database Engine features
Use Declarative Management Framework.
SSAS features
Use the property settings in SQL Server Management Studio.
SSRS features
Edit the RSReportServer.config configuration file.

Monday, November 19, 2007

Microsoft SQL Server 2008 CTP November 2007 Available For Download

Microsoft SQL Server 2008 CTP, November 2007 is available for download from the connect site.

There are several formats available.
DVD image files:
X86 DVD Image
X64 DVD Image
IA64 DVD Image

Self-extracting executables:
X86 Executable
X64 Executable
IA64 Executable
Express 2008 Executable

Get it here:

Visual Studio 2008 RTM Available On MSDN

Yes it is true, Visual Studio 2008 RTM is available on MSDN. But be warned the site is slower than ever.

Okay I downloaded it and installed it.

Saturday, November 17, 2007

Visual Studio 2008 Available For Download Early Next Week

MSDN Subscriptions WebLog Has a post stating that Visual Studio 2008 will be available early next week. From the site:

Visual Studio 2008 is anticipated out early next week, with availability for Subscribers. Check out the "Top Subscriber Downloads" area on for VS 2008 downloads.

Thursday, November 15, 2007

once again discrimination rears its ugly head

Once again discrimination rears its ugly head

Wednesday, November 14, 2007

As Xbox LIVE Turns Five, Microsoft Announces Next Wave of Social Fun

On Nov. 15, Microsoft Corp. will celebrate the fifth anniversary of Xbox LIVE. In addition, the company notes that the latest membership figures show more than 8 million members are now actively engaged in the largest social entertainment network on TV. Xbox LIVE has grown from a small community of gamers in two countries, playing a handful of games online with their friends, to a worldwide social entertainment network offering online access to gaming, music, movies and TV shows. As friends across 26 countries and nine languages have connected on Xbox LIVE, it is their feedback and active participation that has guided the service to become what Wired magazine recently called “the king of the online arena.” As a gesture of thanks to the gaming community, all 8 million members will have the opportunity to download a free Xbox LIVE Arcade game,* available for downloading between 12:01 a.m. PST on Nov. 15 and 11:59 p.m. PST on Nov. 16.** In addition to this, every active member who joined the service in 2002 will receive 500 free Microsoft Points.

Starting on Dec. 4, all Xbox LIVE members will receive a free system update with a host of new features and enhancements. Included in this update will be the launch of Xbox Originals, which, for the first time, will enable consumers to download and own full Xbox games, such as “Halo,” “Psychonauts,” “Crimson Skies: High Road to Revenge” and “Fable,” among others, directly to their Xbox 360. This new service will launch with an array of blockbuster titles spanning the most popular genres from action-adventure to classic role-playing games.

With no disc necessary, and at just 1,200 Microsoft Points per game, Xbox LIVE members can easily rediscover these hit titles, or check out a game they missed the first time around. This launch lineup is only the beginning, as Xbox 360 owners can expect to see a growing catalog of Xbox games to download and own over the coming year.

“In just five short years, Xbox LIVE has revolutionized the way friends and family have fun in the living room,” said John Schappert, corporate vice president of LIVE, software and services at Microsoft. “On its fifth birthday, Xbox LIVE truly is the place for hanging out with friends and enjoying downloadable TV shows, movies, videos, game add-ons and now downloadable Xbox games on demand.”

More information can be found online about the downloadable games available on Xbox LIVE, the evolution of Xbox LIVE or the Xbox LIVE is 5IVE member rewards at

About Xbox 360

Xbox 360 is a superior video game and entertainment system delivering the best games, unique entertainment features and a unified online gaming network that revolve around gamers.

Xbox 360 will have a portfolio of more than 300 games and will be available in nearly 40 countries by the end of 2007. More information can be found online at

About Xbox LIVE

Xbox LIVE is the first and most comprehensive unified online entertainment network seamlessly integrated throughout the entire console experience, making it easy for people to find the friends, games and entertainment they want from the moment they power on their Xbox 360 system. Xbox LIVE connects millions of members across 26 countries to enjoy hundreds of multiplayer games, downloadable games via Xbox LIVE Arcade, free and premium playable game demos, music videos, TV shows and movies in the United States as well as new game levels, characters and vehicles for all their favorite retail games. More information can be found online at

* Free Xbox LIVE Arcade download includes “Hexic 2” in Korea, and “Carcassonne” in the rest of the world where Xbox LIVE is available.

** Free download available for 48 hours starting at 12:01 a.m. PST on Nov. 15.

Podcast: Pablo Castro on Astoria

Pablo Castro from the SQL Server Product Group at Microsoft talks about his work with Astoria, an infrastructure for bringing web technologies and data sources together. Astoria uses the Entity Framework, which Pablo is also involved with.

Pablo is a Technical Lead in the Microsoft SQL Server team. He has contributed extensively to several areas of SQL Server and the .NET Framework including SQL-CLR integration, database type-system extensibility, the TDS client-server protocol and the ADO.NET API. Pablo is currently involved with the development of the ADO.NET Entity Framework and also leads the Astoria project, looking at how to bring data and web technologies together. Before joining Microsoft Pablo worked in various companies on a broad set of topics that range from distributed inference systems for credit scoring/risk analysis to collaboration and groupware applications.

Download the podcast here:

Microsoft Buiness Intelligence Screen Casts

Channel 9 will be publishing a bunch of Business Intelligence Screen Casts.
This screencast is the first in a series BI Developer screencasts recorded as part of a workshop built on SQL Server 2005 that has been delivered around the globe by Microsoft and Microsoft Partners. This training event takes the student through the Microsoft BI Platform giving a BI Developer the introduction and basic comfort needed to tackle a BI project using Microsoft technology.

This first screencast will take you through the Microsoft BI Platform briefly touching on each of the technologies.
Microsoft BI - Platform Integration

This screencast shows how to use SQL Server Integration Services (SSIS), Microsoft's ETL tool, to send conditional email alerts during a load.
Microsoft BI - Developing a Query-Driven E-mail Delivery System

Tuesday, November 13, 2007


I was writing a query and managed to mistype INTERSECT, I typed INTERCEPT and to my surprise the query ran, it returned 2 result set just as if INTERCEPT wasn't there at all
Try it yourself

INSERT INTO testnulls VALUES (1)
INSERT INTO testnulls VALUES (2)
INSERT INTO testnulls VALUES (null)


SELECT * FROM #testjoin
SELECT * FROM #testnulls

SELECT * FROM #testjoin
SELECT * FROM #testnulls

Feature, Bug?

Okay, it actually doesn't matter what you type between the two statements

SELECT * FROM #testjoin
SELECT * FROM #testnulls

That runs just as if you executed the query without sdsdsdsdsd

WAKE UP!!! That acts as an alias, now where is my caffeine.

Screen Cast: Remote Administration and Delegation in IIS7

Channel 9 has posted their latest IIS7 Screen Cast. From the site:

In this screencast, we configure our IIS7 server for remote administration and delegation. The remote administration service in IIS7 is a new and powerful feature that allows us to connect securely to our remote IIS server using a firewall-friendly SSL connection. Additionally, we can choose to use traditional Windows accounts for authentication or choose the new IIS Manager user accounts instead.We will walk through the steps you must perform as the IIS administrator as well as the experience for a remote administrator using delegated features.

Watch the screencast(WMV)

Failed Request Tracing on IIS7

In this screencast, we see how to configure our IIS7 server for Failed Request Tracing (sometimes called FREB). Failed Request Tracing is a powerful new capability in IIS7 that allows us to easily set rules on our web applications, that once triggered will log that request to disk and pull in all the relevant trace information. This feature is immensely useful for troubleshooting running applications where attaching a debugger is impractical.

Watch the screencast(WMV)

How Is Your Sensitive Data Encrypted In The Database?

Do you store encrypted data? If you do then how is it encrypted? Do you use the built in capabilities of SQL Server 2005/2008. If you answered yes to the last question then here is another question. What would happen if someone stole the hard drive or even the whole database server? Could they decrypt that data easily with the stored procedures which you have written? Do these store procedures use the DecryptByPassphrase function?

So you probably think that I am crazy and no one would ever steal a database server. Wrong! C I Host a Chicago-based co-location got robbed 4 times since 2005. One company lost 20 servers in the latest heist. You can read more details about that here:

Without going into too much detail, this is what we are doing. Our data is encrypted by a corporate crypto tool which can only be accessed from within the DMZ. Keys are created for specific machines; these keys can easily be revoked at any time. Even if you would somehow steal our web and database server you would still be out of luck because of that. The data is encrypted by the tool and stored encrypted in the DB.

Identity theft will cost you in the future.
The Identity Theft Enforcement and Restitution Act of 2007 has been introduced and was scheduled for debate on November 1st; the Senate and the House still have to vote on it. This is a bill to amend title 18, United States Code, to enable increased federal prosecution of identity theft crimes and to allow for restitution to victims of identity theft.

Follow the developments here:
S. 2168: Identity Theft Enforcement and Restitution Act of 2007

Monday, November 12, 2007

Microsoft Outlines Pricing, Packaging and Licensing for Windows Server 2008, Including the New Microsoft Hyper-V Server Product

At Microsoft TechEd IT Forum 2007, Bob Kelly, corporate vice president of Infrastructure Server Marketing at Microsoft Corp., updated an audience of more than 5,000 IT professionals on the development of Windows Server 2008 and a new virtualization offering.

As Microsoft nears the final stages of Windows Server 2008 development and the Feb. 27, 2008, worldwide launch event, Kelly announced detailed packaging, pricing and licensing information for Windows Server 2008. This includes Microsoft’s server virtualization technology, Hyper-V, previously code-named “Viridian.” Kelly also announced the stand-alone virtualization server named Microsoft Hyper-V Server. Finally, Kelly outlined a complementary program, called the Server Virtualization Validation Program that allows virtual machine vendors to validate their solutions with Windows Server operating systems.

“Windows Server 2008 redefines what a server operating system delivers to customers,” Kelly said. “With more than 1 million downloads and evaluation copies, we’ve built Windows Server 2008 based on a solid foundation of customer feedback, which is reflected in the product’s ease of management, security enhancements and overall reliability. The unprecedented range of customer choices and the virtualization enhancements will help customers tailor solutions built to fit virtually any business need.”

“As the Johannes Gutenberg-University Mainz’ IT department, it is a priority for us to keep students and staff connected. Accordingly, we are looking forward to Windows Server 2008 features, such as advances in Terminal Services and the Hyper-V technology, to help us do that while maximizing resources,” said Carsten Allendoerfer, director of the Computing Center System Group at the Johannes Gutenberg-University Mainz.

Windows Server 2008 Packaging, Pricing and Licensing

Windows Server 2008 is available in eight versions, three of which include Hyper-V:

Windows Server 2008 Standard. This version has built-in, enhanced Web and virtualization capabilities, powerful tools that give customers greater control over their servers and streamline configuration and management tasks, and enhanced security features that work to harden the operating system to help protect their data and network and provide a solid, highly-dependable foundation for businesses. With Windows Server 2008 Standard edition, customers get one virtual instance per license.

Windows Server 2008 Enterprise. Windows Server 2008 Enterprise has the same features as Windows Server 2008 Standard, but with Windows Server 2008 Enterprise edition, customers get four virtual instances per license.

Windows Server 2008 Datacenter. Windows Server 2008 Datacenter delivers an enterprise-class platform for deploying business-critical applications. It helps customers improve availability and security features, and reduce infrastructure costs, by consolidating applications with virtualization licensing rights. And with Windows Server 2008 Datacenter edition, customers receive unlimited virtual instances per license.

Two versions offered without Hyper-V are targeted at specific workloads:

Windows Web Server 2008. Designed to be used as a single-purpose Web server, Windows Web Server 2008 delivers a rock-solid foundation of Web infrastructure capabilities in the next-generation Windows Server 2008. Integrated with the newly re-architected Internet Information Services (IIS) 7.0, ASP.NET, and the Microsoft .NET Framework, Windows Web Server 2008 helps enable any organization rapidly deploy Web pages, Web sites, Web applications and Web services.

Windows Server 2008 for Itanium-based Systems. Windows Server 2008 for Itanium-based Systems is optimized for large databases, and line-of-business and custom applications, providing high availability and scalability up to 64 processors to meet the needs of the most demanding and mission-critical solutions. Support for Itanium-based systems will now be offered through the new Windows Server 2008 for Itanium-based Systems edition, targeted at customers using the Intel Itanium platform and designed for these specific workloads.

Microsoft will also offer a range of versions of Windows Server 2008 without Hyper-V:

• Windows Server 2008 Standard without Hyper-V

• Windows Server 2008 Enterprise without Hyper-V

• Windows Server 2008 Datacenter without Hyper-V

All will be available in 32-bit or 64-bit versions, with the exception of Windows Server 2008 for Itanium-based Systems, which will only be available as a 64-bit version. Other changes include the availability of Windows Web Server 2008, a 64-bit edition of Web server. The Hyper-V feature will only be available with 64-bit editions of Windows Server 2008.

Pricing for all Windows Server 2008 products will be increasing by approximately 1 percent for all distribution channels. Estimated MSRP* are listed by each version below:

• Windows Server 2008 Standard: $999 (with five Client Access Licenses, or CALs)

• Windows Server 2008 Enterprise: $3,999 (with 25 CALs)

• Windows Server 2008 Datacenter: $2,999 (per processor)

• Windows Server 2008 for Itanium-based Systems: $2,999 (per processor)

• Windows Web Server 2008: $469

• Windows Server 2008 Standard without Hyper-V: $971 (with five CALs)

• Windows Server 2008 Enterprise without Hyper-V: $3,971 (with 25 CALs)

• Windows Server 2008 Datacenter without Hyper-V: $2,971 (per processor)

Microsoft Hyper-V Server

Microsoft Hyper-V Server, a hypervisor-based server virtualization product, complements the Hyper-V technology within Windows Server 2008, allowing customers to consolidate workloads onto a single physical server. In addition, Microsoft Hyper-V Server will increase original equipment manufacturer (OEM) partners’ ability to offer customers simplified, reliable and cost-effective virtualization solutions that can easily plug in to their existing infrastructure. Partners including Dell Inc., Fujitsu Siemens Computers, Fujitsu Ltd., Hitachi Ltd., HP, IBM Corp., Lenovo, NEC Corp. and Unisys are already committed to working with Microsoft to offer solutions based on Microsoft Hyper-V Server once it is available. The estimated manufacturer’s suggested retail price (MSRP) for Microsoft Hyper-V Server is $28 (U.S.).

“Microsoft and Dell are continuing to work together to provide virtualization solutions and by offering Microsoft Hyper-V Server across a wide variety of Dell servers,” said Rick Becker, vice president of Software and Solutions at Dell. “Our joint customers can continue to leverage their expertise with Microsoft technologies to rapidly provision new services and better manage and simplify their IT environment.”

“The combination of Microsoft Hyper-V Server, industry-leading HP ProLiant and BladeSystem servers, and our comprehensive services portfolio provides customers with an adaptive infrastructure that is simple to operate, reliable and cost effective,” said Scott Farrand, vice president of Industry Standard Server Software at HP. “HP plans to support customers in the adoption of Microsoft Hyper-V Server by delivering solutions that help them realize the benefits of a virtualized environment.”

Server Virtualization Validation Program

In response to industry and customer demands for more comprehensive technical support of virtual machines, Kelly also announced the Server Virtualization Validation Program. Beginning in June 2008, vendors will be able to self-test and validate certain technical requirements of their server virtualization software running Windows Server 2008 and prior versions. The program will enable Microsoft to offer cooperative technical support to customers running Windows Server on validated, non-Windows server virtualization software.

“Microsoft has worked with industry partners to create a technical support model that will meet customers’ growing demands,” Kelly said. “As more customers deploy and virtualize Windows-based applications on Windows Server 2008 or other server virtualization software, this program will help ensure that customers receive a joint support experience for their physical and virtual infrastructure deployments.”

“Technical support of virtualized images is an industrywide challenge,” said Roger Levy, senior vice president and general manager of Open Platform Solutions for Novell. “Our relationship with Microsoft provides us with a jointly supported solution today. Novell and Microsoft continue to collaborate to optimize bidirectional virtualization between Windows and SUSE Linux Enterprise with Xen. Microsoft’s server virtualization validation program provides customers with additional peace of mind when they run Windows as a guest in a validated environment such as SUSE Linux Enterprise.”

About Microsoft TechEd Europe

In its 14th year in Europe, TechEd is Microsoft’s definitive European conference for building, deploying, securing and managing connected solutions. With a strong mix of developer, infrastructure and messaging content, Microsoft TechEd Europe is Microsoft’s premier technical training conference for a wide range of technology professionals. TechEd Europe, held this year in the Centre Convencions Internacional (CCIB) in Barcelona, Spain, encompasses both TechEd Developers (Nov. 5–9) and TechEd IT Forum (Nov.12–16).

Android The Open Handset Alliance Project SDK Released

AndroidThe Open Handset Alliance, a group of more than 30 technology and mobile companies, is developing Android: the first complete, open, and free mobile platform. To help developers get started developing new applications, they are offering an early look at the Android Software Development Kit.

What is Android?
Android is a software stack for mobile devices that includes an operating system, middleware and key applications. This early look at the Android SDK provides the tools and APIs necessary to begin developing applications on the Android platform using the Java programming language.

Friday, November 9, 2007

SQL Teaser: Printing Without Using PRINT

Print the @SQL variable without using PRINT

DECLARE @SQL varchar(49)
--Your Code Here

Thursday, November 8, 2007

POLICE WARNING: date rape drug

First this Toy contaminated with 'date rape' drug pulled. And now this?


Police are warning all men who frequent clubs, parties and local pubs to be alert and stay cautious when offered a drink from any woman. Many females use a date rape drug on the market called ..."Beer". The drug is found in liquid form and available anywhere. It comes in bottles, cans, from taps and in large "kegs".

"Beer" is used by female sexual predators at parties and bars to persuade their male victims to go home and have sex with them. A woman needs only to get a guy to consume a few units of "Beer" and then simply ask him home for no strings attached sex. Men are rendered helpless against this approach.

After several "Beers", men will often succumb to the desires to perform sexual acts on horrific looking women whom they would never normally be attracted.

After drinking "Beer", men often awaken with only hazy memories of exactly what happened to them the night before, often with just a vague feeling that "something bad" occurred.

At other times these unfortunate men are swindled out of their life's savings, in a familiar scam known as a "relationship". In extreme cases, the female may even be shrewd enough to entrap the unsuspecting male into a longer term form of servitude and punishment referred to as "marriage". Men are much more susceptible to this scam after "Beer" is administered and sex is offered by the predatory females. Please! Forward this warning to every male you know.

If you fall victim to this "beer" and the women administering it..... There are male support groups where you can discuss the details of your shocking encounter with similarly affected like-minded guys. For the support group nearest you, just look up "Golf Courses" in the phone book

Introduction to SQL Server Driver for PHP (SQLPHP)

Channel 9 has popsted their latest video, from the site:

SQL Team Says:"The SQL Server Driver for PHP (October 2007) Community Technology Preview (CTP) is designed to enable reliable, scalable integration with SQL Server for PHP applications deployed on the Windows platform. The Driver for PHP is a PHP 5 extension that allows the reading and writing of SQL Server data from within PHP scripts. It provides a procedural interface for accessing data in all Editions of SQL Server 2005 and SQL Server 2000 (including Express Edition), and makes use of PHP features, including PHP streams to read and write large objects.

"Wow. This is cool. Need to find out more about this. What exactly is this thing? Why did we create it? What are the platform requirments? Is it open source? Who are the folks behind this? You know the C9 drill. Tune in and meet SQLPHP Program Manager John Bocharov and Microsoft Open Source champion Hank Janssen who answer a bunch of questions and provide good context about the thinking behind SQLPHP, history and future.
Listen to the podcast(MP3)
Listen to the podcast(WMA)
Download the Video
Watch the Video

Channel 9 URL:

E-Learning: What's New in SQL Server 2008

Microsoft leaning has made available a bunch of free SQL Server 2008 lessons

In this 3 hour online collection, IT Professionals will learn about the new features in SQL Server 2008. Topics covered within these clinics include:
What's New in SQL Server 2008 for Enterprise Data Platform
What's New in SQL Server 2008 for Business Intelligence
What's New in SQL Server 2008 for Database Development Student

Below are the links to the three lessons:

Clinic 6188: What's New in Microsoft SQL Server 2008 for Enterprise Data Platform
Clinic 6189: What's New in Microsoft SQL Server 2008 for Business Intelligence
Clinic 6190: What's New in Microsoft SQL Server 2008 for Database Development

Tuesday, November 6, 2007

Three Ways To Return Null If A Value Is A Certain Value

You need to return NULL only if the value of your data is a certain value. How do you do this?
There are three different ways.

DECLARE @1 char(1)
SELECT @1 ='D'


This should not really be used, I just added it here to demonstrate that you can in fact use it.

DECLARE @1 char(1)
SELECT @1 ='D'


With case you can test for a range of values. You can test for example for values between A and D. If you reverse the logic then you also don't need to provide the ELSE part since it defaults to NULL anyway.

DECLARE @1 char(1)
SELECT @1 ='D'


--No else needed

And this is how you test for a range.

DECLARE @1 char(1)
SELECT @1 ='D'


DECLARE @1 char(1)
SELECT @1 ='E'


Monday, November 5, 2007

Microsoft Commits to November Release Date for Visual Studio 2008 and the .NET Framework 3.5

Today, during the keynote address at Microsoft TechEd Developers 2007, S. “Soma” Somasegar, corporate vice president of the Developer Division at Microsoft Corp., announced that Microsoft will release Visual Studio 2008 and the .NET Framework 3.5 by the end of November 2007. Visual Studio 2008 and the .NET Framework 3.5 enable developers at all levels to rapidly create connected applications that offer compelling user experiences for Windows Vista, Windows Server 2008, the 2007 Microsoft Office system, mobile devices and the Web. Soma also unveiled plans to open new opportunities for Visual Studio partners, as well as to deliver new tools and resources for developers, including a first Community Technology Preview (CTP) of the Microsoft Sync Framework and new capabilities for Popfly Explorer.

“The highly social and visual nature of the Web has fundamentally changed what users expect from all applications they interact with, regardless of whether it’s on a customer-facing Web site or Windows rich client application, or a desktop business application built using Microsoft Office,” said Somasegar. “Traditionally, organizations have been hard pressed to deliver the richer, more connected applications and services they need to boost productivity, drive revenue and stay ahead of the competition. With Visual Studio 2008 and the .NET Framework 3.5, it is easy for developers to use the skills they already have to build compelling applications that take advantage of the latest platforms.”

FWBS Ltd., Xerox Corp., Dell Inc. and K2 are just a few of the early adopter customers that are already experiencing the benefits of these releases. FWBS used Visual Studio, the .NET Framework and the Microsoft Office system to build an Office Business Application (OBA) for the law field. The application enables users to work within Microsoft Office — the tools they use every day — while also dramatically improving productivity and helping users respond quickly to changing business needs.

Xerox has also had early success developing applications with the new tools. “We’ve already seen significant advantages from using Visual Studio Team System 2008 and .NET Framework 3.5. With the first application we built, we easily saved 50 percent of the time and money it would have taken to create the same application with other tools,” said Eugene Shustef, feature design lead, Global Technology, Xerox. “That’s more than a savings to IT — it delivers a huge time-to-market advantage because it put the tool into the hands of our analysts six months sooner than they would have had it otherwise.”

Creating New Opportunities for Partners

Microsoft also announced plans to make additional investments in the Visual Studio partner ecosystem. In response to partner feedback and in order to provide better support for interoperability with other developer tools and cross-platform scenarios, Microsoft is today announcing plans to change licensing terms, no longer limiting partners to building solutions on top of Visual Studio for Windows and other Microsoft platforms only. This licensing change will be effective for the release of Visual Studio 2008 and the Visual Studio 2008 SDK.

“Integrating dynaTrace’s cross-platform application performance management and diagnostics product with Visual Studio has opened up additional commercial opportunities for our business and delivered a compelling solution for our customers. .NET and Visual Studio is a strategic platform for our business, and Microsoft’s additional investments in the partner ecosystem make it even more compelling,” said Klaus Fellner, senior director of product marketing at dynaTrace. “We’re looking forward to taking advantage of the new technology available with the launch of Visual Studio 2008 and the partner benefits available through the Visual Studio Industry Partner (VSIP) program.”

In addition, Microsoft announced plans to create a shared source licensing program for Premier-level partners in the VSIP program. The program will provide these partners with the ability to view Visual Studio IDE source code for debugging purposes, and simplify the process of integrating their products with Visual Studio 2008.

Tools for Today and Tomorrow

Microsoft also announced a number of additional resources for developers of all skill sets, enabling them to make the most out of their Microsoft tools investments to build great applications on the latest platforms:

• The first CTP of the Microsoft Sync Framework demonstrates Microsoft’s ongoing investments in synchronization and builds on the synchronization functionality available in Visual Studio 2008. With Visual Studio 2008, developers can rapidly take advantage of offline synchronization capabilities to sync-enable applications and services easily with rich designer support. The Microsoft Sync Framework extends the support featured in Visual Studio 2008 to also include offline and peer-to-peer collaboration using any protocol for any data type, and any data store. This is part of Microsoft’s long-term commitment to providing synchronization for partners and independent software vendors that can embed the Sync Framework into their applications easily to create rich sync-enabled ecosystems that allow any type of data to follow their customers wherever they go.

• A new release of Popfly Explorer will add new Web tools that provide Web developers and Popfly users an easy way to add Silverlight gadgets built in Popfly to their Web pages, as well as publish HTML Web pages directly to Popfly.

These latest releases are part of the broader Microsoft Application Platform, a portfolio of technology capabilities and core products that help organizations develop, deploy and manage applications and IT infrastructure. They also mark another major milestone leading up to the global launch of Windows Server 2008, Visual Studio 2008 and SQL Server 2008 on Feb. 27, 2008, in Los Angeles.

Product Information and Availability

Visual Studio 2008 and the .NET Framework 3.5 will be available by the end of November 2007. The .NET Framework 3.5 will also be available to end users via a free, optional download from Microsoft Update. A CTP of Microsoft Sync Framework is available today at Popfly Explorer is a hosted development environment available today at More information about all of these releases is available at