dynamically enable session state

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • kpg*

    dynamically enable session state

    Hi all,


    I have a web service with two similar methods, one for production
    and one for testing.

    On the test method I enable session state so I can dump out debug
    files named with the session id and cross reference them a log file.
    It also keeps the files unique to each user session.

    <WebMethod(Enab leSession:=True )_
    Public Function Test(ByVal Data As String) As String

    I don't have session state enabled on the production method to
    conserve server resources.

    <WebMethod()_
    Public Function Production(ByVa l Data As String) As String

    Ocasionally I need to enable logging for the production call,
    and I'd like to do that with a web.config setting, rather than
    editing the source and re-deploying the site.

    Is there a way to enable session state for a web method at runtime
    when the method is normally tagged to not enable session state?

    Thanks,


    kpg

Working...