.NET Remoting Exception not handled Client-Side

后端 未结 3 486
忘掉有多难
忘掉有多难 2021-01-15 15:04

I checked the rest of the remoting questions, and this specific case did not seem to be addressed.

I have a .NET Remoting server/client set up. On the server side I

3条回答
  •  孤城傲影
    2021-01-15 15:46

    First and foremost, do not inherit from ApplicationException. This advice has been around for a while, and I believe FxCop will automatically generate a message around this.

    Next, you should usually decorate your custom exception with the [Serializable] attribute. I think this is your main issue, as I get an exception on the method call saying AuthenticationException is not marked as serializable.

提交回复
热议问题