Timothy Khouri
Timothy Khouri

Reputation: 31845

In WCF - In the "Faulted" Event - How Do I Get The Exception Details?

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 :)

Upvotes: 8

Views: 4005

Answers (0)

Related Questions