|
Home > Archive > BizTalk Server General > December 2004 > serialization error in .NET component called from orchestration
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
serialization error in .NET component called from orchestration
|
|
|
| My component calls a stored proc to see if an item is in a SQL Server DB. My
component is serializeable. The error is: "System.Data.Sql.SqlConnection is
not marked as serializable". I assume that BTS and my component run in
different application domains and that is why my component must be
serializable. But I don't understand why I get this error or what to do
about it.
| |
|
| Glen wrote:
> My component calls a stored proc to see if an item is in a SQL Server DB. My
> component is serializeable. The error is: "System.Data.Sql.SqlConnection is
> not marked as serializable". I assume that BTS and my component run in
> different application domains and that is why my component must be
> serializable. But I don't understand why I get this error or what to do
> about it.
All orchestration variables need to be serializable. This also means
that any instance variables in the corresponding class need to be
serializable too. This is because, if the orchestration need to
dehydrate, the variables need to be serialized too. The SqlConnection
class is not marked serializable, hence this error.
One possible solution would to wrap the code that uses the SqlConnection
in a static method of a class and call that method from an expression.
Then you would not have to create and orchestration variable.
Sena.
|
|
|
|
|