473,240 Members | 1,907 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,240 software developers and data experts.

system.net.sockets connect issue

For anyone who is having this problem and want to know the

Add this line of code before your connect method call. It
loads up some config file that the code behind the scenes
needs that causes the delay when the config file is loaded
behind the scenes.

int temp = ServicePointManager.DefaultConnectionLimit;
-----Original Message-----
I am building a client server communications application,
and I need
to use sockets to provide the actual communications
channel. I have
coded the server and client, and from what I can see they
are both
working correctly.

I had to create an ActiveX user control was because the
client would
eventually be running in Internet Explorer from an object
tag on a
ASP.NET page. Then a decision was made to download
the .NET framework
to every client, so it was determined that this component
needed to be
recreated in .NET. That is when I came up with the class

The ActiveX user control, which is using Winsock, works
correctly in a
VB 6 windows application and in an ASP.NET page. When I
run the .NET
client (it is a class library) from inside a .NET windows
everything works correctly, however, when I run it from
page, or even and HTML page almost everything works. WhenI try to
connect to the server is when I have problems. The first
time I
navigate to the page and the connect code executes; the
browser seems
to lock up for around 1-2 minutes. However, if I am
tracing the
server I see that the server accepts the connection and
control back to the client as fast as the windows
application version.
So the delay occurs after the connection to the server
has already
been made. I have tried to recode this several ways and
they all give
the same result.

Here are the ways I have tried.

Inheriting from TcpClient, and executing Connect().
Instantiating an instance of TcpClient and executing
Connect() on that
Inheriting from Socket and executing Connect().
Instantiating an instance of Socket and executing Connect
() on that
Instantiating an instance of Socket and executing
BeginConnect() on
that instance.

I am just about out of ideas, if not completely out, so
any help would
be appreciated.


Jul 19 '05 #1
0 1765

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Penn Markham | last post by:
Hello all, I am writing a script where I need to use the system() function to call htpasswd. I can do this just fine on the command line...works great (see attached file, test.php). When my...
by: mattymatmat | last post by:
I've been using sockets to try and connect to ranges of IP's on port 23. I'm trying to create a network discovery program for a specific program listening on port 23. I have no problem setting up...
by: BadOmen | last post by:
Hi, What is the different between 'System.Net.Sockets.Socket' and 'System.Net.Sockets.TcpClient'? When do I use System.Net.Sockets.TcpClient and System.Net.Sockets.Socket?? Yours, Jonas
by: http://www.visual-basic-data-mining.net/forum | last post by:
Say i have declare a module for connection and two buttons... one button has the method connect() and the other has the method disconnect().... how do i actually connect after i had disconnect...
by: Steve Bottoms | last post by:
Is there any way to pass a login name/password when calling System.Web.Mail.SMTPMail? Can't find anything in the docs or KB... If not, any suggestions to get this functionality short of building...
by: Stressed Out Developer | last post by:
We have an application that has a 200 count loop that does the following: ' Each time thru the loop we pass the next IP Address is a range (aka thru Try If...
by: Kevin Sage | last post by:
For anyone who is having this problem and want to know the solution. Add this line of code before your connect method call. It loads up some config file that the code behind the scenes needs...
by: JDavis | last post by:
I am using System.Net.Sockets to connect a client socket to a server that requires three inputs when I connect: host, port and an identification number that identifies the person connecting. ...
by: larspeter | last post by:
Hi all. I have a problem with TcpClient ... I am conneting to a server with TcpClient and returning the answer through a webservice. It actully all works fine. BUT if I make a lot of...
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.