1

I have a mobile applciation thats interacts with a server. The mobile application should be allowed to do a http posting to the server.

The server should be able to handle the event and display out using a custom windows .net application on the server almost immediately based on event.

So what are the right ways to do it?

Is there any event handling that works on c#.net that can be applied on the above scenario?

So far i only thought of msmq event handling. The mobile app does a http post on the server, the server creates a msmq on the server side and the windows applications listens for the new msmq message.

ericlee
  • 2,703
  • 11
  • 43
  • 68
  • I don't know if you can use WCF in Mobile ,because if yes than it can do the Job ,otherwise you can also use Socket's where you can use Ondatarecieved Event http://stackoverflow.com/questions/4602675/how-to-use-data-receive-event-in-socket-class – Rosmarine Popcorn Oct 31 '11 at 15:47
  • that will be limitation on the mobile platform. right now i am thinking ways to trigger event handling based on mobile application doing a http post to the server – ericlee Oct 31 '11 at 16:44

1 Answers1

0

If you must use HTTP post then you could write your own web server in C# and add handling for specific requests from your mobile device.

This project outlines how to create a web server in C#. Inside of the StartListen() function you can check for your target message instead of "GET". Alternatively you could use the functionality from this open source project: http://webserver.codeplex.com/ and hook the appropriate HTTPListener functionality.

The real thing to understand here is that the "web server" is really just a thread that is listening for a specific data stream on a socket. You could easily adapt simple socket send / receive code like this to implement your functionality.

robowahoo
  • 1,259
  • 9
  • 10