dynamically enable session state

K

kpg*

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(EnableSession:=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(ByVal 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
 

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

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,060
Latest member
BuyKetozenseACV

Latest Threads

Top