Enable session state

G

Guest

I test asp.net 2.0 application on virtual PC for studio Orcas 2.0. When I
start application I get error in line
session("aa")="bb"
Error tells that I need to enable session state. I found in @page directive
option
enableSessionState which has values false, readonly and true. I put this
value true, however it did not help. it is possible to put this value into
web.config, but i did not find where. Also i need to add appropriate module
in http module list.
Whatever I do, nothing works,
 
A

Alvin Bruney [MVP]

Is this a web form? It sounds like it is not. Have you tried a web form.
 
G

Guest

This is regular web form asp.net 2.0. in onLoad event i wrote
session("aa")="bb". It works in regular case. But I test it in win 2003 and
studio Orcas. I need to understand what I need to enable session.
 
G

Guest

Hi,
Maybe at your machine.config session closed.
Try to check maching.config, web.config (in the same directory) or
web.config (int wwwroot directory)

I am not sure but in my opinion because of win2k3's security options it is
not allowed by default.
 
J

Juan T. Llibre

re:
!> in my opinion because of win2k3's security options it is not allowed by default

The default setting for session state is "InProc",
which means that sessions are allowed no matter which OS is used.

If you don't want sessions, you have to set sessionstate to "Off",
either in the <sessionstate mode...> or the <pages sessionstate...> elements in web.config
..
That disables the use of sessions.
 
G

Guest

you catched the point. I do not know about machine.config and I decided to
look to webroot. I did not find machine.config, but in the main folder there
is web.config as well. There reference to http module for sessionState was
commented (I need to find answer why; this is team foundation server). When I
uncommented this reference everything works fine
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top