I haven't dug into this one yet, but here is a small repro of an exception that comes from deserializing DbUpdateExceptions:
var formatter = new BinaryFormatter();
Exception ex;
using (var ms = new MemoryStream())
{
formatter.Serialize(ms, new DbUpdateException("foo"));
ms.Position = 0;
// Works fine
ex = (Exception)formatter.Deserialize(ms);
}
using (var ms = new MemoryStream())
{
formatter.Serialize(ms, ex);
ms.Position = 0;
// Exception happens here on 2nd deserialize
ex = (Exception)formatter.Deserialize(ms);
}
Thoughts?
Comments: Is there public visibility into this work item for me to track the status (e.g. connect.microsoft.com)? Thanks.
var formatter = new BinaryFormatter();
Exception ex;
using (var ms = new MemoryStream())
{
formatter.Serialize(ms, new DbUpdateException("foo"));
ms.Position = 0;
// Works fine
ex = (Exception)formatter.Deserialize(ms);
}
using (var ms = new MemoryStream())
{
formatter.Serialize(ms, ex);
ms.Position = 0;
// Exception happens here on 2nd deserialize
ex = (Exception)formatter.Deserialize(ms);
}
Thoughts?
Comments: Is there public visibility into this work item for me to track the status (e.g. connect.microsoft.com)? Thanks.