Solved

What is a System.ServiceModel.FaultException?

Posted on 2008-10-22
3
2,837 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
3 Comments
 

Accepted Solution

by:
CarlaGibson earned 0 total points
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video discusses moving either the default database or any database to a new volume.

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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now