When debugging unit for a WCF client in Visual studio 2008 you often come across following error message. "A first chance exception of type 'System.Configuration.ConfigurationErrorsException' occurred in System.Configuration.dll
Additional information: This element is not currently associated with any context"
If the test is executed in non debug mode it works fine, without any glitches. This is because some of the exception which otherwise handled by WCF library is not handled in debug mode.Fix is
simple. Open the Exception dialog box from Debug menu and deselect the Common Language Runtime Exception check box. Shown in red in following diagram. This simply tells Visual Studio not to break in system exception.
This happens because WCF throws and catches exception for it's normal application flow. Apparently there is no fix to it. See the post in MSDN(http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1025211&SiteID=1).