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

Initial Client Delay with DHCP

I have converted a .Net 1.0 application to .Net 2.0 and the web service
invocations have delay of around 10seconds on each intial access. After the
first access subsequent access are fast (After a whild of inactivity the next
access will be slow agian). Changing the client to static IP address instead
of DHCP makes the initial access about 1 second which is fine.

Monitoring the network of the client computer the cleint is sending out 2
DHCP Inform broadcast messages during the inital pause.

Single stepping the code the code hangs at the Begin Async call (.net 1.0
style) or [FuncName]Async() call.

Client at WindowsXP computers that are members of a Windows NT 4.0 Domain.

Here is a test cleint to demonsrate the delay (Note wsdl added under Web
Reference).

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace SoapWebServiceTest
{
public partial class Form1 : Form
{
public SoapWebServiceTest._2600Programmer_Service.Program merService
xRepeater = new
SoapWebServiceTest._2600Programmer_Service.Program merService();

public Form1()
{
InitializeComponent();
}

private void Read_button_Click(object sender, EventArgs e)
{
this.textBox1.Text = "Waiting.....";
xRepeater.Timeout = 6000;
System.Text.StringBuilder url = new
System.Text.StringBuilder("http://");
url.Append(this.IP_textBox.Text);
url.Append("/Repeater_Web_Service/Programmer_Service.asmx");
xRepeater.Url = url.ToString();

// The following line will not return for ~10sec on initial
invocation to destination.
xRepeater.GetAllRepeaterParamsAsync();
}
private void GetAllRepetaerParamsDone(object sender,
SoapWebServiceTest._2600Programmer_Service.GetAllR epeaterParamsCompletedEventArgs e)
{
this.textBox1.Text = e.Result;
}

private void Form1_Load(object sender, EventArgs e)
{
xRepeater.GetAllRepeaterParamsCompleted += new
SoapWebServiceTest._2600Programmer_Service.GetAllR epeaterParamsCompletedEventHandler(GetAllRepetaerP aramsDone);
}
}
}
May 3 '06 #1
2 3006
The client is running SP2 of WinXP if that matters.

Also the same client application running on WinXP SP2 but joined to a Active
Directory domain has no delay.
Here is the contents of the DHCP infor request the client is sending when
the delay is seen:
No. Time Source Destination Protocol Info
1 0.000000 10.3.3.188 255.255.255.255 DHCP
DHCP Inform - Transaction ID 0x267b44ad

Frame 1 (342 bytes on wire, 342 bytes captured)
Arrival Time: May 2, 2006 14:39:58.822353000
Time delta from previous packet: 0.000000000 seconds
Time since reference or first frame: 0.000000000 seconds
Frame Number: 1
Packet Length: 342 bytes
Capture Length: 342 bytes
Protocols in frame: eth:ip:udp:bootp
Ethernet II, Src: Dell_dc:a1:40 (00:14:22:dc:a1:40), Dst: Broadcast
(ff:ff:ff:ff:ff:ff)
Destination: Broadcast (ff:ff:ff:ff:ff:ff)
Source: Dell_dc:a1:40 (00:14:22:dc:a1:40)
Type: IP (0x0800)
Internet Protocol, Src: 10.3.3.188 (10.3.3.188), Dst: 255.255.255.255
(255.255.255.255)
Version: 4
Header length: 20 bytes
Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00)
0000 00.. = Differentiated Services Codepoint: Default (0x00)
.... ..0. = ECN-Capable Transport (ECT): 0
.... ...0 = ECN-CE: 0
Total Length: 328
Identification: 0x3539 (13625)
Flags: 0x00
0... = Reserved bit: Not set
.0.. = Don't fragment: Not set
..0. = More fragments: Not set
Fragment offset: 0
Time to live: 128
Protocol: UDP (0x11)
Header checksum: 0xf6ad [correct]
Good: True
Bad : False
Source: 10.3.3.188 (10.3.3.188)
Destination: 255.255.255.255 (255.255.255.255)
User Datagram Protocol, Src Port: bootpc (68), Dst Port: bootps (67)
Source port: bootpc (68)
Destination port: bootps (67)
Length: 308
Checksum: 0x03a9 [correct]
Bootstrap Protocol
Message type: Boot Request (1)
Hardware type: Ethernet
Hardware address length: 6
Hops: 0
Transaction ID: 0x267b44ad
Seconds elapsed: 0
Bootp flags: 0x0000 (Unicast)
0... .... .... .... = Broadcast flag: Unicast
.000 0000 0000 0000 = Reserved flags: 0x0000
Client IP address: 10.3.3.188 (10.3.3.188)
Your (client) IP address: 0.0.0.0 (0.0.0.0)
Next server IP address: 0.0.0.0 (0.0.0.0)
Relay agent IP address: 0.0.0.0 (0.0.0.0)
Client MAC address: Dell_dc:a1:40 (00:14:22:dc:a1:40)
Server host name not given
Boot file name not given
Magic cookie: (OK)
Option 53: DHCP Message Type = DHCP Inform
Option 61: Client identifier
Hardware type: Ethernet
Client MAC address: Dell_dc:a1:40 (00:14:22:dc:a1:40)
Option 12: Host Name = "WAS601"
Option 60: Vendor class identifier = "MSFT 5.0"
Option 55: Parameter Request List
1 = Subnet Mask
15 = Domain Name
3 = Router
6 = Domain Name Server
44 = NetBIOS over TCP/IP Name Server
46 = NetBIOS over TCP/IP Node Type
47 = NetBIOS over TCP/IP Scope
31 = Perform Router Discover
33 = Static Route
Unknown Option Code: 249
43 = Vendor-Specific Information
Unknown Option Code: 252
End Option
Padding

0000 ff ff ff ff ff ff 00 14 22 dc a1 40 08 00 45 00 ........"..@..E.
0010 01 48 35 39 00 00 80 11 f6 ad 0a 03 03 bc ff ff .H59............
0020 ff ff 00 44 00 43 01 34 03 a9 01 01 06 00 26 7b ...D.C.4......&{
0030 44 ad 00 00 00 00 0a 03 03 bc 00 00 00 00 00 00 D...............
0040 00 00 00 00 00 00 00 14 22 dc a1 40 00 00 00 00 ........"..@....
0050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0110 00 00 00 00 00 00 63 82 53 63 35 01 08 3d 07 01 ......c.Sc5..=..
0120 00 14 22 dc a1 40 0c 06 57 41 53 36 30 31 3c 08 .."..@..WAS601<.
0130 4d 53 46 54 20 35 2e 30 37 0c 01 0f 03 06 2c 2e MSFT 5.07.....,.
0140 2f 1f 21 f9 2b fc ff 00 00 00 00 00 00 00 00 00 /.!.+...........
0150 00 00 00 00 00 00 ......
"WhatHappend" wrote:
I have converted a .Net 1.0 application to .Net 2.0 and the web service
invocations have delay of around 10seconds on each intial access. After the
first access subsequent access are fast (After a whild of inactivity the next
access will be slow agian). Changing the client to static IP address instead
of DHCP makes the initial access about 1 second which is fine.

Monitoring the network of the client computer the cleint is sending out 2
DHCP Inform broadcast messages during the inital pause.

Single stepping the code the code hangs at the Begin Async call (.net 1.0
style) or [FuncName]Async() call.

Client at WindowsXP computers that are members of a Windows NT 4.0 Domain.

Here is a test cleint to demonsrate the delay (Note wsdl added under Web
Reference).

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace SoapWebServiceTest
{
public partial class Form1 : Form
{
public SoapWebServiceTest._2600Programmer_Service.Program merService
xRepeater = new
SoapWebServiceTest._2600Programmer_Service.Program merService();

public Form1()
{
InitializeComponent();
}

private void Read_button_Click(object sender, EventArgs e)
{
this.textBox1.Text = "Waiting.....";
xRepeater.Timeout = 6000;
System.Text.StringBuilder url = new
System.Text.StringBuilder("http://");
url.Append(this.IP_textBox.Text);
url.Append("/Repeater_Web_Service/Programmer_Service.asmx");
xRepeater.Url = url.ToString();

// The following line will not return for ~10sec on initial
invocation to destination.
xRepeater.GetAllRepeaterParamsAsync();
}
private void GetAllRepetaerParamsDone(object sender,
SoapWebServiceTest._2600Programmer_Service.GetAllR epeaterParamsCompletedEventArgs e)
{
this.textBox1.Text = e.Result;
}

private void Form1_Load(object sender, EventArgs e)
{
xRepeater.GetAllRepeaterParamsCompleted += new
SoapWebServiceTest._2600Programmer_Service.GetAllR epeaterParamsCompletedEventHandler(GetAllRepetaerP aramsDone);
}
}
}

May 4 '06 #2
After working with MS the issue is a new feature in .Net2.0 that uses the IE
proxy settings by default. So in my case IE was set to use Auto proxy so
every time a web service was first intiated it would perform a blocking proxy
discovery which takes seconds for DHCP. The local DHCP here doesn't respond
to the DHCP inform requests used for proxy discovery. You can either disable
auto proxy detect in IE or you can add the following to the app.config file
to avoid the proxy discovery delays:
<configuration>
//………Other stuff in config file
<system.net>
<defaultProxy >
<proxy autoDetect="False"/>
</defaultProxy>
</system.net>
</configuration>

May 10 '06 #3

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

Similar topics

3
by: Harry | last post by:
Using Oracle 8i enterprise on win 2000 (sp3) Installed the standard configuration & whenever I make a connection it takes about 10 secs. It's running on a P1900 with 1gb Ram so no reason there...
0
by: GHUM | last post by:
Hello, I need to get a list of active leases on a windows dhcp server. Experts from Microsoft statet: """" A: Go to the Address leases of each scope in the DHCP snap-in and dump the leases...
1
by: Screenbert | last post by:
After finding nothing anywhere in google I am posting this so everyone can benefit by it. The formating is not pretty since I copied it from my word document, but you should benefit by it. ...
0
by: screenbert | last post by:
Managing DHCP Servers using C# They said it was impossible. It couldn't be done. But you can in fact manage DHCP servers using C#. This includes creating and deleting Scopes, SuperScopes,...
1
by: rahatekarabhijeet | last post by:
i am trying to get dhcp working in linux, server side:by setting options in .conf file at server side and starting the server by dnsmasq command. and at client side with dhcpcd command i am...
7
by: ixeye | last post by:
Anybody else ever had a problem like this? Windows 2003 Domain with 180 machines, 21 of them with XP SP2 Laptop Wireless access to the domain, on three different WIFI AP. Randomly (and luckily...
6
by: DevX | last post by:
Hello, I have a big intranet that I run with IIS 6.0. I need to log the client's machine names, and I found on the web istruction on how to use REMOTE_HOST server variable while enabling...
8
by: =?Utf-8?B?QkRSaWNoYXJkc29u?= | last post by:
I am aware that is is possible to determine the web client computer name using DNS, i.e. invoke System.Net.Dns.GetHostEntry( System.Web.HttpRequest.UserHostAddress). However, this only seems to...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
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"....
0
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...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...

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.