Custom Exception og Remoting ?
Hej eksperterjeg har et klient server program som jeg er i gang med at lave
jeg har lavet mine egne exceptions som jeg kaster fra serveren
og jeg kan godt fange dem på klienten
MEN mit problem er at jeg kan ikke på beskeden med over til klienten
da jeg fanger et exception over på klienten får jeg altid samme besked "Error in application"
håber at nogen kan hjælpe
jeg har lavet mine exception som dette eksempel
[Serializable]
public class LaastException : System.ApplicationException
{
private const string _customInfoKey = "CustomInfo";
private string _customInfo;
public LaastException ( string customInfo )
{
_customInfo = customInfo;
}
public LaastException ( string message, string customInfo ) :
base ( message )
{
_customInfo = customInfo;
}
public LaastException (string message, string customInfo,
Exception inner) : base ( message, inner )
{
_customInfo = customInfo;
}
public LaastException (SerializationInfo info, StreamingContext context) : base( info, context )
{
_customInfo = info.GetString( _customInfoKey );
}
public override void GetObjectData( SerializationInfo info,
StreamingContext context )
{
base.GetObjectData(info, context);
info.AddValue( _customInfoKey, _customInfo );
}
public string CustomInfo
{
get { return _customInfo; }
}
}
