Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > SessionStateModule Class

Reply
Thread Tools

SessionStateModule Class

 
 
wjs wsl
Guest
Posts: n/a
 
      02-09-2007
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 ***
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SessionStateModule.PollLockedSessionCallback error with Dundas Con Jeff Fritz ASP General 1 03-12-2008 05:51 PM
SessionStateModule Class? wjs wsl ASP .Net 0 02-08-2007 10:43 AM
Nested Class, Member Class, Inner Class, Local Class, Anonymous Class E11 Java 1 10-12-2005 03:34 PM
Custom SessionStateModule Daniel Carlsson ASP .Net 2 01-26-2005 07:27 PM
HttpModule - SessionStateModule with cookieless uri state Todd Throne ASP .Net 4 09-30-2004 11:03 PM



Advertisments