This is a migrated thread and some comments may be shown as answers.

WCF Uncatched FaultException

2 Answers 89 Views
Development (API, general questions)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Wolfgang
Top achievements
Rank 1
Wolfgang asked on 24 Oct 2012, 06:48 AM
i'm trying to use a WCF Plain service in VS 2012 with .net 4.5.

I tried the telerik developers manual.
I created the service and a client.

In the service interface IEntitiesModel I put [FaultContract(typeof(string))].
In the EntitiesModel.SVC I used an easy construct as first try:

throw new FaultException("test");

In user code of Consumer i wrote a catch for the exception.
 
Now the problem is:
Every time the service is called, Visual Studio stops in throw new FaultException with the error message, that FaultException was not handled by usercode. If i continue with F5, the exception is also caught by usercode of consumer.

Why does it stop in the service?

2 Answers, 1 is accepted

Sort by
0
Accepted
Viktor Zhivkov
Telerik team
answered on 24 Oct 2012, 12:17 PM
Hi Wolfgang,

I believe that you have enabled Break when Exception is Thrown option in Visual Studio Debug menu.
Here is information how to enable it and you can use the same process to disable this behaviour.

In general this should happen only when you are debugging with Visual Studio attached to the process.
This is behaviour specific for Visual Studio and you can experience the same effect using any method that throws exception when this option is enabled.

Hope that helps you avoid this inconvenience.

All the best,
Viktor Zhivkov
the Telerik team
Telerik OpenAccess ORM Meets ASP.NET Web API. Read more.
0
Wolfgang
Top achievements
Rank 1
answered on 25 Oct 2012, 08:27 AM
Thanks.
Tags
Development (API, general questions)
Asked by
Wolfgang
Top achievements
Rank 1
Answers by
Viktor Zhivkov
Telerik team
Wolfgang
Top achievements
Rank 1
Share this question
or