My app tries to deserialize data sent by client and it fails with the following error:
Exception thrown:
'System.Runtime.Serialization.SerializationException' in mscorlib.dll
Additional information: Cannot get the member '<.ctor>b__0'.
googling gives no results. Okay, I decided I would step into deserialization logic and try to figure out what exactly is causing this. Well, a day has passed and I'm nowhere close.
I used instructions from Microsoft Reference Source website to configure Visual Studio. It does download something
MicrosoftPublicSymbolsmscorlib.pdb
DCF1E4D31F6944AC87E7A634262BEE881mscorlib.pdb (780kb)
E47257B512BA49BC9FC367C532FC5F1E2mscorlib.pdb (953kb)
but debugger does not step in.
I googled more and found another way to do it - installed dotTrace app and used it as source server. And that does not help either. I still see the following:
Symbol Load Information
popup for mscorlib.pdb says
C:UsersmeAppDataLocalTempSymbolCacheMicrosoftPublicSymbolsmscorlib.pdbe47257b512ba49bc9fc367c532fc5f1e2mscorlib.pdb:
Symbols loaded.
I can step in into System.Windows.Forms, System.Linq, etc - so generally speaking, it works - it just this particular call to BinaryFormatter.Deserialize()
does not work. What could be the reasons for that and how can I get it to step into?
Could it be because of SecuritySafeCritical
attribute?
[System.Security.SecuritySafeCritical]
public Object Deserialize(Stream serializationStream)
I'm using VS 2015 .Net 4.5.2 (though I tried 4.5 with the same results).
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…