G
Guest
I have a problem with TCP connections from controls embedded in HTML pages.
The client-application is a (.NET) usercontrol embedded in an HTML page (viewed using IE).
When the client calls:
Dim client As New System.Net.Sockets.TcpClient(_hostname, _port)
while at the same time the server calls:
i = stream.Read(bytes, 0, bytes.Length)
it takes _exactly_ 100 seconds the first time – subsequent calls are immediate.
It looks like it’s a timeout – but of what?!? – after all: I get the correct result; no problem there. Using TDImon fra SysInternals I can se that at the first (and very slow) communication, IE initially communicates at port 80 - but I havn't got a clue why. I have wondered whether it could be a DNS error, but the host I communicate to is localhost so I think that would be a rather strange reason. The problem has been verified in different organisations using several independently installed PC's.
When the client control is placed in a winform instead of in a HTML page, there is no performance problem at all.
I have a small, clean and to the point VS-solution which demonstrates the problem if anybody is interested. It consists of the control project, a winforms client, a html page and a tcp-server project.
I am sure that this is expected behaviour – just no for me or anyone that has looked at it… ;^(
Regards
Henrik
The client-application is a (.NET) usercontrol embedded in an HTML page (viewed using IE).
When the client calls:
Dim client As New System.Net.Sockets.TcpClient(_hostname, _port)
while at the same time the server calls:
i = stream.Read(bytes, 0, bytes.Length)
it takes _exactly_ 100 seconds the first time – subsequent calls are immediate.
It looks like it’s a timeout – but of what?!? – after all: I get the correct result; no problem there. Using TDImon fra SysInternals I can se that at the first (and very slow) communication, IE initially communicates at port 80 - but I havn't got a clue why. I have wondered whether it could be a DNS error, but the host I communicate to is localhost so I think that would be a rather strange reason. The problem has been verified in different organisations using several independently installed PC's.
When the client control is placed in a winform instead of in a HTML page, there is no performance problem at all.
I have a small, clean and to the point VS-solution which demonstrates the problem if anybody is interested. It consists of the control project, a winforms client, a html page and a tcp-server project.
I am sure that this is expected behaviour – just no for me or anyone that has looked at it… ;^(
Regards
Henrik