Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Try catch(Exception) on the client side, and inspect the type of the exception being caught as well as any inner exceptions. It might give some clues.</p> <p>Some other remarks:</p> <ul> <li><p>ApplicationException is deprecated. You should normally derive from System.Exception.</p></li> <li><p>I normally add the [Serializable] attribute to custom exceptions. Not sure if this is important.</p></li> <li><p>You should normally override System.Exception.GetObjectData rather than explicitly implementing ISerializable.GetObjectData. In your case you're not serializing any additional data, so I would neither override it nor explicitly implement it. Again I'm unsure if this would have any impact.</p></li> </ul> <p>My template for a serializable custom exception looks like the following, and I haven't had any problems with serialization over a remoting connection.</p> <pre><code>[Serializable] public class CustomException : Exception { /// &lt;summary&gt; /// Initializes a new instance of the &lt;see cref="CustomException"/&gt; class. /// &lt;/summary&gt; public CustomException() { } /// &lt;summary&gt; /// Initializes a new instance of the &lt;see cref="CustomException"/&gt; class with /// a specified error message. /// &lt;/summary&gt; public CustomException(string message) : base(message) { } /// &lt;summary&gt; /// Initializes a new instance of the &lt;see cref="CustomException"/&gt; class with /// a specified error message and a reference to the inner exception that is a cause /// of this exception. /// &lt;/summary&gt; public CustomException(string message, Exception inner) : base(message, inner) { } /// &lt;summary&gt; /// Initializes a new instance of the &lt;see cref="CustomException"/&gt; class with /// serialized data. /// &lt;/summary&gt; protected CustomException(SerializationInfo info, StreamingContext context) : base(info, context) { } } </code></pre> <p><strong>UPDATE</strong></p> <p>Also if you're hosting the server code in IIS, you need the following in web.config to allow exceptions to propagate to the client:</p> <pre><code> &lt;system.web&gt; ... &lt;customErrors mode="Off" /&gt; ... </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload