开发者

asp.net sending data

How do you send data from an ASP.NET web application to a windo开发者_高级运维ws form application?? How do you establish the connection? I looked up webrequest/webresponse/post but i think thats only if you want to communicate between 2 asp.net web applications.


You might use a socket.

It would help if you're more specific about exactly what you're trying to accomplish. Do you need live communication, or would connecting to a shared database do what you need? Is the web application on the same computer as the server or a different one from the forms application?

Update: If you're trying to pass messages to the Windows Form without using or implementing any sort of protocol, you might look into how to use LISTEN/NOTIFY on PostgreSQL. You could then just add data to a table, then have the forms application consume the data. This would have the added benefit that your forms app wouldn't have to miss any data if it was not on.


My opinion to you is to implement a webservice. I made a project for mobile devices using webservices, the mobiles had an application made in winforms that call a webmethod that made an action which was registered in the system. A web page showed the data and the events of every mobile device.

If you need an explantation of webservices you can go here.

The strategy in your case would be to implement the Observer Pattern or to raise an event to make the application or winform to be noticed about a change or action in the web page.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