Quantcast
Channel: Alex FTPS Client
Viewing all articles
Browse latest Browse all 114

Commented Issue: Mark Exception class as serializable [8352]

$
0
0
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 **

Exceptions must also include the below constructor:

protected FTPException( SerializationInfo info, StreamingContext context ) : base( info, context ) { }

Applies to:

FTPException
FTPReplyParseException
FTPProtocolException
FTPOperationCancelledException
FTPCommandException
FTPSslException


Viewing all articles
Browse latest Browse all 114


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>