locked
How to - EnableSession=ReadOnly for web methods ? RRS feed

  • Question

  • This looks like someone forgot to implement a very basic feature.


    I'd like to concurrently call a readonly stateful web service.
    However, EnableSession for web methods gets only true or false, while for web pages it can get true, false and readonly.

    When I tried to use EnableSession=true the Session State Module synchronizes the threads to protect me from doing something foolish (I can take care of that myself, thank you) although I have no need to modify the Session object whatsoever on that specific web method.

    Any ideas (which doesn't include implementing my own state manager module)?


    Friday, May 9, 2008 4:06 PM

Answers

  • If the feature were very basic, then more people would have complained about it.

     

    What is a read only stateful web service? If it's read only, then how did the state get set?

     

     

    Wednesday, May 14, 2008 12:00 PM
    Moderator

All replies

  • If the feature were very basic, then more people would have complained about it.

     

    What is a read only stateful web service? If it's read only, then how did the state get set?

     

     

    Wednesday, May 14, 2008 12:00 PM
    Moderator


  • Would have been nice to have this feature.
    In my case I would have marked one of the webmethods with EnableSession=true and in this method I would have prepared and cache in session collection some resources that take long time to be prepared. Next, I would have marked all other webmethods with EnableSession=readonly to prevent the synchronization mechanism from blocking my asynchronous requests.

    Vasilescu Bogdan
    Monday, June 2, 2008 7:52 AM
  • Thanks for clarifying this.

    You may want to look into WCF to see if it has solved this problem. If it does not, then I suggest you enter a Connect article on this.
    John Saunders
    Monday, June 2, 2008 3:00 PM
    Moderator
  • This looks like someone forgot to implement a very basic feature.


    I'd like to concurrently call a readonly stateful web service.
    However, EnableSession for web methods gets only true or false, while for web pages it can get true, false and readonly.

    When I tried to use EnableSession=true the Session State Module synchronizes the threads to protect me from doing something foolish (I can take care of that myself, thank you) although I have no need to modify the Session object whatsoever on that specific web method.

    Any ideas (which doesn't include implementing my own state manager module)?


    I am interested in the same feature is there any news after 4 years :) 
    Tuesday, November 27, 2012 4:08 PM
  • If there were any news, then it would not be news about ASMX web services. This is a legacy technology which is not being enhanced. You should ask about this in the WCF Forum.

    John Saunders
    WCF is Web Services. They are not two separate things.
    Use WCF for All New Web Service Development, instead of legacy ASMX or obsolete WSE
    Use File->New Project to create Web Service Projects

    Monday, December 3, 2012 6:26 PM
    Moderator