?
Solved

What is a System.ServiceModel.FaultException?

Posted on 2008-10-22
3
Medium Priority
?
3,005 Views
Last Modified: 2012-05-05
I'm working on a WCF back end for an application that my company uses.  I have a test app that emulates the data that the Client would pass to the back end.

I'm getting the following Error Message:


System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: Provided Key is Invalid! (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.ApplicationException: Provided Key is Invalid!
   at modDBFunctions.OpenSqlConnection(String strKey, String strConnectionName) in File1.vb:line 35

   at Function1(String strKey) in File2.vb:line 93

   at SyncInvokeFunction1(Object , Object[] , Object[] )

   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)

   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)

   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)

   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc)

   at System.ServiceModel.Dispatcher.ImmutableDispatc...).


What is a FaultException?  How is it different from an Exception?  Does VB handle it the same way?


************************************************************************************
Edit: Never mind about this question.  It was an error in the Client Test App, which is why it was not getting caught in the back end.  :)

All the code is in a Try/Catch block and bubbles up to the calling function.  If strKey is passed in as "", I Throw an error (Throw New System.Exception("Provided Key is Invalid!")).  It bubbles up to the highest function in the back end and then gives me an unhandled error message (while running in debug mode).  I can click the "Play" button to resume execution and it will then get passed back to the client and displayed properly.   I have other areas in my code that generate exceptions (InvalidCastException) and those will pass back to the Client without stopping for an unhandled exception.  All the code is contained in a Try/Catch block in every function that is called.  Why is it generating an unhandled exception when I Throw and error and not when it generates the error?
************************************************************************************
0
Comment
Question by:CarlaGibson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 

Accepted Solution

by:
CarlaGibson earned 0 total points
ID: 22867290
I never found a solution.  The error generated is specifically thrown by me when the key passed in is invalid.  I was just asking about the type of error.

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question