Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post May 03, 2012 09:26 AM by cYpH3r x3r0
Apr 26, 2012 06:23 AM|LINK
I have got a page with number of user controls on it and as a result it takes lot of time to load. I read this article and decided to implement it. Fortunately,
everything worked fine except one problem. One of my user controls reads data from session and that’s where I am getting following exception (previously same code was working fine).
I tried to enable sessionstage (custom mode) in config as wel as at page level but no luck.
Exception: Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the
\\ section in the application configuration.
Please let me know if you know the reason of above exception.
Apr 26, 2012 12:50 PM|LINK
Does the containing page have:
<%@ Page EnableSessionState=true %>
Because that's what the error is telling you that is needed.
Maybe in web.config do you have session disabled?
May 03, 2012 09:26 AM|LINK
you can also do this in web.onfig so that you wont have to apply on every page individually, it will be true for all pages