Solved

What is a System.ServiceModel.FaultException?

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VS.net 2010 11 48
VB.Net - Windows UserName index and length error 4 34
write xml in vb.net 2 32
Help with error in Query 2 31
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

791 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