Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 846833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:40:53+00:00 2026-05-15T06:40:53+00:00

I am using Enterprise application block on my application’ server side to handle exceptions.

  • 0

I am using Enterprise application block on my application’ server side to handle exceptions.

I am able to successfully handle exception. I have created a custom service fault class to handle exceptions.

Here are my web config enteries…

<exceptionPolicies>
  <add name="WCF Exception Shielding">
    <exceptionTypes>
      <add type="TEST.Infrastructure.ExceptionHandling.Exceptions.TESTBusinessException, Pluto.Infrastructure.ExceptionHandling, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
      postHandlingAction="ThrowNewException" name="TESTBusinessException">
        <exceptionHandlers>
          <add logCategory="BusinessLoggingCategory" eventId="501" severity="Error"
            title="Pluto Service Exception" formatterType="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.TextExceptionFormatter, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling"
            priority="0" useDefaultLogger="false" type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.LoggingExceptionHandler, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
            name="Logging Handler" />
          <add
            type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.WCF.FaultContractExceptionHandler, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.WCF, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
            name="DefaultFaultContract Handler"
            faultContractType="TEST.Infrastructure.ExceptionHandling.Exceptions.TESTServiceException, Pluto.Infrastructure.ExceptionHandling"
            exceptionMessage="Pluto.Infrastructure.ExceptionHandling.Exceptions.TESTBusinessException {handlingInstanceID}">
            <mappings>
              <add name="Id" source="{Guid}"/>
              <add name="MessageText" source="{Message}"/>
            </mappings>
          </add>
        </exceptionHandlers>
      </add>

But on the client side when i try to catch this exception as

 catch (FaultException<TESTServiceException> fex) 
        { 
        }

this exception is not caught.
I am able to get the exception message on the client side which i have writen in app.config on server side.

Can any one please help me figure out the problem.

Thanks in advance

Vikram

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T06:40:54+00:00Added an answer on May 15, 2026 at 6:40 am

    Try extracting the exception details using the XmlReader:

    catch (FaultException ex)
    {
        string msg = "FaultException: " + ex.Message;
        MessageFault fault = ex.CreateMessageFault();
        if (fault.HasDetail)
        {
            System.Xml.XmlReader reader = fault.GetReaderAtDetailContents();
            if (reader.Name == "TESTServiceException")
            {
                TESTServiceException detail = fault.GetDetail<TESTServiceException>();
                msg += "\n\nStack Trace: " + detail.SomeTraceProperty;
            }
        }
        MessageBox.Show(msg);
    }
    

    More explanation on catching fault exceptions here and here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So, we are using the Enterprise Library 4.1 Exception Handling Application Block to deal
I'm using SQL*Plus 9.2 on Oracle 10g enterprise. I have created some scripts that
I'm using the Enterprise Library Logging application block to allow my application to log
Using the Enterprise Library 4.1 Validation Application Block, how can I validate that a
I have got this error when using Enterprise Library 3.1 May 2007 version. We
In visual studio, I have an asp.net 3.5 project that is using MS Enterprise
Ever since the publication of Enterprise Integration Patterns people have been using the notation
I am working with v4 of the Enterprise Application block and I am trying
I created a simple Caching Data Access Layer that has caching using the Enterprise
Is anyone out there using Drupal for large scale, business critical enterprise applications? Does

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.