tags:

views:

741

answers:

2

Hi all...

I'm using C# and I have windows form and web service... I have a custom object that I want to send to the web service.. sometime, the object may contain a huge of data..

as a best performence, what is the best way to send a custom object to the web service?

Thank for reading my message and I appreciat your help... bey...

+2  A: 

Web Services are designed to handle custom objects as long as they eventually breakdown into some standard types. As per sending a huge data, there are MTOM and older DIME. If it's within LAN and against other .NET client, you might want to look into non-Web Services ways like Remoting or plain http.

See How to: Enable a Web Service to Send and Receive Large Amounts of Data.

eed3si9n
Thank you for the link - very useful to know. Ironically, I almost closed this question a little while ago. :)
MusiGenesis
Thank you so much
A: 

If you are using / plan to use WCF within the network(as opposed to internet), named pipes on WCF is fast and simple. Use primitive types to pass objects. A string xml (although verbose) or a light weight binary object will do.

If it's a wsHttp webservice, use string, I can't think of any other way you would pass a custom object, unless the service knows about it.

Vin