Darie,
There are a couple of workarounds.
In a simple remoting scenario, you could use a different (custom) formatter
to format the dataset as binary (true binary) over the HTTP channel. Note
that even using the binaryformatter in .NET 1.1 will still serialize the
dataset as XML. It is fairly easy to write the formatter yourself, or you
can download an out of the box version from
http://www.freewebs.com/compactFormatter/downloads.html. You might not like
this approach since this will start formatting everything whereas you might
want to apply this trick to only a specific webmethod.
Therefore there is another solution, and that is Knowledgebase article
#829740 that can be accessed at
http://support.microsoft.com/default.aspx?scid=kb;en-us;829740 . In the
adjoining code download at that site, you will see that there is an
alternative approach to using Dataset, called "DataSetSurrogate". You can
then use BinaryFormatter on that to "true" binaryformat your dataset, and
you would have to replace your calls with simple dataset to New
DataSetSurrogate(Ds) and DataSetSurrogate.ConvertToDataset() on either side.
In practical experience, I found that datasetsurrogate is less forgiving if
you forget to call BeginInits etc. or your strongly typed datasets (if that
is what you are sending across the wire), donot have the right default
values (for example - it compares 0.0 with 0.0F and fails). ... but for the
most part it works.
Thirdly, it is not too difficult to create your own serialization routine
for the dataset - similar to the customformatter upstairs. Albeit thats a
little more work than approach #1 and #2.
Hope this helped
- Sahil Malik
Independent Consultant
You can reach me thru my blog -
http://dotnetjunkies.com/WebLog/sahilmalik/