G
Guest
I have a WebSite "App1" which has an external assembly "Lib1".
Inside this external assembly we have developed some classes that derive
from "System.Web.UI.Page". One of these pages is called "WebNotification".
In the WebSite "App1" we create an instance of "WebNotification", but when
this class tries to access some Session variables it generates the following
error:
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 <configuration>\<system.web>\<httpModules> section in the
application configuration.
I have tried to write "EnableSessionState= true" in the web.config and even
in the <%page%> directive but the error is still there.
Why?
Is there any restriction about accesing Session variables from class defined
in an external library?
Is there anyway to avoid this?
Inside this external assembly we have developed some classes that derive
from "System.Web.UI.Page". One of these pages is called "WebNotification".
In the WebSite "App1" we create an instance of "WebNotification", but when
this class tries to access some Session variables it generates the following
error:
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 <configuration>\<system.web>\<httpModules> section in the
application configuration.
I have tried to write "EnableSessionState= true" in the web.config and even
in the <%page%> directive but the error is still there.
Why?
Is there any restriction about accesing Session variables from class defined
in an external library?
Is there anyway to avoid this?