Remote Exceptions
Exceptions sometime occur in remote code. An exception that is raised in a different application domain is a remote exception. Remote exceptions include exceptions thrown in a .NET Remoting application or a Web service application. Exceptions that cross application domains must be serialized to maintain their state. System exceptions are serializable. However, you need to make application exceptions serializable.
Follow these steps to serialize an application exception:
Adorn the application exception with the serializable attribute.
Implement a two-argument constructor with a SerializationInfo parameter and a StreamingContext parameter. In addition, call the two-argument constructor in the base class to allow the base class to ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access