0

I have a WCF service that is coded to throw a Custom FaultException under certain conditions. When hosted locally and on several servers this executes as excpected, Custom fault thrown by service custom fault caught by client, but on production and UAT server the Custom fault is thrown by what the client recieves is a Protocol Exception (500 error).

Is anyone aware of an IIS or sever setting that could be effecting this WCF server? This issue is driving me crazy

  • I don't know the answer to your specific problem, but when dealing with WCF I've found [message logging and tracing](http://msdn.microsoft.com/en-us/library/ms733025.aspx) to be an invaluable tool to track down issues such as this. – 500 - Internal Server Error Jun 29 '13 at 21:12
  • Have you read this: http://stackoverflow.com/questions/5022675/why-wcf-client-not-receiving-soap-fault-as-faultexception – Ilkka Jun 30 '13 at 13:30
  • After adding message logging and tracing I see on the server that works, after "Sent a message over a channel" I see "A message was closed". On the server that does not work, I do not see the "A message was closed" entry. Any thoughts on that? – Joe Murphy Jun 30 '13 at 17:07

1 Answers1

0

I am having a similar Issue,

our server is using a third party web service, when a client connects to our server from the same machine, our server can catch the Fault Exception, but if the client is connecting over the network our server can't handle the Fault Exception, and is only getting the "500 Internal Server Error".

I used a sniffer to see the incoming data, and I can see that the webservice is sending the Fault Exception in both cases, this is a third party webservice so i have no control over it.

the clients use .Net Remotting to connect to the server.

The Solution:

add RemotingConfiguration.CustomErrorsMode = CustomErrorsModes.Off; to the Remoting server, for some reason it is affecting the Exceptions it (the server) is receiving. this is not the ideal solution because now we are exposing our servers Exceptions ...

Doron
  • 41
  • 3
  • This does not really answer the question. If you have a different question, you can ask it by clicking [Ask Question](http://stackoverflow.com/questions/ask). You can also [add a bounty](http://stackoverflow.com/help/privileges/set-bounties) to draw more attention to this question once you have enough [reputation](http://stackoverflow.com/help/whats-reputation). – Carl0s1z Apr 02 '14 at 09:10
  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient [reputation](http://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](http://stackoverflow.com/help/privileges/comment). – DHN Apr 02 '14 at 09:56