473,385 Members | 1,693 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,385 software developers and data experts.

Slow opening socket on ASP with multihomed machine

This is a cross-post from the .NET group since it looks like it may not be
..NET.

New information since the original post is that is the wireless network is
enabled and connected the socket connect time is 4x longer! Disable wireless
and it is back down to just very slow.

Any ideas are appreciated.

-----
I have an ASP.NET app that has very slow connect times using TCPClient, or
the Socket class, or even calling a COM object that uses C socket calls on
certain similar XP SP2 boxes.

On those boxes, if another connection is made within a couple seconds, it is
fast. Running the same C# code in a console app connects instantly.
Unplugging the network cable allows localhost connections to be instant (?!).
Running the same ASP.NET app on W2K or another XP Pro SP2 box is instant, so
it comes down to being ASP.NET on XP Pro on certain boxes. I've includes the
test results and programs. The boxes with the problems are laptops. Is it
an ASP.NET config issue? XP SP2 Security issue? Any ideas/help is greatly
appreciated.

Jim W

Test results:
XPPro ASP to Remote server
First took 6 seconds
Short sleep 1 took 0 seconds
Short sleep 2 took 0 seconds
Long sleep 1 took 4 seconds
Med sleep 2 took 0 seconds

XPPro ASP to Localhost with network connection
First took 6 seconds
Short sleep 1 took 0 seconds
Short sleep 2 took 0 seconds
Long sleep 1 took 4 seconds
Mec sleep 2 took 4 seconds

XPPro ASP to Localhost unplugged
First took 0 seconds
Short sleep 1 took 0 seconds
Short sleep 2 took 0 seconds
Long sleep 1 took 0 seconds
Med sleep 2 took 0 seconds

XPPro .NET console app to localhost, or remote
First took 0 seconds
Short sleep 1 took 0 seconds
Short sleep 2 took 0 seconds
Long sleep 1 took 0 seconds
Med sleep 2 took 0 seconds

W2K Server to local host, or remote
First took 0 seconds
Short sleep 1 took 0 seconds
Short sleep 2 took 0 seconds
Long sleep 1 took 0 seconds
Med sleep 2 took 0 seconds

Pertinent ASP.NET code behind:
....
private void RunTests_Click(object sender, System.EventArgs e)
{
Output.Text = Tester.RunTests( HostName.Text, "<br>" );
}

Pertinent .NET console app code.
....
static void Main(string[] args)
{
System.Console.WriteLine( SocketTest.Tester.RunTests( args[0], "\n" ) );
}

The tester called by ASP.NET and a .NET console app:

using System;
using System.Net;
using System.Net.Sockets;

namespace SocketTest
{
public class Tester
{
public Tester() {}

public static string RunTests( string server, string eol )
{
string ret = RunTest( server, "First ", eol );

System.Threading.Thread.Sleep( 100 );

ret += RunTest( server, "Short sleep 1", eol );

System.Threading.Thread.Sleep( 100 );

ret += RunTest( server, "Short sleep 2", eol );

System.Threading.Thread.Sleep( 10000 );

ret += RunTest( server, "Long sleep 1", eol );

System.Threading.Thread.Sleep( 5000 );

ret += RunTest( server, "Med sleep 2", eol );

return ret;
}

static string RunTest( string server, string prefix, string eol )
{
DateTime start = DateTime.Now;
TcpClient conn = new TcpClient( server, 80 );
TimeSpan span = DateTime.Now - start;
conn.Close();

return prefix + " took " + span.Seconds + " seconds " + eol;
}
}
}

Jul 19 '05 #1
2 2069
Jim,

I think this has less to do with ASP/ASP.NET, and more with sockets/Wireless
access. Perhaps you can post this as a "sockets issue" to WinXP newsgroups.

--
Manohar Kamath
Editor, .netWire
www.dotnetwire.com
"Jim W" <Ji**@discussions.microsoft.com> wrote in message
news:F5**********************************@microsof t.com...
This is a cross-post from the .NET group since it looks like it may not be
.NET.

New information since the original post is that is the wireless network is
enabled and connected the socket connect time is 4x longer! Disable wireless and it is back down to just very slow.

Any ideas are appreciated.

-----
I have an ASP.NET app that has very slow connect times using TCPClient, or
the Socket class, or even calling a COM object that uses C socket calls on
certain similar XP SP2 boxes.

