'Enterprise Library Configuration' tool - no 'Logging Exception Handler'

Topics: Exception Handling Application Block
Mar 21, 2012 at 5:50 PM

I'm working through the 'Exception Handling instructions CS.pdf' from the 'Hands-On Labs for the Microsoft Enterprise Library 5.0'.

It has this:

4.  Now you will add an exception handler to the policy.  Right-click the title bar of the All Exceptions items, point to Add Handlers, and click Add Logging Exception Handler in the context menu.

and it shows a screenshot with these in the 'Add Handlers' context menu:

  Add Custom Exception Handler

  Add Fault Contract Exception Handler

  Add Logging Exception Handler

  Add Replace Handler

  Add Wrap Handler

But all I see with my Visual Studio 2010 & Enterprise Library Configuration is:

  Add Custom Exception Handler

  Add Replace Handler

  Add SqlExceptionWrapHandlerData

  Add Wrap Handler

Why?  How can I add the aforementioned into the 'Add Handlers' context menu .... ?

Mar 22, 2012 at 6:29 AM

How did you start the configuration tool?  Did you run the Visual Studio integration version or the stand-alone version? 

When I walk through the hands on labs everything proceeds as documented in the guide.

SqlExceptionWrapHandlerData is part of EntlibContrib so I'm wondering if that has caused some issue with launching the config tool from within Visual Studio (assuming you were doing that).  

Actually after reading your other post I'm wondering if copying the EntlibContrib assemblies has caused some version mismatch between the configuration tool and assemblies located in the bin folder.

--
Randy Levy
Enterprise Library support engineer
entlib.support@live.com 

Mar 22, 2012 at 4:11 PM
Edited Mar 22, 2012 at 4:52 PM

In Visual Studio 2010 SP1 (on 64-bit Windows 7) I right-click the PuzzlerUI's App.Config and then choose in the context menu 'Edit Enterprise Library V5 Configuration'.

I found this Using the Configuration Tool - Specifying Different Assemblies and on my machine I have HKCU\software\microsoft\practices\EnterpriseLibraryV5\ConfigurationEditor\EntLibV5Src set:
ConfigurationUIAssemblyPath C:\Program Files (x86)\Microsoft Enterprise Library 5.0\Bin\Microsoft.Practices.EnterpriseLibrary.Configuration.DesignTime.dll
and ConfigurationUIPluginDirectory to C:\Program Files (x86)\Microsoft Enterprise Library 5.0\Bin\

I have no Microsoft.Practices.* DLLs in my GAC (C:\windows\assembly).

So if I were to uninstall Enterprise Library and restart the installation process again, would these be the steps:

Uninstall 'Microsoft Enterprise Library 5.0' via Control Panel
delete Documents\Microsoft Enterprise Library 5.0 - Hands On Labs dir

get and install 'Enterprise Library 5.0.msi' from Microsoft Enterprise Library 5.0
get and install 'Enterprise Library 5.0 - Hands On Labs.msi' from Hands-On Labs for Microsoft Enterprise Library 5.0
get and install 'Enterprise Library 5.0 Optional Update 1.msi' from Microsoft Enterprise Library 5.0 Optional Update 1 and install it with msiexec /i "Enterprise Library 5.0.msi" REINSTALLMODE=vomus REINSTALL=ALL (what is the 'Microsoft.Practices.EnterpriseLibrary.ConfigConsole.vsix' on this page, by the way?)
get and install EntLibContrib 5.0 from entlibcontrib.codeplex.com, unzip it, and copy its bin\ contents into Microsoft Enterprise Library 5.0 - Hands On Labs\Lib and Program Files (x86)\Microsoft Enterprise Library 5.0\Bin

?

Mar 23, 2012 at 6:12 AM

> So if I were to uninstall Enterprise Library and restart the installation process again, would these be the steps:
>
>Uninstall 'Microsoft Enterprise Library 5.0' via Control Panel 
>delete Documents\Microsoft Enterprise Library 5.0 - Hands On Labs dir

Yes.

If you want to run 5.0.505.0, Option Update 1, (and you should!) then you can just install 'Enterprise Library 5.0 Optional Update 1.msi' from Microsoft Enterprise Library 5.0 Optional Update 1 directly without first going to 5.0.414.0

Microsoft.Practices.EnterpriseLibrary.ConfigConsole.vsix can be found here.  It's a "Visual Studio extension that allows you to launch Microsoft Enterprise Library Configuration Console using targeted platform profiles (.NET or Silverlight). It provides an interactive configuration experience for Enterprise Library application blocks installed via NuGet or distributed via your own local library repositories."

Basically, this gives you Visual Studio integration if you have not installed the blocks locally but have instead downloaded them using NuGet.  It will add a "Edit configuration file" menu option.  It also supports targeted platform profiles which is a fancy way of saying that the extension knows what type of project you are editing as well as what blocks you have installed (via NuGet) and will then only present you with appropriate configuration options.  For example, if you only installed the exception handling application block via NuGet then the only menu option in the tool will be to "Add Exception Handling Settings".

The EntlibContrib documentation does say to copy into the Entlib bin folder.  Perhaps before doing that run through the Hands on Lab you were having trouble with.  Since it sounds like you're already familiar with the lab it should probably just take 5-10 minutes to quickly test Lab 1.

I was just thinking and the EntlibContrib is a zip file and by default the files could be "blocked".  I know this has caused me some strange errors before.  Before unzipping EntlibContrib try unblocking the zip file.

--
Randy Levy
Enterprise Library support engineer
entlib.support@live.com