views:

66

answers:

2

In a system with both ends (client and server) in .NET, is it possible to use the binary serialization provided by the dataset class in ADO.NET 2.0 when the datasets are exposed as WebMethods parameters ?

Is it ok to use something like the following just before the dataset is returned:

someDataSet.RemotingFormat = SerializationFormat.Binary;

A: 

WCF supports TCP/IP, Named Pipes and MSMQ transports using a binary serialization format (not the old "binary serialization").

ASMX web services only support SOAP over HTTP, hosted by IIS. They are also considered by Microsoft to be a "legacy technology". Any new development should use WCF.

Finally, you shouldn't be transferring a DataSet. It's very and it's platform-specific. There have even been problems between different .NET versions in transferring a DataSet.

John Saunders
A: 

I cannot comment on my question, so i'm responding with an answer.

Some precisions:

The web services are used internally only, and we cannot use WCF at this point. Client and server are using the same .NET version and will always be. Web services are used as communication channels between tiers in the same application.

Given this context, Is it possible to specify binary serialization in the datasets returned in asmx calls ? We are trying to speed up things, but are stuck with this model.

Someone
No. ASMX web services do not support binary at all. Only SOAP over HTTP or HTTPS.
John Saunders