G
Guest
I have some code that returns a dataset with the RemotingFormat property set
to binary but when I look at the HTTP packets on the network the dataset is
being serialized as XML!
I'm using an architecture that is WindowsFormApp -> HTTPRemoting -> COM+
Component, and tracing the HTTP using TracePlus Web Detective.
I am happy to forward the the full code that will reproduce this behaviour
to anybody interested.
A subset of that code is the following COM+ function:
Public Function Search() As DataSet
Try
Dim cn As New SqlConnection
cn.ConnectionString = "data source=.;integrated
security=true;initial catalog=pubs"
Dim cmd As New SqlCommand
cmd.CommandType = CommandType.Text
cmd.CommandText = "select * from titles"
cmd.Connection = cn
Dim sqlda As New SqlDataAdapter(cmd)
Dim ds As New DataSet
sqlda.Fill(ds, "Books")
ContextUtil.SetComplete()
ds.RemotingFormat = SerializationFormat.Binary
Return ds
Catch ex As Exception
ContextUtil.SetAbort()
End Try
End Function
to binary but when I look at the HTTP packets on the network the dataset is
being serialized as XML!
I'm using an architecture that is WindowsFormApp -> HTTPRemoting -> COM+
Component, and tracing the HTTP using TracePlus Web Detective.
I am happy to forward the the full code that will reproduce this behaviour
to anybody interested.
A subset of that code is the following COM+ function:
Public Function Search() As DataSet
Try
Dim cn As New SqlConnection
cn.ConnectionString = "data source=.;integrated
security=true;initial catalog=pubs"
Dim cmd As New SqlCommand
cmd.CommandType = CommandType.Text
cmd.CommandText = "select * from titles"
cmd.Connection = cn
Dim sqlda As New SqlDataAdapter(cmd)
Dim ds As New DataSet
sqlda.Fill(ds, "Books")
ContextUtil.SetComplete()
ds.RemotingFormat = SerializationFormat.Binary
Return ds
Catch ex As Exception
ContextUtil.SetAbort()
End Try
End Function