When serialize the exception, i got bellow error
Error Details
-----------------------------------------------------------------
Type : System.ApplicationException
Message : Unhandled Exception: System.Runtime.Serialization.SerializationException: Type 'AlexPilotti.FTPS.Common.FTPCommandException' in Assembly 'AlexPilotti.FTPS.Client, Version=1.1.1.25793, Culture=neutral, PublicKeyToken=48316da1e84b328d' is not marked as serializable.
Server stack trace:
at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit,
Comments: ** Comment from web user: xiper **
Error Details
-----------------------------------------------------------------
Type : System.ApplicationException
Message : Unhandled Exception: System.Runtime.Serialization.SerializationException: Type 'AlexPilotti.FTPS.Common.FTPCommandException' in Assembly 'AlexPilotti.FTPS.Client, Version=1.1.1.25793, Culture=neutral, PublicKeyToken=48316da1e84b328d' is not marked as serializable.
Server stack trace:
at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit,
Comments: ** Comment from web user: xiper **
Exceptions must also include the below constructor:
protected FTPException( SerializationInfo info, StreamingContext context ) : base( info, context ) { }
Applies to:
FTPException
FTPReplyParseException
FTPProtocolException
FTPOperationCancelledException
FTPCommandException
FTPSslException