Slow creation of new WS + session states

Discussion in 'ASP .Net Web Services' started by jez, Mar 21, 2005.

  1. jez

    jez Guest

    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
     
    jez, Mar 21, 2005
    #1
    1. Advertising

  2. 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.

    --
    Manohar Kamath
    Editor, .netWire
    www.dotnetwire.com


    "jez" <> wrote in message
    news:...
    > 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
     
    Manohar Kamath, Mar 24, 2005
    #2
    1. Advertising

  3. jez

    jez Guest

    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

    "Manohar Kamath" wrote:

    > 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.
    >
    > --
    > Manohar Kamath
    > Editor, .netWire
    > www.dotnetwire.com
     
    jez, Mar 24, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jonathan Amend

    Using SQL Server for session states

    Jonathan Amend, Jul 18, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    353
    bruce barker
    Jul 19, 2003
  2. Naina Mohamed

    New Session Creation

    Naina Mohamed, Dec 24, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    525
    Alvin Bruney
    Dec 25, 2003
  3. Mike
    Replies:
    0
    Views:
    361
  4. Greg Dunn

    Dog-Slow Web App Creation

    Greg Dunn, Sep 4, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    337
    Greg Dunn
    Sep 4, 2004
  5. albertly
    Replies:
    3
    Views:
    14,065
    Steven Cheng[MSFT]
    Feb 8, 2008
Loading...

Share This Page