sharing session between application and web service

Discussion in 'ASP .Net Web Services' started by Victor Reboucas, Jun 17, 2007.

  1. Hi, I'm developing an asp.net 2.0 application and I'm trying to use a
    session value set in a web form inside a web service call.


    I mean I have a web form with a list of orders for a given customer

    when the page loads I set session("customer") =
    request.querystring("customer")

    every minute I have to refresh the current results on the page and I'm
    trying to do that using an existing web service (that's hosted inside the
    same application) and for the customer code I use
    httpcontext.current.session("customer")


    I just cannot get that session value....

    Is there something I'm missing here?

    Is that impossible to do?


    thanks for any clue,
    regards,
    Victor
     
    Victor Reboucas, Jun 17, 2007
    #1
    1. Advertisements

  2. I found that...

    is just a matter of an attribute:

    <WebMethod(EnableSession:=True)>



    regards.
     
    Victor Reboucas, Jun 18, 2007
    #2
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.