I have a class which inherits from the System.Web.UI.Page class, like mysystem.
When I try to create an instance of mysystem in a winform appplication it throws an HttpException: 
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 then googled this problem and try to enable the session state, but all are not affected.
So, can anybody tell me how to solve this case?