473,403 Members | 2,270 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,403 software developers and data experts.

system.net.sockets connect issue

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 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
library.

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
application
everything works correctly, however, when I run it from
and ASP.NET
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
returns
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
instance.
Inheriting from Socket and executing Connect().
Instantiating an instance of Socket and executing Connect
() on that
instance.
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 1771

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

Similar topics

9
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...
2
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...
4
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
2
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...
2
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...
2
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 192.168.4.50 thru 192.168.4.254) Try If...
0
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...
8
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. ...
1
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.