473,395 Members | 1,978 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

SessionStateModule Class

public void Init(HttpApplication app)
{
bool flag1 = false;
SessionStateSection section1 =
RuntimeConfig.GetAppConfig().SessionState;
if (!this.s_oneTimeInit)
{
SessionStateModule.s_lock.AcquireWriterLock();
try
{
if (!this.s_oneTimeInit)
{
this.InitModuleFromConfig(app, section1);
flag1 = true;
if
(!SessionStateModule.CheckTrustLevel(section1))
{

SessionStateModule.s_trustLevelInsufficient = true;
}
SessionStateModule.s_timeout = (int)
section1.Timeout.TotalMinutes;
SessionStateModule.s_useHostingIdentity =
section1.UseHostingIdentity;
if ((section1.Mode == SessionStateMode.InProc)
&& this._usingAspnetSessionIdManager)
{

SessionStateModule.s_allowInProcOptimization = true;
}
if (((section1.Mode != SessionStateMode.Custom)
&& (section1.Mode != SessionStateMode.Off)) &&
!section1.RegenerateExpiredSessionId)
{

SessionStateModule.s_allowDelayedStateStoreItemCre ation = true;
}
SessionStateModule.s_configExecutionTimeout =
RuntimeConfig.GetConfig().HttpRuntime.ExecutionTim eout;

SessionStateModule.s_configRegenerateExpiredSessio nId =
section1.RegenerateExpiredSessionId;
SessionStateModule.s_configCookieless =
section1.Cookieless;
SessionStateModule.s_configMode = section1.Mode;
this.s_oneTimeInit = true;
}
}
finally
{
SessionStateModule.s_lock.ReleaseWriterLock();
}
}
if (!flag1)
{
this.InitModuleFromConfig(app, section1);
}
if (SessionStateModule.s_trustLevelInsufficient)
{
throw new
HttpException(SR.GetString("Session_state_need_hig her_trust"));
}
}
in the above mothed,"s_oneTimeInit" is not static variable,
page postback later that s_oneTimeInit is default value relative to all
user,"if (!this.s_oneTimeInit),if (!this.s_oneTimeInit)"They have not
any effect.


*** Sent via Developersdex http://www.developersdex.com ***
Feb 9 '07 #1
0 945

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Fernando Rodriguez | last post by:
Hi, I need to traverse the methods defined in a class and its superclasses. This is the code I'm using: # An instance of class B should be able to check all the methods defined in B #and A,...
1
by: Oplec | last post by:
Hi, I'm learning C++ as a hobby using The C++ Programming Language : Special Edition by Bjarne Stroustrup. I'm working on chpater 13 exercises that deal with templates. Exercise 13.9 asks for me...
9
by: Banaticus Bart | last post by:
I wrote an abstract base class from which I've derived a few other classes. I'd like to create a base class array where each element is an instance of a derived object. I can create a base class...
4
by: Todd Throne | last post by:
Does anyone know how to persuade the SessionStateModule to set the HttpSessionState.IsCookieless to true. I tried redirecting to a URI of the format /host/(SessionId)/original/path but it does...
2
by: Daniel Carlsson | last post by:
Hello I was wondering if it is possible to use your own SessionStateModule instead of the default one, what Im interested in is attempting to set a cookie first, and if that fails using...
5
by: Andy | last post by:
Hi all, I have a site with the following architecture: Common.Web.dll - Contains a CommonPageBase class which inherits System.Web.UI.Page myadd.dll - Contains PageBase which inherits...
3
by: Hamilton Woods | last post by:
Diehards, I developed a template matrix class back around 1992 using Borland C++ 4.5 (ancestor of C++ Builder) and haven't touched it until a few days ago. I pulled it from the freezer and...
0
by: emin.shopper | last post by:
I had a need recently to check if my subclasses properly implemented the desired interface and wished that I could use something like an abstract base class in python. After reading up on metaclass...
0
by: wjs wsl | last post by:
public void Init(HttpApplication app) { bool flag1 = false; SessionStateSection section1 = RuntimeConfig.GetAppConfig().SessionState; if (!this.s_oneTimeInit) {...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.