I have a WCF server and I'm tapping into the "Faulted" event which stupidly only gives me "object sender, EventArgs e". How can I get the current 'Exception' object in that event?
Or, if there is some sort of global system way, like Environment.GetCurrentException(), that would be awesome, but I can't find it.
EDIT: To help explain what I'm hoping for... in ASP.NET, you can do "Server.GetLastError()"... Is there such a thing, or anthing even remotely close in WCF? - OperationContext.Current.GetLastError() would be cool :)
OK, after some more googling with the right keywords, I've found my answer: http://www.steverb.com/post/Useful-WCF-Behaviors-IErrorHandler
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With