开发者

What is the easiest to transfer an object between two C# apps over the web?

I have written an application that basically gathers up a bunch of text and numerical data开发者_运维技巧 from the client PC and stores it as an object. Right now I'm implementing XML serialization so that the file can be saved.

The issue is now, how do I get this data to the server? I have a server running IIS 7 setup but I don't quite understand the ASP.net life cycle, so I'm not sure how to implement the receiving app.

What should I do? Thanks


As far as I can tell what you're going to need is a web service as the others have suggested. This can be easily handled by a WCF service once you learn the basics of them. They are especially good with transmitting SOAP messages which is serialized XML. Developers implement these types of services for the same purpose every day.

I recommend you start looking at the MSDN WCF pages to get acquainted with it and look at some tutorials on CodeProject to get your "hands dirty" and your "feet wet".

WCF is awesome because you can configure it to transmit however you wish to. You can send data back and forth as binary via TCP, over HTTP, secure HTTP, MSMQ, etc. It wraps service data flow very nicely.


Do you mean you have two different applications on two different servers and you want to communicate between them? You can always use Web services as a transfer mechanism. .NET remoting is another option which the client and the server are both .NET machines.


You should create a Web service to accept the data and process it on your IIS 7 server.


I will say use JSON


Remoting(TCP/HTTP), WebServices(SOAP/WCF), MessageQueue.

Take your pick;

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