D
DougBurke
I'm having a problem with a SqlException that I am serializing and
deserializing. I do not know if this is the correct place to post,
but I thought someone might know.
A particular error that occurs, if the connection string does not pass
correct login details, is a sql exception with the following message:
"Login failed for user 'dbuser'." This exception is of type
System.Data.SqlClient.SqlException. This exception has a normal
StackTrace property.
I serialize the exception, either with a binaryformatter or a
soapformatter and then deserialize and the resulting SqlException has
a StackTrace of null (I have verified this by re-serializing and
inspecting the serialized exception). The problem is in the
deserialization, since the first serialized exception (by inspection)
has the stacktrace string contained.
Has anyone seen this behaviour and is it a bug or am I missing
something? In other words, should the stack trace disappear?
Doug
As an aside, the stack trace only disappears for this specific
exception... a different sql exception (with incorrect command sytax
for example) does not behave this way.
deserializing. I do not know if this is the correct place to post,
but I thought someone might know.
A particular error that occurs, if the connection string does not pass
correct login details, is a sql exception with the following message:
"Login failed for user 'dbuser'." This exception is of type
System.Data.SqlClient.SqlException. This exception has a normal
StackTrace property.
I serialize the exception, either with a binaryformatter or a
soapformatter and then deserialize and the resulting SqlException has
a StackTrace of null (I have verified this by re-serializing and
inspecting the serialized exception). The problem is in the
deserialization, since the first serialized exception (by inspection)
has the stacktrace string contained.
Has anyone seen this behaviour and is it a bug or am I missing
something? In other words, should the stack trace disappear?
Doug
As an aside, the stack trace only disappears for this specific
exception... a different sql exception (with incorrect command sytax
for example) does not behave this way.