Solved

What is a System.ServiceModel.FaultException?

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

730 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