Showing posts with label app. Show all posts
Showing posts with label app. Show all posts

Wednesday, March 28, 2012

Tables and CSS

Hi,
Not sure if this is the right forum for this, but here goes:
I'm using VS.NET 2003 to create a Web app and have defined a table as
follows:
<table border=3 bordercolordark="#006699" bordercolorlight="lightgrey"
width="100%">
As I'm going to be reusing this style all over the app, I'm trying to
replace it with a style, as follows:
<table class=tblBorder>
and in my stylesheet I have the following definition:
.tblBorder
{
border-style: outset;
border-bottom-color: "#006699";
border-right-color: "#006699";
border-left-color: "lightgrey";
border-top-color: "lightgrey";
border-width: 3;
}
But it doesn't look right. I'm obviously missing something...
Any assistance gratefully received.
Mark RaeHi Mark,
You aren't missing anything. The bordercolorlight and bordercolordark are
rendered differently than CSS styles are so things may not look the same
when applied differently. Also, border in the <table> tag is expressed
differently than border-width is in CSS (border-width in CSS can take
different measurement units including pt, px, em, etc). You will have to toy
around with your CSS settings to get them closer to what the browser
actually renders if those values were supplied in the tag.
HTH
Kyril Magnos
Question of the day:
What is Mono?
A) Disease where the lymph nodes become swollen.
B) A single sound
C) A synonym for one
D) A port of .NET meant to royally irritate MSFT
E) All of the above.
"Mark Rae" <mark@.mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:%23JEFeE3aEHA.3512@.TK2MSFTNGP12.phx.gbl...
| Hi,
|
| Not sure if this is the right forum for this, but here goes:
|
| I'm using VS.NET 2003 to create a Web app and have defined a table as
| follows:
|
| <table border=3 bordercolordark="#006699" bordercolorlight="lightgrey"
| width="100%">
|
| As I'm going to be reusing this style all over the app, I'm trying to
| replace it with a style, as follows:
|
| <table class=tblBorder>
|
| and in my stylesheet I have the following definition:
|
| .tblBorder
| {
| border-style: outset;
| border-bottom-color: "#006699";
| border-right-color: "#006699";
| border-left-color: "lightgrey";
| border-top-color: "lightgrey";
| border-width: 3;
| }
|
| But it doesn't look right. I'm obviously missing something...
|
| Any assistance gratefully received.
|
| Mark Rae
|
|
"Kyril Magnos" <kyril.magnos@.yahoo.com> wrote in message
news:eHTGrL3aEHA.4048@.TK2MSFTNGP10.phx.gbl...

> Hi Mark,
> You aren't missing anything. The bordercolorlight and bordercolordark are
> rendered differently than CSS styles are so things may not look the same
> when applied differently. Also, border in the <table> tag is expressed
> differently than border-width is in CSS (border-width in CSS can take
> different measurement units including pt, px, em, etc). You will have to
toy
> around with your CSS settings to get them closer to what the browser
> actually renders if those values were supplied in the tag.
OK - thanks for the reply.
Check out
http://www.somacon.com/color/html_c...rder_styles.php
Alphonse Giambrone
Email: a-giam at customdatasolutions dot us
"Mark Rae" <mark@.mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:%23JEFeE3aEHA.3512@.TK2MSFTNGP12.phx.gbl...
> Hi,
> Not sure if this is the right forum for this, but here goes:
> I'm using VS.NET 2003 to create a Web app and have defined a table as
> follows:
> <table border=3 bordercolordark="#006699" bordercolorlight="lightgrey"
> width="100%">
> As I'm going to be reusing this style all over the app, I'm trying to
> replace it with a style, as follows:
> <table class=tblBorder>
> and in my stylesheet I have the following definition:
> .tblBorder
> {
> border-style: outset;
> border-bottom-color: "#006699";
> border-right-color: "#006699";
> border-left-color: "lightgrey";
> border-top-color: "lightgrey";
> border-width: 3;
> }
> But it doesn't look right. I'm obviously missing something...
> Any assistance gratefully received.
> Mark Rae
>
"Alphonse Giambrone" <NOSPAMa-giam@.example.invalid> wrote in message
news:emevqZ4aEHA.2056@.TK2MSFTNGP12.phx.gbl...
> Check out
> http://www.somacon.com/color/html_c...rder_styles.php
A useful link - thanks very much.

Tables and CSS

Hi,

Not sure if this is the right forum for this, but here goes:

I'm using VS.NET 2003 to create a Web app and have defined a table as
follows:

<table border=3 bordercolordark="#006699" bordercolorlight="lightgrey"
width="100%"
As I'm going to be reusing this style all over the app, I'm trying to
replace it with a style, as follows:

<table class=tblBorder
and in my stylesheet I have the following definition:

..tblBorder
{
border-style: outset;
border-bottom-color: "#006699";
border-right-color: "#006699";
border-left-color: "lightgrey";
border-top-color: "lightgrey";
border-width: 3;
}

But it doesn't look right. I'm obviously missing something...

Any assistance gratefully received.

Mark RaeHi Mark,

You aren't missing anything. The bordercolorlight and bordercolordark are
rendered differently than CSS styles are so things may not look the same
when applied differently. Also, border in the <table> tag is expressed
differently than border-width is in CSS (border-width in CSS can take
different measurement units including pt, px, em, etc). You will have to toy
around with your CSS settings to get them closer to what the browser
actually renders if those values were supplied in the tag.

--
HTH

Kyril Magnos

Question of the day:
What is Mono?
A) Disease where the lymph nodes become swollen.
B) A single sound
C) A synonym for one
D) A port of .NET meant to royally irritate MSFT
E) All of the above.

"Mark Rae" <mark@.mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:%23JEFeE3aEHA.3512@.TK2MSFTNGP12.phx.gbl...
| Hi,
|
| Not sure if this is the right forum for this, but here goes:
|
| I'm using VS.NET 2003 to create a Web app and have defined a table as
| follows:
|
| <table border=3 bordercolordark="#006699" bordercolorlight="lightgrey"
| width="100%">
|
| As I'm going to be reusing this style all over the app, I'm trying to
| replace it with a style, as follows:
|
| <table class=tblBorder>
|
| and in my stylesheet I have the following definition:
|
| .tblBorder
| {
| border-style: outset;
| border-bottom-color: "#006699";
| border-right-color: "#006699";
| border-left-color: "lightgrey";
| border-top-color: "lightgrey";
| border-width: 3;
| }
|
| But it doesn't look right. I'm obviously missing something...
|
| Any assistance gratefully received.
|
| Mark Rae
|
|
"Kyril Magnos" <kyril.magnos@.yahoo.com> wrote in message
news:eHTGrL3aEHA.4048@.TK2MSFTNGP10.phx.gbl...

> Hi Mark,
> You aren't missing anything. The bordercolorlight and bordercolordark are
> rendered differently than CSS styles are so things may not look the same
> when applied differently. Also, border in the <table> tag is expressed
> differently than border-width is in CSS (border-width in CSS can take
> different measurement units including pt, px, em, etc). You will have to
toy
> around with your CSS settings to get them closer to what the browser
> actually renders if those values were supplied in the tag.

OK - thanks for the reply.
Check out
http://www.somacon.com/color/html_c...rder_styles.php

--

Alphonse Giambrone
Email: a-giam at customdatasolutions dot us

"Mark Rae" <mark@.mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:%23JEFeE3aEHA.3512@.TK2MSFTNGP12.phx.gbl...
> Hi,
> Not sure if this is the right forum for this, but here goes:
> I'm using VS.NET 2003 to create a Web app and have defined a table as
> follows:
> <table border=3 bordercolordark="#006699" bordercolorlight="lightgrey"
> width="100%">
> As I'm going to be reusing this style all over the app, I'm trying to
> replace it with a style, as follows:
> <table class=tblBorder>
> and in my stylesheet I have the following definition:
> .tblBorder
> {
> border-style: outset;
> border-bottom-color: "#006699";
> border-right-color: "#006699";
> border-left-color: "lightgrey";
> border-top-color: "lightgrey";
> border-width: 3;
> }
> But it doesn't look right. I'm obviously missing something...
> Any assistance gratefully received.
> Mark Rae
"Alphonse Giambrone" <NOSPAMa-giam@.example.invalid> wrote in message
news:emevqZ4aEHA.2056@.TK2MSFTNGP12.phx.gbl...
> Check out
> http://www.somacon.com/color/html_c...rder_styles.php