On those boxes, if another connection is made within a couple seconds, it is fast. Running the same C# code in a console app connects instantly.
Unplugging the network cable allows localhost connections to be instant (?!).

Running the same ASP.NET app on W2K or another XP Pro SP2 box is instant, so it comes down to being ASP.NET on XP Pro on certain boxes. I've includes the test results and programs. The boxes with the problems are laptops. Is it an ASP.NET config issue? XP SP2 Security issue? Any ideas/help is greatly appreciated.

Jim W

Test results:
XPPro ASP to Remote server
First took 6 seconds
Short sleep 1 took 0 seconds
Short sleep 2 took 0 seconds
Long sleep 1 took 4 seconds
Med sleep 2 took 0 seconds

XPPro ASP to Localhost with network connection
First took 6 seconds
Short sleep 1 took 0 seconds
Short sleep 2 took 0 seconds
Long sleep 1 took 4 seconds
Mec sleep 2 took 4 seconds

XPPro ASP to Localhost unplugged
First took 0 seconds
Short sleep 1 took 0 seconds
Short sleep 2 took 0 seconds
Long sleep 1 took 0 seconds
Med sleep 2 took 0 seconds

XPPro .NET console app to localhost, or remote
First took 0 seconds
Short sleep 1 took 0 seconds
Short sleep 2 took 0 seconds
Long sleep 1 took 0 seconds
Med sleep 2 took 0 seconds

W2K Server to local host, or remote
First took 0 seconds
Short sleep 1 took 0 seconds
Short sleep 2 took 0 seconds
Long sleep 1 took 0 seconds
Med sleep 2 took 0 seconds

Pertinent ASP.NET code behind:
...
private void RunTests_Click(object sender, System.EventArgs e)
{
Output.Text = Tester.RunTests( HostName.Text, "<br>" );
}

Pertinent .NET console app code.
...
static void Main(string[] args)
{
System.Console.WriteLine( SocketTest.Tester.RunTests( args[0], "\n" ) );
}

The tester called by ASP.NET and a .NET console app:

using System;
using System.Net;
using System.Net.Sockets;

namespace SocketTest
{
public class Tester
{
public Tester() {}

public static string RunTests( string server, string eol )
{
string ret = RunTest( server, "First ", eol );

System.Threading.Thread.Sleep( 100 );

ret += RunTest( server, "Short sleep 1", eol );

System.Threading.Thread.Sleep( 100 );

ret += RunTest( server, "Short sleep 2", eol );

System.Threading.Thread.Sleep( 10000 );

ret += RunTest( server, "Long sleep 1", eol );

System.Threading.Thread.Sleep( 5000 );

ret += RunTest( server, "Med sleep 2", eol );

return ret;
}

static string RunTest( string server, string prefix, string eol )
{
DateTime start = DateTime.Now;
TcpClient conn = new TcpClient( server, 80 );
TimeSpan span = DateTime.Now - start;
conn.Close();

return prefix + " took " + span.Seconds + " seconds " + eol;
}
}
}


Jul 19 '05 #2
I had the same issue. I never expected that it was my data in few
dropdowns causing this delay. On the server running as localhost its
super fast but when run on a client, it takes some time for the data
to transfer over to it and hence the dealy.

Sekhar.

"Jim W" <Ji**@discussions.microsoft.com> wrote in message news:<F5**********************************@microso ft.com>...
This is a cross-post from the .NET group since it looks like it may not be
.NET.

New information since the original post is that is the wireless network is
enabled and connected the socket connect time is 4x longer! Disable wireless
and it is back down to just very slow.

Any ideas are appreciated.

-----
I have an ASP.NET app that has very slow connect times using TCPClient, or
the Socket class, or even calling a COM object that uses C socket calls on
certain similar XP SP2 boxes.

On those boxes, if another connection is made within a couple seconds, it is
fast. Running the same C# code in a console app connects instantly.
Unplugging the network cable allows localhost connections to be instant (?!).
Running the same ASP.NET app on W2K or another XP Pro SP2 box is instant, so
it comes down to being ASP.NET on XP Pro on certain boxes. I've includes the
test results and programs. The boxes with the problems are laptops. Is it
an ASP.NET config issue? XP SP2 Security issue? Any ideas/help is greatly
appreciated.

Jim W

Test results:
XPPro ASP to Remote server
First took 6 seconds
Short sleep 1 took 0 seconds
Short sleep 2 took 0 seconds
Long sleep 1 took 4 seconds
Med sleep 2 took 0 seconds

XPPro ASP to Localhost with network connection
First took 6 seconds
Short sleep 1 took 0 seconds
Short sleep 2 took 0 seconds
Long sleep 1 took 4 seconds
Mec sleep 2 took 4 seconds

XPPro ASP to Localhost unplugged
First took 0 seconds
Short sleep 1 took 0 seconds
Short sleep 2 took 0 seconds
Long sleep 1 took 0 seconds
Med sleep 2 took 0 seconds

XPPro .NET console app to localhost, or remote
First took 0 seconds
Short sleep 1 took 0 seconds
Short sleep 2 took 0 seconds
Long sleep 1 took 0 seconds
Med sleep 2 took 0 seconds

W2K Server to local host, or remote
First took 0 seconds
Short sleep 1 took 0 seconds
Short sleep 2 took 0 seconds
Long sleep 1 took 0 seconds
Med sleep 2 took 0 seconds

Pertinent ASP.NET code behind:
...
private void RunTests_Click(object sender, System.EventArgs e)
{
Output.Text = Tester.RunTests( HostName.Text, "<br>" );
}

Pertinent .NET console app code.
...
static void Main(string[] args)
{
System.Console.WriteLine( SocketTest.Tester.RunTests( args[0], "\n" ) );
}

The tester called by ASP.NET and a .NET console app:

using System;
using System.Net;
using System.Net.Sockets;

namespace SocketTest
{
public class Tester
{
public Tester() {}

public static string RunTests( string server, string eol )
{
string ret = RunTest( server, "First ", eol );

System.Threading.Thread.Sleep( 100 );

ret += RunTest( server, "Short sleep 1", eol );

System.Threading.Thread.Sleep( 100 );

ret += RunTest( server, "Short sleep 2", eol );

System.Threading.Thread.Sleep( 10000 );

ret += RunTest( server, "Long sleep 1", eol );

System.Threading.Thread.Sleep( 5000 );

ret += RunTest( server, "Med sleep 2", eol );

return ret;
}

static string RunTest( string server, string prefix, string eol )
{
DateTime start = DateTime.Now;
TcpClient conn = new TcpClient( server, 80 );
TimeSpan span = DateTime.Now - start;
conn.Close();

return prefix + " took " + span.Seconds + " seconds " + eol;
}
}
}

Jul 21 '05 #3

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

Similar topics

1
by: Rami Saarinen | last post by:
I have been making a client-server type of software mainly on Linux and now I am trying to get it all work also on windows. However, I am having slight problems running the program in Windows 2000....
2
by: Martin Fuzzey | last post by:
I am using xmlrpclib (based on httplib) in Python 2.3 on Mandrake Linux. When my client attempts to connect to a server using a "http://localhost:port" style URL there is a long delay before the...
0
by: Scott | last post by:
Hi, I'm having a problem with a new machine running Mysql version 4.0.18 on the AMD64 version of Mandrake 10.0. The new machine has got 64bit AMD processor and 2GB of RAM. Nearly all...
7
by: Charles | last post by:
I have Visual Studio 6.0 stand-alone (with C++) and as part of Compaq Visual Fortran 6.6c. I am moving my development from a Win 98 SE machine w/2x 10 Gb HDD (each w/ 1Gb free), 768 Mb RAM to a...
6
by: B B | last post by:
Okay, here is what's happening: I have a reasonably fast laptop (1.4 GHz Mobile M, so comparable to 2.5GHz P4) doing .net development. Running Windows XP pro, SP2 IIS is installed and running...
2
by: ne.seri | last post by:
In short, I'm building a kind of server which is supposed to handle open connections with clients. E.g. client connects to the server, the connection stays open, client sends a request to the...
1
by: Mike Read | last post by:
Hi I'm trying to track down why the creation of socket connections on my system is taking several minutes. I initially noticed this when attempting a JDBC connection but even the simple ...
13
by: Arno R | last post by:
Hi all, I am deploying an A2k app to users with different versions of Access. Using Access 2000 the relinking on startup (on deploying a new frontend or when backend has changed) is very fast....
1
by: bruno.wouters | last post by:
Hi, I have a a
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.