What does the WCF action stand for - wcf

What does the soap action http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher/fault mean?

Found the solution.
WCF throws a fault code when it an exception is thrown.
Main issue is its not a SOAP xml response and thus many consuming applications do not know how to handle it.

Related

how to throw customize fault message from jax-rs webservice

Can any one help me out how i can throw a customize server exception from jax-rs webservice which will be send response to client in the xml tag. as I am not be able to find the wsdl file for that webservice so can any one help me out by providing complete tutorial or complete example
Thanks In Advance.

Throwing exception from WCF Service without faulting

When throwing a FaultException from a WCF service, is there a way it can be thrown without faulting the actual connection? I'm looking to prevent an action for a particular method, but don't want to disrupt the client's connection (just return saying "you can't do this action right now, and here's why"). Or, is the required paradigm to recreate a new proxy in the .NET consuming app (in the case of .NET)
If you throw a FaultException then the client will get an exception but should be able to carry on using the same connection. If you let any other kind of exception out of the service (without having a Custom Error Handler in place) then it will fault the channel
Are you using .NET 4.0, can you use WebFaultException to return an HTTP status code with the appropriate error reason?

WCF Service authentication messages

I'm writing a WCF service with authentication and have stumbled across this: I can't seem to define the messages returned in the event of an error in authentication (that is to say: user is not authenticated).
I have an IErrorHandler implementation in place, however that doesn't appear to catch the exceptions thrown (SecurityTokenException or FaultException<T>) during auth. I can confirm that it works in the rest of scenarios, however.
Is there something I'm missing here? Or is it really not possible to catch and handle exceptions thrown in auth?
Thanks
IErrorHandler can't handle the exception that happens in the authentication process. Why do you want to handle the authencation exception?
Your client side can catch the authentcation exception.

Adding new exception types to the WCF 4 routing service error handling

I am working on a prototype using WCF 4 routing services to create a pass through router, leveraging the error handling functionality
I have a requirement where if a WCF service generates a custom exception (in this scenario it is called a notPrimaryException), it should be handled in the same way as a communication exception is handled in WCF4 routing services error handling, that is, the message should be resent to the endpoints in the backup list.
Now I understand that this custom exception is returned from the service to the router as a fault exception at the message layer as opposed to a communication exception being returned at the transport layer.
I have tried using message inspectors and the IErrorHandler interface (ProvideFault and Handle Error) to identify if the notPrimaryException is occurring at the router but nothing is being picked up until it returns to the client as an unhandled fault exception. I was hoping to intercept this fault somewhere on the router and resend the message accordingly but I don't know if there are any appropriate behaviors.
Is there a way to shoehorn additional exception/fault types into the error handling infrastructure or is there another approach I may have overlooked?
Thanks and Regards,
Ivan
You should not be handling application errors on the router. Generally, the application developer has placed FaultExceptions on the service with the expectation of being able to handle them on the client.
If the FaultException is not received by the client, how does the client know what/anything went wrong?
The only errors you should be handling on the router are transport layer exceptions, application exceptions should be handled in the application.

How to diagnose client-side WCF issues in Silverlight environment?

It seems that WCF diagnostics is not available in SL. Is it because of limited System.Diagnostics support or something else? Anyway, how do you track client-side WCF issues when server-side diagnostics is not enough?
This is how I solved my problem of correctly obtaining exceptions at the Silverlight Client. Similar to Rus' but does not require wrapping of exceptions. Though it does require the version number to be exact in web.config (still working on solving that)
Programmatic configuration of Exception-sending in WCF
I think this article will help.
http://msmvps.com/blogs/theproblemsolver/archive/2009/01/27/returning-exception-information-to-a-silverlight-client-through-wcf.aspx
If you're getting a 'Not Found' Error the most likely cause is the cross domain access policy. What I use to try diagnose those problems is Fiddler2, and look at the raw traffic.
Are you sure that your WCF service is not faulting on the call? If something is going wrong on the server-side the returned message will be of HTTP status code 500. Due to security restrictions, the browser will not pass any non-200 messages back to the silverlight plugin which results in silverlight throwing the classic CommunicationException "The remote server returned an error: NotFound."
There are some pretty well documented work-arounds for using a WCF behavior to change the HTTP status code on the fault from 500 to 200 so silverlight will actually have access to the details of what went wrong. More info here:
http://msdn.microsoft.com/en-us/library/dd470096(VS.95).aspx
http://www.netfxharmonics.com/2009/07/Understanding-WCF-Faults-in-Silverlight-3