A useful link - thanks very much.

Monday, March 26, 2012

tabs

I'm creating a "portal" type web app and i want to use a "tab" appearance fo
r
navigation. How can i create a "tab" look navigation system for my portal?Mike,
Funny you ask...I am working on a similar project. Follow my thread
directly below yours at
http://msdn.microsoft.com/newsgroup...t&lang=en&cr=US
"Mike" wrote:

> I'm creating a "portal" type web app and i want to use a "tab" appearance
for
> navigation. How can i create a "tab" look navigation system for my portal
?
>
I too am writing an application with tabs. Wrote mine "by hand" - some HTML
in a user control, and pass a variable to the UC with the current tab. Bit
basic I know but it does the job :o)
"Chris Fink" wrote:
> Mike,
> Funny you ask...I am working on a similar project. Follow my thread
> directly below yours at
> http://msdn.microsoft.com/newsgroup...t&lang=en&cr=US
> "Mike" wrote:
>
One way would be to investigate a prebuilt tab control to see if it
offers the functionality you need (and if it includes source, you can
make modifications).
One place to look would be the IE WebControl gallery on asp.net:
http://www.asp.net/ControlGallery/d...y=38&tabindex=2
HTH,
Scott
http://www.OdeToCode.com/blogs/scott/
On Fri, 15 Oct 2004 07:03:33 -0700, "Chris Fink"
<ChrisFink@.discussions.microsoft.com> wrote:
>Mike,
>Funny you ask...I am working on a similar project. Follow my thread
>directly below yours at
>http://msdn.microsoft.com/newsgroup...t&lang=en&cr=US
>"Mike" wrote:
>
Not exactly tabs per se but I accomplished this by using buttons (!).
I put them all right next to each other in a user control, added a
method that changes the active tab and then used CSS to differentiate
(I basically made the button's bottom border go away and made its
background color the same as the page's and bolded the text so it looks
pretty much like a tab, even though it's just a button). The non-active
'tabs' have a totally different background and have all their borders.
It works, even though it may not be perfect.
James
Mike wrote:

> I'm creating a "portal" type web app and i want to use a "tab"
> appearance for navigation. How can i create a "tab" look navigation
> system for my portal?
Hmm.. never gave that one a thought! Guess that's my ASP roots coming throug
h
:)
Another way of doing the tabs might be to use the Tab control that comes
with the IEControls thingy from ASP.NET - don't know if that's the link that
Steve gave - haven't checked.
"James Thomas" wrote:

> Not exactly tabs per se but I accomplished this by using buttons (!).
> I put them all right next to each other in a user control, added a
> method that changes the active tab and then used CSS to differentiate
> (I basically made the button's bottom border go away and made its
> background color the same as the page's and bolded the text so it looks
> pretty much like a tab, even though it's just a button). The non-active
> 'tabs' have a totally different background and have all their borders.
> It works, even though it may not be perfect.
> James
> Mike wrote:
>
>
The only problem with the IE Tab control is that it's not cross-browser
compatible - of course, if that's not what you're striving for, then it
doesn't matter. :)
James
Dan Nash wrote:
> Hmm.. never gave that one a thought! Guess that's my ASP roots coming
> through :)
> Another way of doing the tabs might be to use the Tab control that
> comes with the IEControls thingy from ASP.NET - don't know if that's
> the link that Steve gave - haven't checked.
>
> "James Thomas" wrote:
>

tabs

I'm creating a "portal" type web app and i want to use a "tab" appearance for
navigation. How can i create a "tab" look navigation system for my portal?Mike,

Funny you ask...I am working on a similar project. Follow my thread
directly below yours at

http://msdn.microsoft.com/newsgroup...t&lang=en&cr=US

"Mike" wrote:

> I'm creating a "portal" type web app and i want to use a "tab" appearance for
> navigation. How can i create a "tab" look navigation system for my portal?
>
I too am writing an application with tabs. Wrote mine "by hand" - some HTML
in a user control, and pass a variable to the UC with the current tab. Bit
basic I know but it does the job :o)

"Chris Fink" wrote:

> Mike,
> Funny you ask...I am working on a similar project. Follow my thread
> directly below yours at
> http://msdn.microsoft.com/newsgroup...t&lang=en&cr=US
> "Mike" wrote:
> > I'm creating a "portal" type web app and i want to use a "tab" appearance for
> > navigation. How can i create a "tab" look navigation system for my portal?
One way would be to investigate a prebuilt tab control to see if it
offers the functionality you need (and if it includes source, you can
make modifications).

One place to look would be the IE WebControl gallery on asp.net:
http://www.asp.net/ControlGallery/d...y=38&tabindex=2

HTH,

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Fri, 15 Oct 2004 07:03:33 -0700, "Chris Fink"
<ChrisFink@.discussions.microsoft.com> wrote:

>Mike,
>Funny you ask...I am working on a similar project. Follow my thread
>directly below yours at
>http://msdn.microsoft.com/newsgroup...t&lang=en&cr=US
>"Mike" wrote:
>> I'm creating a "portal" type web app and i want to use a "tab" appearance for
>> navigation. How can i create a "tab" look navigation system for my portal?
>>
>
Not exactly tabs per se but I accomplished this by using buttons (!).

I put them all right next to each other in a user control, added a
method that changes the active tab and then used CSS to differentiate
(I basically made the button's bottom border go away and made its
background color the same as the page's and bolded the text so it looks
pretty much like a tab, even though it's just a button). The non-active
'tabs' have a totally different background and have all their borders.

It works, even though it may not be perfect.

James

Mike wrote:

> I'm creating a "portal" type web app and i want to use a "tab"
> appearance for navigation. How can i create a "tab" look navigation
> system for my portal?
Hmm.. never gave that one a thought! Guess that's my ASP roots coming through
:)

Another way of doing the tabs might be to use the Tab control that comes
with the IEControls thingy from ASP.NET - don't know if that's the link that
Steve gave - haven't checked.

"James Thomas" wrote:

> Not exactly tabs per se but I accomplished this by using buttons (!).
> I put them all right next to each other in a user control, added a
> method that changes the active tab and then used CSS to differentiate
> (I basically made the button's bottom border go away and made its
> background color the same as the page's and bolded the text so it looks
> pretty much like a tab, even though it's just a button). The non-active
> 'tabs' have a totally different background and have all their borders.
> It works, even though it may not be perfect.
> James
> Mike wrote:
> > I'm creating a "portal" type web app and i want to use a "tab"
> > appearance for navigation. How can i create a "tab" look navigation
> > system for my portal?
>
The only problem with the IE Tab control is that it's not cross-browser
compatible - of course, if that's not what you're striving for, then it
doesn't matter. :)

James

Dan Nash wrote:

> Hmm.. never gave that one a thought! Guess that's my ASP roots coming
> through :)
> Another way of doing the tabs might be to use the Tab control that
> comes with the IEControls thingy from ASP.NET - don't know if that's
> the link that Steve gave - haven't checked.
>
> "James Thomas" wrote:
> > Not exactly tabs per se but I accomplished this by using buttons
> > (!).
> > I put them all right next to each other in a user control, added a
> > method that changes the active tab and then used CSS to
> > differentiate (I basically made the button's bottom border go away
> > and made its background color the same as the page's and bolded the
> > text so it looks pretty much like a tab, even though it's just a
> > button). The non-active 'tabs' have a totally different background
> > and have all their borders.
> > It works, even though it may not be perfect.
> > James
> > Mike wrote:
> > > I'm creating a "portal" type web app and i want to use a "tab"
> > > appearance for navigation. How can i create a "tab" look
> > > navigation system for my portal?

tabs and line breaks lost in Outlook Express

Hi, Folks --

Not sure this is the right forum for this, but I thought I'd try.

I'm sending out emails from my ASP.NET app using the SmtpClient and MailMessage classes. Easy as pie to do this, but the problem is that the \t and \r characters that I include in the MailMessage body are ignored in Outlook Express, so I end up with a big blob of text.

This problem does not occur in Lotus Notes or when I view the emails on the Web.

Any suggestions are greatly appreciated.

Thanks,

Eric

I know outlook express automatically removes extra line breaks from messages. I'm not sure if thats what your encountering.

I'm assuming because your using \t and \r that you arent doing an html body message...is that a possibility or no?

You can try instead of using the \t and \r to use the Chr(13) and chr(20) ASCII designation for whatever language your using, unfortunatly if your using a string literal you may end up with that printed in your message.


