WCF RIA Services & Silverlight: Custom Exception Messages + Load operation failed for x
So on the server I send back custom exception messages, meant to be displayed to the user (think "Bad Username/Password", "Account has been locked out" etc.)
However, when I view the Exception message in silverlight it is prefixed with "Load operation failed for x." I was thinking that Exception.InnerException would be a good place to put the original Exception, but I guess the RIA team didn't agree.
Is there a开发者_如何学Go way to get my original exception message? Sure, I could write a quick regex to parse it out, but that feels dirty... Is that my only option?
I read about a solution that may work for you. I have yet to implement it myself though.
http://mark.mymonster.nl/2011/02/10/make-use-of-wcf-faultcontracts-in-silverlight-clients/
精彩评论