Click here to Skip to main content
11,481,404 members (58,885 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C#4.0 ASP.NET4.0
Need a code sample where User through web app is sending information to the LMS server.In LMS server,we can have HttpListener which responds to Data.and revert result back to Web app.
Posted 15-Jan-13 4:00am
Sergey Alexandrovich Kryukov at 15-Jan-13 11:51am
Well, just think about it...

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Hardly. The problem with a Web application is that it is fully works on HTTP requests from the client sides. If you try to listen, how it could be responsive to the request? If you use a separate thread (which is always done for listening), think about life time of the application code. It is fully executed between each HTTP request and HTTP response. In other words, a Web application model is not suitable for such things.

I would advise to consider creating a Web service, which has a very different life cycle. With a service, you can listen, of course.


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Advertise | Privacy | Mobile
Web01 | 2.8.150520.1 | Last Updated 15 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100