web service question

  • Thread starter Thread starter Gabriel
  • Start date Start date
G

Gabriel

Hello,

I'm trying to do my first web service.

It's a small test, a method receive 2 int and return the sum.

The client is a winforms application. That's work fine but the form freeze
during the web service answer.

The method is total, in the proxy class there is a totalAsync, I tried to
use it but the method return a void type and me I'd like a int, I tried a
casting but without any success

Any idea ?

Thanks,
 
Does it freeze every time or just the first time you use it? (NOTE: Every
time you debug counts as first use, unless the service is running separate
from the debugging context).

If it only freezes on first time, that is normal, as the service is being
JIT compiled. A way to test is to make a call, let it return and then make
another call. If this is the case, don't sweat it.

Heading to async is good ONLY if you can continue work without the answer.
One option you have if you want a more proper test is divorcing the web
service from the win forms, meaning do not compile both in a single
solution. Finish the service and then get it up and running in a browser.
You can then test the windows forms app over and over again without the lag
time.

If this is not the case, you are probably dealing with a coding problem,
which I can only take a wild guess at right now.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside the box!
*************************************************
 
Does it freeze every time or just the first time you use it? (NOTE: Every
time you debug counts as first use, unless the service is running separate
from the debugging context).

I fact I develop the web service and test via VS2005 no problem.

Then I moved the files to a IIS directory and from that it's very slow even
to display the 2 methods of this WS. When I say slow, it's very slow 30sec.

Is there someting special to do when I move the file from development
directory to IIS ?

Thanks,
 
You can aovid the first hit by precompiling prior to deploy. The publish
website option in VS 2005 does a lot of this, but there are other options
(check MSDN for ASp.NET 2.0 precompile). There is also an AXD page (forget
the name) which will compile all pages in an application.

These will help initial hit. As far as the slowness, that seems strange if
it is past first hit on a method. If so, you might want to examine what is
happening to the machine while it is running, as IIS might be improperly
tuned. Also, check the settings for authentication in IIS, as that could be
an issue (esp. if you are hitting from another domain and the authentication
is set to windows of some form).

Watch memory usage, as IIS uses more than the light version that ships with
VS 2005. And, watch CPU usage for the same reason. The box with IIS might
not be beefy enough to handle things.

Without understanding the architecture of each box, I can merely take some
guesses.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside the box!
*************************************************
 
Back
Top