Solved

What is a System.ServiceModel.FaultException?

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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

695 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