Ask the Expert

How do I create an instant messaging ASP.NET application?

How do I create an instant messaging ASP.NET application? I thought using threading, tcpclient and tcplistener namespace and invoking to update the textbox would work, but I tried and it's not working. Any guidelines are appreciated.
Are you trying to develop the server application, the client application (inside a browser) or both? If you want to develop both, you should use plain JavaScript and HTML and poll the server for new messages every couple seconds from the client, either refreshing an IFrame or querying with the XMLHttpTranser object. The server should be implemented as an IHttpHandler to be fast and avoid most of the ASP.NET Page Framework overhead, which is not necessary. You'd have storage for the most recent messages (maybe in-memory, maybe a database) and return that on the IHttpHandler.ProcessRequest method. If the client is refreshing an IFrame, if may be easier to have an aspx page returning the messages.

This was first published in July 2004

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: