By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,365 Members | 1,245 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,365 IT Pros & Developers. It's quick & easy.

Calling webservice from 2.0 client

P: n/a
We have run into problems calling a web service from a client running .NET
framework 2.0. The problem is that the first call to the web service, after
the client has been started, takes very long time, something like 15 to 30
seconds. All subsequent calls are really fast (about 10 milliseconds). But
when the client is restarted, the first call once more takes long time.

We have been testing a few different scenarios to figure out what is
happening here, but the problem still puzzles us.

1. We start two instances of the same client application (.NET framework
2.0), A1 and A2 on the same machine. A1 is calling the web service and takes
long time. A1 is making another call, which goes fast. A2 is making its first
call to the web service, and it takes long time, A2 is making another call
which is fast.

2. We compile the same client in .NET framework 1.1 and start two instances
of that client (B1 and B2). All calls to the web service are really fast,
including the very first call!

3. We try running the 2.0 clients with different domain users. Here we find
a difference. Some users only need a fraction of a second to make the first
calls, while others need up to 30 seconds. The only difference to be found in
AD is that the “fast” users belong to only a few groups, while the “slow”
users belong to several groups (20-30).

Our conclusion is that the 2.0 clients are performing some sort of control
of the user running the client that is not performed by the 1.1 framework.

Is this conclusion correct? What is happening here? Is there a way to make a
2.0 client behave as the 1.1 clients? We are very grateful for any help!

Nov 2 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Johan,
The startup time for the first caller is just how ASP.NET based applications
work. The first call to an ASP.NET application causes a bunch of
infrastructure to come to life and that first call blocks until everything is
ready and the reply can be sent. The second call doesn't wait for all that
infrastructure (demand compilation, reading of config, setting up AppDomains,
reading IIS policy, etc.) and can respond much quicker. You will see
different behaviors depending on what version of IIS you are running and
should see the best performance on Win2K3 server/IIS 6.x.

If you could give some more details of your environment, such as OS, it
would be easier to make sense of what is going on.

"Johan" wrote:
We have run into problems calling a web service from a client running .NET
framework 2.0. The problem is that the first call to the web service, after
the client has been started, takes very long time, something like 15 to 30
seconds. All subsequent calls are really fast (about 10 milliseconds). But
when the client is restarted, the first call once more takes long time.

We have been testing a few different scenarios to figure out what is
happening here, but the problem still puzzles us.

1. We start two instances of the same client application (.NET framework
2.0), A1 and A2 on the same machine. A1 is calling the web service and takes
long time. A1 is making another call, which goes fast. A2 is making its first
call to the web service, and it takes long time, A2 is making another call
which is fast.

2. We compile the same client in .NET framework 1.1 and start two instances
of that client (B1 and B2). All calls to the web service are really fast,
including the very first call!

3. We try running the 2.0 clients with different domain users. Here we find
a difference. Some users only need a fraction of a second to make the first
calls, while others need up to 30 seconds. The only difference to be found in
AD is that the “fast” users belong to only a few groups, while the “slow”
users belong to several groups (20-30).

Our conclusion is that the 2.0 clients are performing some sort of control
of the user running the client that is not performed by the 1.1 framework.

Is this conclusion correct? What is happening here? Is there a way to make a
2.0 client behave as the 1.1 clients? We are very grateful for any help!
Nov 2 '06 #2

P: n/a
Scott, thank you for your reply. The service is actually running on IIS6 on
Win2k3. The clients are running on WinXP SP2.

We have made two versions of the server as well, one running on 1.1 and the
other on 2.0. These two versions behave in the same manner as previously
described.

We really do not think this has anything to do with the start-up of the web
service itself. For example, if we run one 2.0 client, the first call takes
long time, and the second call goes fast. If we then start a new client (the
old still running), the first call takes long time from this client. We are
also able to call a third time from the first client which gets a response
way before the first call from the second client returns.

Further, the phenomenon only shows with clients running on 2.0. The .NET
version of the web service does not seem to matter.

Hopefully these details could help finding the cause of our problems.

"Scott Seely" wrote:
Johan,
The startup time for the first caller is just how ASP.NET based applications
work. The first call to an ASP.NET application causes a bunch of
infrastructure to come to life and that first call blocks until everything is
ready and the reply can be sent. The second call doesn't wait for all that
infrastructure (demand compilation, reading of config, setting up AppDomains,
reading IIS policy, etc.) and can respond much quicker. You will see
different behaviors depending on what version of IIS you are running and
should see the best performance on Win2K3 server/IIS 6.x.

If you could give some more details of your environment, such as OS, it
would be easier to make sense of what is going on.

"Johan" wrote:
We have run into problems calling a web service from a client running .NET
framework 2.0. The problem is that the first call to the web service, after
the client has been started, takes very long time, something like 15 to 30
seconds. All subsequent calls are really fast (about 10 milliseconds). But
when the client is restarted, the first call once more takes long time.

We have been testing a few different scenarios to figure out what is
happening here, but the problem still puzzles us.

1. We start two instances of the same client application (.NET framework
2.0), A1 and A2 on the same machine. A1 is calling the web service and takes
long time. A1 is making another call, which goes fast. A2 is making its first
call to the web service, and it takes long time, A2 is making another call
which is fast.

2. We compile the same client in .NET framework 1.1 and start two instances
of that client (B1 and B2). All calls to the web service are really fast,
including the very first call!

3. We try running the 2.0 clients with different domain users. Here we find
a difference. Some users only need a fraction of a second to make the first
calls, while others need up to 30 seconds. The only difference to be found in
AD is that the “fast” users belong to only a few groups, while the “slow”
users belong to several groups (20-30).

Our conclusion is that the 2.0 clients are performing some sort of control
of the user running the client that is not performed by the 1.1 framework.

Is this conclusion correct? What is happening here? Is there a way to make a
2.0 client behave as the 1.1 clients? We are very grateful for any help!
Nov 3 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.