Exception Handling WCF Proxy Generator

Rating:        Based on 3 ratings
Reviewed:  3 reviews
Downloads: 11034
Released: Jul 11, 2009
Updated: Jun 16, 2010 by michelebustamante
Dev status: Beta Help Icon

Recommended Download

Source Code ExceptionHandlingWCFProxyGeneratorAddInMSI.07.11.09.zip
source code, 177K, uploaded Jul 11, 2009 - 4165 downloads

Other Available Downloads

Application readme.07.11.09.txt
application, 4K, uploaded Jul 11, 2009 - 3739 downloads
Source Code SetDefaultWCFProxyGeneratorAsDefault.reg
source code, 1K, uploaded Jun 11, 2009 - 1077 downloads
Source Code ExceptionHandlingWCFProxySamples.07.11.09.zip
source code, 5607K, uploaded Jul 11, 2009 - 2053 downloads

Release Notes

This release includes a setup program (MSI) that installs a custom tool for Visual Studio 2008 that customizes the Add Service Reference experience by generating an exception handling proxy that recreates the channel after it is faulted, or after a session timeout, and provides a safe Dispose() that shields the user from unnecessary exceptions if the channel is faulted.

Updated 07/11/2009
See readme.txt for update details.


After you install the IDesign Exception Handling WCF Proxy Generator the registry entries will been created so that this component can be used as a custom tool for proxy generation. However, it will not be hooked into the Add Service Reference process unless you opt-in and install one more registy setting.

To set this generator as your default, run SetExceptionHandlingWCFProxyGeneratorAsDefault.reg. Go to the program group under:

All Programs\IDesign\Exception Handling WCF Proxy Generator

and select it from there.

DO NOT FORGET to run SetDefaultWCFProxyGeneratorAsDefault.reg to restore registry settings before you uninstall this component. This is also available from the program group, but, if you forget for some reason after you uninstall you can still get at the .reg file from this site.

NOTE: At some point we will hook this into the installation process - but since Visual Studo Setup programs don't provide an easy way to "modify" a registry entry (as opposed to add or remove) this was the fastest and safest way to make this add-in available to the community. We'll automate this as soon as possible. Busy busy busy.

What you'll see

Add Service Reference will still generate the same files, service contracts, data contracts, and ClientBase<T> proxy as before. In addition, a new ExceptionHandlingProxy<T> type will be created in the same file that contains ClientBase<T> (your reference.cs file) PLUS a new file is added to the project called ExceptionHandlingProxyBase.cs with the core functionality of the proxy. See the sample download for an example of the finished result.

  1. What gets added to my project? A new file is added to the root project directory, ExceptionHandlingProxyBase.cs. A dialog will prompt you if you already have a file by that name. You'll have the option to continue and overwrite it, continue but NOT generate that file, or cancel and generate a regular old proxy. Pay attention!
  1. Does the proxy generator work with Add Service Reference immediately after install? After installation, if you run SetExceptionHandlingWCFProxyGeneratorAsDefault.reg to install the Exception Handling WCF Proxy Generator as your default, it will work for every NEW instance of Visual Studio that you run. Instances that are already running may already have loaded the default WCF Proxy Generator so they will not look at the updated registry settings.
  1. Does this proxy generator impact existing proxy generation process? No, this proxy generator in fact lets your default proxy based on ClientBase<T> continue to be generated, and ADDS another exception handling proxy based on ExceptionHandlingProxyBase<T>.
  1. What about VB? The current version of this generator is based on CSharp only. VB is on the list...patience please, lots of deadlines.
  1. Can I use this in my production deployments? Sure, but treat it like your own source code. This is a free tool that generates code that you should verify works as you expect it to for your specific scenario. It isn't rocket science, it is a proxy, but there could be bugs that haven't surfaced related to specific service contract definitions. If you see something weird, let us know! Maybe we can help you

Reviews for this release

Excellent tool, it will save you a lot of time and headaches. Great job!
by rojasd on Mar 4, 2010 at 7:50 PM
I am depending already on this excellent work for getting proxies observed for many scenarios.
by christoph_ch68 on Sep 1, 2009 at 10:40 PM
Just when I was about to write my own baseclass for doing the basics of what this does, it comes to the rescue!
by freakshow on Jul 22, 2009 at 1:47 PM