>
 Thursday, April 24, 2008

A few weeks ago I was presenting a code sample that I created last year and discovered a mysterious problem.

First, let me explain the sample. It is a proxy wrapper for WCF clients that illustrates how to swallow timeout exceptions and recreate channels automatically when there is an exception that faults the channel. The idea is this:

  • When a channel with a transport session times out, does the user need to see an error? Not really. But, the exception won't show up until you try to call the service, so my wrapper catches communication exceptions and if they are not faults it creates a new channel and retries the same call to the service once more. The theory is, if it fails again, we probably have a bigger problem. Otherwise, we will have successfully allowed the client to continue working without seeing an error.
  • When an uncaught exception from the service faults the channel, the client channel will also be faulted if the call is not one-way. The user should see the error message, even if it is an uncaught exception, but the next time they use the proxy they should get a new channel so they can continue to work. So, the proxy wrapper creates the channel again if the channel is faulted, before making the next call.

I explained this in my ASP.NET Pro article on the subject. The latest code for this is here: http://www.dasblonde.net/downloads/Proxies.zip

Well, the problem that In encountered is that all of a sudden my logic for checking if the channel was faulted after a timeout, was failing!!!! It was strange - from one stack frame to another, the channel went from Faulted to Created. But none of my code affected that change! So, of course I thought that something had changed in .NET 3.5 related to channel factory caching that might have had a side-effect of my code...and I didn't have time to investigate further until today while I was talking with my colleague Brian Noyes about the subject.

Long story short, he ran the code, reproduced the problem, and remembered that there were some strange behaviors with SUO files for a solution that could cause this. He deleted the SUO and then the sample worked like it originally did!!!!! I did the same, and found the same result.

This is really messed up! Apparently this is a common problem, but I have never heard about it before. The real annoyance is the time I spent troubleshooting this before I talked to Brian, and the doubts it put in my mind about new features of WCF and possible regressions....and yet I was wrong...it was the stupid SUO file. What the? Holy? This is an unacceptable bug. Who knows what kind of misleading issues this could cause developers in their day-to-day work.

Technorati Tags: ,
4/24/2008 11:36 PM VS 2008 | WCF  | 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
 Saturday, September 15, 2007

You may have noticed after installing Visual Studio 2008 that if all of your projects in a solution don't compile, you can't debug the one that DOES compile. This causes problems for me when I work with WCF because I may want to update the service code, and later update the client proxy....in the meantime, changes I made such as deleting the existing proxy do not compile anymore...so I can't run the solution.

There are two settings that affect this:

a) All projects are compiled each time you try to run

b) If errors are encountered the environment is set not to run at all

You can address this in one of two ways. You can only compile those projects that you need to, by checking the "Only build startup projects and dependencies on Run" setting as shown here:

VS2008BuiltStartupProjects

Or, you can set the environment so that it runs the old version of any projects that don't compile as shown here:

VS2008BuiltStartupProjects2

 

The latter causes more problems in my opinion, because you may not realize you are running an older version of one or more projects. The former is what I choose to set my environment to, since it allows me to compile only dependencies of the project I'm trying to test at the moment. Thus, I can recreate my service references from scratch, without having to comment out client code that doesn't compile in the interim.

There...annoyance gone.

Technorati Tags: ,
9/15/2007 8:40 PM VS 2008  | Comments [2]  |  View reactions  |  Trackback
 Wednesday, August 22, 2007

I have recently made a series of posts describing changes to VS 2008 templates for WCF as compared to VS 2005 + Orcas extensions. See

Technorati Tags: ,

the post here: http://www.thatindigogirl.com/VS2008Beta2ProjectTemplatesForWCF.aspx

8/22/2007 7:54 PM VS 2008 | WCF  | Comments [3]  |  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