>
 Saturday, March 08, 2008

I just wrapped up a week at SD West in Santa Clara where I delivered 2 full day tutorials and 4 sessions. This post will lead you to all the sample code for those sessions, enjoy!

Tutorial: .NET Technology Roadmap

Tutorial: Building an Enterprise SOA with WCF

Entity Framework, AJAX and REST - A look at Project Astoria

Exploring Windows CardSpace

Federation with WCF

Scalability and Throughput Considerations for WCF

Technorati Tags: , , , , ,
3/8/2008 8:10 AM .NET 3.0 | .NET 3.5 | Speaking/Events  | Comments [4]  |  View reactions  |  Trackback
 Thursday, February 28, 2008

I'm in the middle of preparing for a session at SD West next week where I talk about the Microsoft Technology Roadmap - basically an avalanche of technologies in one day. Each time I present this I have to update my resources with newer tools, usually extensions to Visual Studio environment, so that attendees can be successful at running demos.

Here is my latest list of "setup instructions" for the CTPs I use, with links to where the sites are located. I can't guarantee how long these will be the latest, but you should be OK for at least the next month!

Windows XP/SP2 or Windows Server 2003 Setup

This section describes core machine setup for the operating system, .NET 3.0 and SQL Server.

· Enable IIS

· Enable MSMQ

· Install .NET 3.0

http://www.microsoft.com/downloads/details.aspx?FamilyId=10CC340B-F857-4A14-83F5-25634C3BF043&displaylang=en

· Windows SDK Update for Vista (really, for .NET 3.0)

http://www.microsoft.com/downloads/details.aspx?familyid=4377f86d-c913-4b5c-b87e-ef72e5b4e065&displaylang=en

· SQL Server 2000/2005 or SQL Express

o Install any service packs

Windows Vista/SP1 or Windows Server 2008

This section describes core machine setup for the operating system, .NET 3.0 and SQL Server.

· Enable IIS/WAS

· Enable MSMQ

· NOTE: .NET 3.0 is already installed

· Windows SDK for Vista (really, for .NET 3.0)

http://www.microsoft.com/downloads/details.aspx?familyid=4377f86d-c913-4b5c-b87e-ef72e5b4e065&displaylang=en

· SQL Server 2000/2005 or SQL Express

o Install any service packs

Visual Studio 2005 (if you have to)

This section lists tools to install to set up your Visual Studio 2005 environment. For .NET 3.0 and 3.5 development, Visual Studio 2005 is sorely out of date on tools, so anything you install from this list below is likely not to work with newer code samples. You have been warned.

· Visual Studio 2005 Extensions for WCF and WPF – November 2006

http://www.microsoft.com/downloads/details.aspx?FamilyId=F54F5537-CC86-4BF5-AE44-F5A1E805680D&displaylang=en

· Visual Studio 2005 Extensions for WF – November 2006

http://www.microsoft.com/downloads/details.aspx?familyid=5D61409E-1FA3-48CF-8023-E8F38E709BA6&displaylang=en

· Visual Studio 2005 LINQ CTP - May 2006

http://www.microsoft.com/downloads/details.aspx?familyid=1e902c21-340c-4d13-9f04-70eb5e3dceea&displaylang=en

· Visual Studio 2005 ADO.NET vNext CTP – May 2006

http://www.microsoft.com/downloads/details.aspx?FamilyId=B68F6F53-EC87-4122-B1C8-EE24A043BF72&displaylang=en

· Visual Studio 2005 Entity Data Model Designer Prototype CTP – May 2006

http://www.microsoft.com/downloads/details.aspx?FamilyID=74bda7b2-9ca9-4eea-a33f-31942ddc9dbe&displaylang=en

Visual Studio 2008 RTM

This section lists tools to install to set up your Visual Studio 2008 environment. Many tools have been installed, but there are also many extensions for ASP.NET, AJAX, Silverlight and ADO.NET 3.5 features in this list.

· NOTE: Tools for WCF, WPF, WF, AJAX and LINQ are built-in

· Run this so that older projects will bind to older version of AJAX libraries

http://download.microsoft.com/download/7/9/2/79268325-1006-4566-bd26-5581b8971f36/DisableAjaxPolicy.EXE

· AJAX Control Toolkit for .NET 3.5 (includes the rich code sample for AJAX)

http://www.codeplex.com/AtlasControlToolkit/Release/ProjectReleases.aspx?ReleaseId=4941

· ASP.NET 3.5 Extensions Preview – December 2007 CTP

http://www.microsoft.com/downloads/details.aspx?familyid=A9C6BC06-B894-4B11-8300-35BD2F8FC908&displaylang=en

