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 7563161
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T13:35:41+00:00 2026-05-30T13:35:41+00:00

I am trying to catch the ValidationFault exceptions of my service and return a

  • 0

I am trying to catch the ValidationFault exceptions of my service and return a instance of MyClass with the property Message filled with the validation error provided by EntLib when my client calls one of my service methods without the correct parameters (I can’t use complex types).

I tried to implement two interfaces to accomplish this task: IParameterInspector and IOperationInvoker. The problem is after the method BeforeCall is called (of the IParameterInspector interface), EntLib throws the ValidationFault exception but I can’t catch it and my code doesn’t reach the Invoke method of my IOperationInvoker class and because of that I can’t replace the return value with a instance of MyClass.

Remember, my client is not based on .NET platform and there’s no such thing as catch(FaultException<ValidationFault> ex) there. That’s why I MUST work with a default object on my service responses.

I appreciate the help.

  • 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-30T13:35:42+00:00Added an answer on May 30, 2026 at 1:35 pm

    Can you use an IErrorHandler implementation similar to Enterprise Library’s WCF ExceptionShielding? Basically catch all exceptions and if it’s a FaultException<ValidationFault> then convert the ValidationFault to your custom message and return it.

    It looks like the output of ProvideFault is a Message so you could return a message instead of a fault. This posting seems to give the approach.

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

Sidebar

Related Questions

I am trying to catch 'Trying to get property of non-object' error with a
I've been trying to catch exceptions in my WCF service and store them in
I'm having problems with trying to catch an error. I'm using Pyramid/SQLAlchemy and made
I'm trying to catch an UnauthorizedAccessException, but catch(UnauthorizedAccessException uae) { return FALSE; } gives
I'm trying to catch an input error - where the only valid input is
I'm trying to catch an error generated by flask-sqlalchemy. My code unfortunately can't handle
I'm trying to catch exceptions on my Mac app so that I can log
I'm trying to catch Ajax timeout error with jQuery 1.4.2, but none of tutorial
I'm trying to catch any exceptions that happen when you cannot load a module.
I'm trying to catch an error try { $outcome = $bet->getElementsByTagName(Outcome); $line1 = $outcome->item(0)->getElementsByTagName(OptionalValue1)->item(0)->nodeValue;

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.