469,332 Members | 6,969 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,332 developers. It's quick & easy.

ASP.NET Chat

I am trying to create a very simple chat program using UDP through a web
page. I am having problems getting this going. All the examples I've seen
deal with remoting or application variables, or web services, etc. Does
anyone have any resources to point me to (either VB.NET or C#) that explains
how to create a simple chat on a web page?

thanks.

John
Nov 18 '05 #1
3 3121
http://cutesoft.net/Default.aspx?tabindex=1&tabid=23

"John Wright" <ri***********@hotmail.com> wrote in message
news:e%****************@TK2MSFTNGP11.phx.gbl...
I am trying to create a very simple chat program using UDP through a web
page. I am having problems getting this going. All the examples I've seen deal with remoting or application variables, or web services, etc. Does
anyone have any resources to point me to (either VB.NET or C#) that explains how to create a simple chat on a web page?

thanks.

John

Nov 18 '05 #2
a web page can not use UDP. you must supply a java applet, active/x control
to do this. if you meant for the server to be a proxy for the chat client
(talking to an internet chat), then you will need to spin up background
threads that maintain the ip connections used by UDP, and set up some
communication system between the connection managers and the aspx pages.

-- bruce (sqlwork.com)
"John Wright" <ri***********@hotmail.com> wrote in message
news:e%****************@TK2MSFTNGP11.phx.gbl...
I am trying to create a very simple chat program using UDP through a web
page. I am having problems getting this going. All the examples I've seen deal with remoting or application variables, or web services, etc. Does
anyone have any resources to point me to (either VB.NET or C#) that explains how to create a simple chat on a web page?

thanks.

John

Nov 18 '05 #3
The problem with chat and the web is that the connection is not held between
page requests. There's no way to send a message to the intended recipient
unless the client requests the page by specific action of refreshing or
submitting the form.

You can hold messages in a database or even MessageQueue and update the
client on refresh or on postback or there is another way I have used.

I created a frames page, the client sends messages from one frame and in the
other frame receives all messages intended for him. The page for the
incoming messages frame is created with a class derived from IHttpHandler
and IRequiresSessionState. I use a timer and a loop to keep the response
object from completing so the connection between the client and server
remains open and messages can be sent to the client as required. To prevent
client timeouts, I Response.Write and empty string every minute.

Another great chat starting point, and the starting point from which I
developed a full function encrypted WindowsForms client/server chat system,
is the DelegatesAndEvents example in the samples provided with the
framework.

There's also a TcpUdp chat example in the framework samples but I don't like
it as much as the DelegatesAndEvents sample.

Dale Preston
MCAD, MCSE, MCDBA

"John Wright" <ri***********@hotmail.com> wrote in message
news:e#**************@TK2MSFTNGP11.phx.gbl...
I am trying to create a very simple chat program using UDP through a web
page. I am having problems getting this going. All the examples I've seen deal with remoting or application variables, or web services, etc. Does
anyone have any resources to point me to (either VB.NET or C#) that explains how to create a simple chat on a web page?

thanks.

John

Nov 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Savas Ates | last post: by
3 posts views Thread by A | last post: by
The1corrupted
reply views Thread by The1corrupted | last post: by
oll3i
1 post views Thread by oll3i | last post: by
oll3i
1 post views Thread by oll3i | last post: by
4 posts views Thread by Gandalf | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Marylou17 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.