· ADO.NET Entity Framework Beta 3

http://www.microsoft.com/downloads/details.aspx?familyid=15DB9989-1621-444D-9B18-D1A04A21B519&displaylang=en

· Entity Framework Tools Beta 3

http://www.microsoft.com/downloads/details.aspx?FamilyId=D8AE4404-8E05-41FC-94C8-C73D9E238F82&displaylang=en

· Silverlight 1.1 Alpha Refresh – September 2007

http://msdn2.microsoft.com/en-us/silverlight/bb419317.aspx

· Silverlight 1.1 Tools Alpha for VS 2008 – November 2007

http://www.microsoft.com/downloads/details.aspx?familyid=25144c27-6514-4ad4-8bcb-e2e051416e03&displaylang=en

· Expression Blend 2 Preview – December 2007

· http://www.microsoft.com/downloads/details.aspx?familyid=65177E23-C116-475A-9057-5A5071A379F6&displaylang=en

· ASP.NET 3.5 Extensions Preview – ADO.NET Data Services Silverlight Add-On - December 2007

http://www.microsoft.com/downloads/details.aspx?FamilyID=fd9c2a29-7383-4b2e-9ec9-0c6120718d4f&displaylang=en

 

Technorati Tags: , ,
2/28/2008 5:19 PM .NET 3.0 | .NET 3.5 | Visual Studio | VS 2008  | Comments [1]  |  View reactions  |  Trackback
 Monday, November 12, 2007

I just returned from another fantastic Dev Connections conference in Las Vegas. For the four sessions I delivered, this post lists the code samples and resources I referenced. If you are looking for something specific and can't find it here, shoot me an email. Tutorial resources will be posted separately. Enjoy!

Introduction to C# 3.0

Exploring Windows CardSpace

ASP.NET and WCF: Meet Your New Web Service

Architectural Considerations for ASP.NET Applications

  • GalleryDemo20 - This sample illustrates different globalization techniques including the use of generated resources for page content, the use of resources to select localized images and dynamically loaded user controls, the use of localized database tables, and caching based on theme, culture and query string params
  • CustomResourceProviders - This sample illustrates the use of custom localization expressions and custom resource providers. The code is based on this article: http://msdn2.microsoft.com/en-us/library/aa905797.aspx and updated for VS 2008.
  • Extending the Visual Studio IDE for localization - I wrote a follow on article on this for MSDN, it has not yet been published, hopefully soon (backlog) but I will post the code here in an update to this post, after a quick review later this week.
  • Distributed Boundaries - This sample was based on the ConnectionOrientedBindings lab from Chapter 3 of my book Learning WCF. All the code for my book is here: http://www.thatindigogirl.com/LearningWCFCode.aspx. This particular sample shows how to use a WCF service behind your ASP.NET applications to introduce a security boundary between NETWORK SERVICE and access to data and other resources. I talked about this in two articles for the server side, long ago:
  • TransactionsOverHttp - This shows how to flow transactions over WCF web services, but I have many more examples of WCF transactions here: http://www.thatindigogirl.com/LearningWCFCode.aspx
  • MessagingIntermediaryVia - Illustrates a pass-through router over HTTP where even reliable messaging headers can pass through both directions.
  • MessagingIntermediaryDuplex - Illustrates a duplex router that supports reliable messaging headers two-way out of band over named pipes.

 

11/12/2007 7:51 PM .NET 3.0 | .NET 3.5 | DevConnections | Speaking/Events  | Comments [8]  |  View reactions  |  Trackback
 Thursday, August 16, 2007

Today I completed a webcast as part of a 15 part series - today's subject concurrency, throughput and throttling. I received some questions about callback and Windows client applications that I thought I would elaborate on here. In fact, I went a little overboard and created a bunch of samples that would illustrate the behavior of services and clients when you have a Windows client, a service with a callback contract (thus, two-way communication) and various WCF settings at the client and service that relate to concurrency, multithreading, synchronization with the UI thread, and so on.

The following table summarizes various settings at the client, service and callback and the resulting behavior at runtime. Here's the breakdown for each column:

  • Callback Sync Context - refers to the UseSynchronizationContext setting for the CallbackBehaviorAttribute on the client callback object.
  • Callback Concurrency Mode - refers to the ConcurrencyMode setting for the CallbackBehaviorAttribute on the client callback object.
  • Service Operation - Indicates if the service contract operations are one-way or two-way.
  • Callback Operation - Indicates if the callback contract operations are one-way or two-way.
  • Service Concurrency Mode - refers to the ConcurrencyMode setting for the ServiceBehaviorAttribute on the service type.
  • Resulting Behavior - when the corresponding sample is run, what happens?

