I'm trying to:
((Request.Params["crmid"] != null))
on the web page. But he continues to throw an exception for serialization:
Enter 'QC.Security.SL.SiteUser' in the assembly 'QC.Security, Version = 1.0.0.1, Culture = Neutral, PublicKeyToken = null' is not marked as serialized.
A type that is user-defined IIdentity, however, is marked as serializable as follows:
[Serializable()] public class SiteUser : IIdentity { private long _userId; public long UserId { get { return _userId; } set { _userId = value; } } private string _name; public string Name { get { return _name; } } private bool _isAuthenticated; public bool IsAuthenticated { get { return _isAuthenticated; } } private string _authenticationType; public string AuthenticationType { get { return _authenticationType; } }
I have no idea how to debug this, since I cannot go into serializer code to find out why it crashes. The call stack is only one frame before it hits [External Code]. And the error message is next to useless, given that the type is clearly marked as serializable. Correction of trial and error also created a type that is not allowed to exclude a member.
It worked fine. But now โsuddenlyโ this is not the case, which usually means some dumb error in Visual Studio, but rebooting does not help โthisโ time. So now I donโt know if this is a stupid VS error or a completely unrelated error for which Im gets a serialization exception or something that I am doing wrong.
The truth is that I simply do not trust VS anymore, given the number of monstrous persecutions of others that have been "fixed" over the past few months, by restarting VS 2008 or some other reworked workaround.
source share