Thanks, F.

Using \n instead of \r solved the line break problem in Outlook Express. (I still have to check this in Lotus Notes, but I don't anticipate a problem.)

I also ended up specifying:

message.BodyEncoding = System.Text.

Encoding.UTF8;

for good measure, even though this wasn't necessary for the line break issue.

As for the tabs, could not get them to work, but I'm going to avoid these anyway because the number of spaces rendered per tab is a pain to try to adjust.

Eric

Tuesday, March 13, 2012

TCPClient App Question

I wonder if anyone could give me a suggestion on how to best handle this
scenario.
I wish to have an aspx page contact a server and receive messages.
Initially, a login messge is sent, then after being validated, a second
message is sent which contains data to complete a stock market trade. The
server then should respond not only once, but with several return messages.
So far all I have found are examples that send, receive, and disconnect,
which I have working. However, since all returning data to the client should
be in response to the order submitted, I cannot simply continue to resend
the original data for the trade. I need to keep the connection open and the
grab all incoming messages until the client quits.
Could anyone suggest how I should modfy the following code to keep the
connection open and continue to rceive subsequent messages?
static void Connect(String server, String message)
{
try
{
// Create a TcpClient.
// Note, for this client to work you need to have a TcpServer
// connected to the same address as specified by the server, port
// combination.
Int32 port = 13000;
TcpClient client = new TcpClient(server, port);
// Translate the passed message into ASCII and store it as a Byte array.
Byte[] data = System.Text.Encoding.ASCII.GetBytes(message);
// Get a client stream for reading and writing.
// Stream stream = client.GetStream();
NetworkStream stream = client.GetStream();
// Send the message to the connected TcpServer.
stream.Write(data, 0, data.Length);
Console.WriteLine("Sent: {0}", message);
// Receive the TcpServer.response.
// Buffer to store the response bytes.
data = new Byte[256];
// String to store the response ASCII representation.
String responseData = String.Empty;
// Read the first batch of the TcpServer response bytes.
Int32 bytes = stream.Read(data, 0, data.Length);
responseData = System.Text.Encoding.ASCII.GetString(data, 0, bytes);
Console.WriteLine("Received: {0}", responseData);
// Close everything.
client.Close();
}
catch (ArgumentNullException e)
{
Console.WriteLine("ArgumentNullException: {0}", e);
}
catch (SocketException e)
{
Console.WriteLine("SocketException: {0}", e);
}
Console.WriteLine("\n Press Enter to continue...");
Console.Read();
}try doing something like this:
while(true)
{
NetworkStream stream = client.GetStream();
...
...
...
Console.WriteLine("Received: {0}", responseData);
}
client.Close();

TCPClient connect slow only on XP Pro ASP on some boxes

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;
}
}
}most likely you proxy server setting don't exclude localhost.

-- bruce (sqlwork.com)

"Jim W" <JimW@.discussions.microsoft.com> wrote in message
news:5F733251-4CAF-4EF9-98AA-0CA14F103854@.microsoft.com...
> 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;
> }
> }
> }
Tx for the reply. I can't find any IIS proxy settings, can you give some
details? I'm not using a proxy in the IE settings. I did try turning the
proxy on, and excluded localhost, and it still is slow.

"bruce barker" wrote:

> most likely you proxy server setting don't exclude localhost.
> -- bruce (sqlwork.com)
New information. The slow computers have a gigbit network and wireless. If
the network cable is attached, *and* wireless is connected, the connect time
goes from 6 seconds (with just the network) to 27 seconds!
Jim,

We're experiencing (in a somewhat different context) the exactsame problem. We're as clueless as you seem to be. I can'treally relate to the suggestion that your proxy settings mighthave something to do with it, but who knows. Have you made anyprogress towards resolution since you posted your question?

Andre

> I have an ASP.NET app that has very slow connect times usingTCPClient, or
> the Socket class, or even calling a COM object that uses Csocket calls on
> certain similar XP SP2 boxes.
> On those boxes, if another connection is made within a coupleseconds, it is
> fast. Running the same C# code in a console app connectsinstantly.
> Unplugging the network cable allows localhost connections to beinstant (?!).
>
> Running the same ASP.NET app on W2K or another XP Pro SP2 boxis 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 arelaptops. Is it
> an ASP.NET config issue? XP SP2 Security issue? Anyideas/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, stringeol )
> {
> DateTime start = DateTime.Now;
> TcpClient conn = new TcpClient( server, 80 );
> TimeSpan span = DateTime.Now - start;
> conn.Close();
> return prefix + " took " + span.Seconds + " seconds " +eol;
> }
> }
> }
User submitted from AEWNET (http://www.aewnet.com/)
No, I haven't found a solution. On the production machines, which are not
multihomed, it is not an issue, but it's on my todo list.

I will post if I find a solution. Please post if you find one.

"Andre de Lange" wrote:

> Jim,
> We're experiencing (in a somewhat different context) the exact same problem. We're as clueless as you seem to be. I can't really relate to the suggestion that your proxy settings might have something to do with it, but who knows. Have you made any progress towards resolution since you posted your question?
> Andre

TCPClient connect slow only on XP Pro ASP on some boxes

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 th
e
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;
}
}
}most likely you proxy server setting don't exclude localhost.
-- bruce (sqlwork.com)
"Jim W" <JimW@.discussions.microsoft.com> wrote in message
news:5F733251-4CAF-4EF9-98AA-0CA14F103854@.microsoft.com...
> 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;
> }
> }
> }
>
Tx for the reply. I can't find any IIS proxy settings, can you give some
details? I'm not using a proxy in the IE settings. I did try turning the
proxy on, and excluded localhost, and it still is slow.
"bruce barker" wrote:

> most likely you proxy server setting don't exclude localhost.
> -- bruce (sqlwork.com)
>
New information. The slow computers have a gigbit network and wireless. If
the network cable is attached, *and* wireless is connected, the connect time
goes from 6 seconds (with just the network) to 27 seconds!
Jim,
We're experiencing (in a somewhat different context) the exact=
same problem. We're as clueless as you seem to be. I can't=
really relate to the suggestion that your proxy settings might=
have something to do with it, but who knows. Have you made any=
progress towards resolution since you posted your question?
Andre

> 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 =09
> Pertinent ASP.NET code behind:
> ...
> private void RunTests_Click(object sender, System.EventArgs e)
> {
> =09Output.Text =3D Tester.RunTests( HostName.Text, "<br>" );
> }
> Pertinent .NET console app code.
> ...
> static void Main(string[] args)
> {
> =09System.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
> {
> =09public class Tester
> =09{
> =09=09public Tester() {}
> =09=09public static string RunTests( string server, string eol )
> =09=09{
> =09=09=09string ret =3D RunTest( server, "First ", eol );
> =09=09=09System.Threading.Thread.Sleep( 100 );
> =09=09=09
> =09=09=09ret +=3D RunTest( server, "Short sleep 1", eol );
> =09=09=09System.Threading.Thread.Sleep( 100 );
> =09=09=09
> =09=09=09ret +=3D RunTest( server, "Short sleep 2", eol );
> =09=09=09System.Threading.Thread.Sleep( 10000 );
> =09=09=09
> =09=09=09ret +=3D RunTest( server, "Long sleep 1", eol );
> =09=09=09System.Threading.Thread.Sleep( 5000 );
> =09=09=09
> =09=09=09ret +=3D RunTest( server, "Med sleep 2", eol );
> =09=09=09return ret;
> =09=09}
> =09=09static string RunTest( string server, string prefix, string=
eol )
> =09=09{
> =09=09=09DateTime start =3D DateTime.Now;
> =09=09=09TcpClient conn =3D new TcpClient( server, 80 );
> =09=09=09TimeSpan span =3D DateTime.Now - start;
> =09=09=09conn.Close();
> =09=09=09return prefix + " took " + span.Seconds + " seconds " +=
eol;
> =09=09}
> =09}
> }
>
User submitted from AEWNET (http://www.aewnet.com/)
No, I haven't found a solution. On the production machines, which are not
multihomed, it is not an issue, but it's on my todo list.
I will post if I find a solution. Please post if you find one.
"Andre de Lange" wrote:

> Jim,
> We're experiencing (in a somewhat different context) the exact same problem. We're
as clueless as you seem to be. I can't really relate to the suggestion that your pr
oxy settings might have something to do with it, but who knows. Have you made any pr
ogr
ess towards resolution since you posted your question?
> Andre