I have also uploaded sample code for each of these scenarios, numbered in order of table row description below. Get the code here.

Callback Sync

Context

Callback Concurrency Mode

Service Operation

Callback Operation

Service Concurrency Mode

Resulting Behavior

True/

False

Single/

Reentrant/

Multiple

One-way/

Two-way

Two-way

Single

These are defaults. InvalidOperationException at the service. Operation would deadlock calling the client application since the callback is two-way and reentrancy isn’t possible.

True

Single/

Reentrant/

Multiple

Two-way

Two-way

Reentrant/

Multiple

Service able to call client, but client is blocked because of outgoing call.

False

Single/

Reentrant/

Multiple

Two-way

Two-way

Reentrant/

Multiple

Service able to call client, client callback object is not blocked. If client callback object tries to communicate with UI thread (i.e., setting properties of controls) it will block.

False

Single

One-way

Two-way

Reentrant/

Multiple

Service able to call client, client callback object is not blocked. Client callback object can communicate with UI thread using Invoke() from callback thread. Client can issue multiple calls to service but only one callback can be processed at a time.

False

Multiple

One-way

Two-way

Reentrant/

Multiple

Service able to call client, client callback object is not blocked. Client callback object can communicate with UI thread using Invoke() from callback thread. Client can issue multiple calls and multiple callbacks can be processed at a time.

False

Multiple

One-way

One-way

Single/

Reentrant/

Multiple

Service able to call client, client callback object is not blocked. Client callback object can communicate with UI thread using Invoke() from callback thread. Client can issue multiple calls and multiple callbacks can be processed at a time.

False

Multiple

Two-way/

Multi-threaded Client

 

Two-way

Reentrant/

Multiple

Service able to call client, client callback object is not blocked. Client callback object can communicate with UI thread using Invoke() from callback thread. Multiple calls from client can be processed at the service, and multiple callbacks can be processed at the client.

False

Multiple

Two-way/

Multi-threaded Client

Two-way

Reentrant/

Multiple

Service able to call client, client callback object is not blocked. Client callback can communicate with UI thread using Invoke() from callback thread. Multiple calls from client can be processed at the service, and multiple callbacks can be processed at the client.

Here is a summary of considerations.

  • Contract design:
    • Make callback operations one-way. If this isn’t possible, make the service reentrant. Prefer one-way callbacks since most likely the service doesn’t care about responses.
    • If service operations will notify clients with a callback, make them one-way as well.
  • Exception handling:
    • Remember that uncaught exceptions invalidate service, client and callback channels where sessions are involved. Two-way communication can only happen over duplex, thus there is a transport session (TCP, named pipes) or HTTP session (using reliable sessions over WSDualHttpBinding). 
    • Throw faults for known exceptions unless you want the client to be forced to recreate the proxy and start a new session. That includes clients – who should not allow exceptions to flow back to the service during a callback unless they intend to destroy the session.
    • To avoid destroying the session: if callback operations are one-way, swallow the exception after handling it at the client; if callback operations are two-way, report a fault to the service in response.
  • Windows client issues:
    • Always disable synchronization with the UI thread for callback objects, by setting UseSynchronizationContext to false in the CallbackBehaviorAttribute. 
    • Multithreaded clients should invoke services on another thread (can use asynchronous proxies) when callbacks or long running service operations are involved. This prevents UI thread from blocking during call, allows callbacks to communicate freely with UI.
    • Use Invoke() to communicate with UI from the callback thread. 
    • Don’t forget to protect other client state if the callback object supports multiple concurrent callbacks. That means the ConcurrencyMode setting is Multiple in the CallbackBehaviorAttribute.
Technorati Tags: , ,
8/16/2007 1:20 AM .NET 3.0 | WCF  | Comments [5]  |  View reactions  |  Trackback
 Tuesday, August 14, 2007

In preparation for our upcoming .NET 3.5 Roadshow  (http://www.dotnetroadshow.com/) I am posting setup instructions for those who need some tips on setting up an environment to work with the latest technologies. If you can start using Visual Studio 2008 (Beta 2 available now), I highly recommend it - it gives you the latest .NET 3.0 tools for your WCF, WPF and WF projects. But, for those still using Visual Studio 2005, I have provided those links here as well.

Technorati Tags: , ,

8/14/2007 2:59 PM .NET 3.0 | .NET 3.5 | VS 2008  | Comments [14]  |  View reactions  |  Trackback
    ON THIS PAGE
    SEARCH
    CATEGORIES
    ARCHIVES
    BLOGROLL

Designed by NUKEATION STUDIOS