Slow creation of new WS + session states

J

jez

I have a two-folded question :

1) Do I need to create a new Webservice each time I want to make a call to a
method from a different form? (it's pretty slow!) I have an application on
..NetCF with different forms; I wish to know whether I can just create a
webservice once and access the webservice object from my different forms
(just like I do with my static variables).

2) Are sessions kept between different webservice calls coming from the same
client? If 1) is true then I'd hope that sessions are kept between different
calls.

Thanks a lot,

jez
 
M

Manohar Kamath

Jez,

Webservices should inherently be stateless. You could turn the session state
on, but you are now assuming that the consumer of the service is a browser,
or someone who returns the session state cookie. This limits the types of
clients the service can have.

You could improve the performance by using some caching strategy, either on
the client or on the server.
 
J

jez

I ended up using sessions. It's not too much of a problem because my
application is totally geared towards a customized NETcf application that I'm
making.

I am interested however on speeding up a webservice connection; Right now
all I do is Service1 ws = new Service1(); and then make an async call to the
webservice. It's much nicer than using a sync call but I believe that the
actual webservice creation is still too slow. Could that have anything to do
with my computer? (Centrino 1.7Ghz w/512MB) - I'm not planning on having more
than 5 concurrent users. Please advice.

Kind regards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top