.NET     Console.WriteLine( "All Things .NET" );
.NET Nerd Blog Home
7.31.2006

 
Attaching Extensions Using Behaviors - WCF June CTP
Behaviors in WCF have changed a bit since the Jan CTP that we were using. It's been a bit difficult to find any good info about what the changes are, and how to implement them in the June CTP.

We are hosting in IIS, so web.config describes the behaviors.

Here's an article about what the behaviors are, which pieces of the WCF pipeline they affect, and how to configure them.

Attaching Extensions Using Behaviors



(update 7/31/06)
Thanks a lot to Marc Mercuri for your comment. He links to a post on his blog that contains sample code from his new WCF book. FINALLY, a definitive example of how to wire up custom behaviors on the client and service side, via .config files. (until now, all I keep finding around the web are samples that programatically hookup the behaviors).

See comments for this post, or hit Marc's link

(update 8/11/06)
Now I'm hooking up IErrorHandler functionality. In Jan CTP, your service implementation only had to derive from IErrorHandler and the WCF runtime would find the object and call the ProvideFault method. Now in June CTP, you have to register the error handler using channelDispatcher.ErrorHandlers.Add( someErrorHandlerObject ) in the ApplyDispatchBehavior method.

More general info here, and specific discussion of IErrorHandler methods here.




(more to come...)


Comments:
If you're looking at how to add behaviors, I've just added updated code from our book WCF: Hands On!

Find a good example here:
http://www.marcmercuri.com/default.aspx#afa0ed46b-5dd6-4533-9c59-8b8b8279dc33
 
Post a Comment

Powered by Blogger