Take for example a project with 10 services and 20 methods on each service.
All services inherit from a base services which has a security check. The first thing each method does is to make a call to the security check. This throws a security exception if there is a problem.
Question is: Do I need to specify a FaultContract on each met...
We have a WCF self hosted service which we have been developing for awhile. As part of our standard we have defined a FaultContract which we apply to operations.
Recently we needed to add a new ServiceContract so we did that and added a simple method (void/no params) to it. Once we added this contract though SVCUtil would no longer ge...
We have many WCF services, we have not been using contract first. So now we have a lot of code that throws exceptions, that are not specified in the FaultContracts.
Other than manually inspecting the code. Is there a way to generate FaultContracts or at least get a warning when a FaultContract is missing?
Thanks
Shiraz
...
I have put the attribute [FaultContract(typeof(ExceptionDetail))] for my operation contract. When I am trying to add the service th' a client app, I get this error - "Custom tool error: Failed to generate code for the service reference 'ServiceReference1'. Please check other error and warning messages for details."
But when I comment o...
Ok, I know I am missing something here. I have the following operation contract:
public double DivideByZero(int x, int y)
{
if (y == 0)
{
throw new FaultException<ArgumentException>
(new ArgumentException("Just some dummy exception")
,new FaultReason("some very bogus reason"), new...