Hi,
I have the following code which is miss-behaving at one site:
[Serializable]
public class HMRHost
{
private int _pid;
private DateTime _date;
public int Pid
{
get
{
return _pid;
}
set
{
_pid = value;
}
}
public DateTime Date
{
get
{
return _date;
}
set
{
_date = value;
}
}
}
public interface IHMRHostCollection
{
System.Collections.ICollection GetData();
}
[Description("HMRHost Collection Class")]
[Transaction(TransactionOption.Required)]
[MustRunInClientContext(false)]
[ComponentAccessControl(false)]
[ClassInterface(ClassInterfaceType.None)]
public class HMRHostCollection : ServicedComponent, IHMRHostCollection
{
public static Hashtable _htable = null;
/// <summary>
/// Returns all the data in the hashtable.
/// </summary>
/// <returns></returns>
public System.Collections.ICollection GetData()
{
if (_htable != null)
{
return _htable.Values;
}
else
{
return null;
}
}
}
}
The above method "GetData" gets called from a .NET Windows Service. At one
site only (a W200 Server SP3) when calling the above generates a
SerializationException error with description: "One of the serialized keys
is null.".
Any ideas?
Cheers
Simon.