Commit Graph
27 Commits
Author SHA1 Message Date
Carlos Alberto Cortez 70927ed41c [System.Web] Re-enable SessionStateModule.OnSessionExpired as needed.
SessionStateModule.OnSessionExpired is used as a callback for its
'handler' field (SessionStateStoreProviderBase.SetItemExpireCallback),
and is normaly enabled in Init, as well as disabled in OnReleaseRequestState
if the container is abandoned.

However, since the module may stay around being re-used, it may continue
working *without* this callback being invoked/enabled anymore -causing a number of
nasty, hard to debug side effects, as session data ending up in the void-.
So we enable this callback again in OnAcquireRequestState, which is the
point at where we know we have a brand new, working container.
2012-06-11 08:22:40 -05:00
J. Christopher Pereira cfc15c20af Update mcs/class/System.Web/System.Web.SessionState_2.0/SessionStateModule.cs 2012-03-08 05:28:43 -05:00
kripper 4388133908 Fixes BUG https://github.com/mono/mono/pull/229#issuecomment-4212737 2012-03-03 19:42:46 -05:00
Gonzalo Paniagua Javier 5ab786b5b4 Get system.web/httpRuntime only once
Get that section only once and keep it in HttpRuntime.
2010-12-09 19:01:41 -05:00
Sebastien Pouliot e46106929b Remove unneeded 'using' clauses 2010-10-08 16:09:20 -04:00
Marek Habersack 77a61be80d 2009-10-19 Marek Habersack <[email protected]>
* ASPState.sql: added - schema for the SQL session state server
	database.

2009-10-19  Marek Habersack  <[email protected]>

	* SessionStateModule.cs: enabled SQL session state provider.

	* SessionSQLServerHandler.cs: implemented. Uses System.Data.Common
	for provider-agnostic implementation. Until an issue with Npgsql's
	2.0 factory missing is resolved it defaults to using
	Mono.Data.Sqlite as the provider.
	Selecting of the data provider is done by putting DbProviderName
	in the connection string specified in the
	<system.web/sessionState> configuration section.

svn path=/trunk/mcs/; revision=144412
2009-10-19 20:59:08 +00:00
Marek Habersack 4caac12664 2008-09-15 Marek Habersack <[email protected]>
* SessionStateModule.cs: correctly let the handler know if an item
	is new when calling SetAndReleaseItemExclusive. Fixes bug #424797
	If handler's GetItem doesn't initialize storeLockId to a non-null
	value, initialize it to 0. Fixes bug #424797

svn path=/trunk/mcs/; revision=112997
2008-09-15 09:54:30 +00:00
Marek Habersack 2a10f9ae73 2008-07-29 Marek Habersack <[email protected]>
* SessionStateModule.cs: use Request.FilePath instead of
	Request.BaseVirtualDirectory to retrieve the cookie-less session
	identifier. Fixes bug #397418

2008-07-29  Marek Habersack  <[email protected]>

	* UrlUtils.cs: fixed a typo in HasSessionId which made it always
	return False. Fixes bug #397418

2008-07-29  Marek Habersack  <[email protected]>

	* SessionStateModule.cs: use Request.FilePath instead of
	Request.BaseVirtualDirectory to retrieve the cookie-less session
	identifier. Fixes bug #397418

2008-07-29  Marek Habersack  <[email protected]>

	* HttpRequest.cs: if the FilePath contains embedded cookie-less
	session identifier, remove it before computing the base virtual
	directory. Fixes bug #397418



svn path=/trunk/mcs/; revision=109156
2008-07-29 13:01:55 +00:00
Marek Habersack ae00a7ec53 2008-06-04 Marek Habersack <[email protected]>
* SessionStateModule.cs: set the application modifier path to bare
	session id.

2008-06-04  Marek Habersack  <[email protected]>

	* UrlUtils.cs: added internal method HasSessionId

2008-06-04  Marek Habersack  <[email protected]>

	* SessionStateModule.cs: set application path modifier string to
	the bare session ID.

2008-06-04  Marek Habersack  <[email protected]>

	* HttpResponse.cs: correctly modify virtual path to include the
	session ID in cookieless session mode. Fixes bug #396628.

svn path=/trunk/mcs/; revision=104861
2008-06-04 13:13:09 +00:00
Marek Habersack 0907975508 2008-05-30 Marek Habersack <[email protected]>
* BaseDataBoundControl.cs, ChangePassword.cs, CustomValidator.cs,
	DataControlFieldCollection.cs, DataControlField.cs,
	PasswordRecovery.cs, PagerSettings.cs: do not use synthetized
	event accessors (to avoid locks).

2008-05-30  Marek Habersack  <[email protected]>

	* AnonymousIdentificationModule.cs, FormsAuthenticationModule.cs,
	DefaultAuthenticationModule.cs, MembershipProvider.cs,
	WindowsAuthenticationModule.cs, PassportAuthenticationModule.cs,
	RoleManagerModule.cs: do not use synthetized event accessors (to
	avoid locks).

2008-05-30  Marek Habersack  <[email protected]>

	* HttpApplication.cs, HttpCachePolicy.cs, SiteMapProvider.cs,
	TraceContext.cs: do not use synthetized event accessors (to avoid
	locks).

2008-05-30  Marek Habersack  <[email protected]>

	* SessionStateModule.cs: do not use synthetized event accessors
	(to avoid locks).

2008-05-30  Marek Habersack  <[email protected]>

	* ProfileModule.cs: do not use synthetized event accessors (to
	avoid locks).

2008-05-30  Marek Habersack  <[email protected]>

	* SessionStateModule.cs: do not use synthetized event accessors
	(to avoid locks).

2008-05-30  Marek Habersack  <[email protected]>

	* DataBindingCollection.cs, ExpressionBindingCollection.cs: do not
	use synthetized event accessors (to avoid locks).

2008-05-30  Marek Habersack  <[email protected]>

	* ClientBuildManager.cs: do not use synthetized event accessors
	(to avoid locks).

2008-05-30  Marek Habersack  <[email protected]>

	* CacheDependency.cs: do not use synthetized event accessors (to
	avoid locks).


svn path=/trunk/mcs/; revision=104569
2008-05-30 22:20:14 +00:00
Marek Habersack 76e412a4c5 2008-04-24 Marek Habersack <[email protected]>
* SessionStateModule.cs: reset the storage data item timeout to
	the HttpApplication.Session.Timeout value after the Session_Start
	event is fired. Fixes bug #382644

svn path=/trunk/mcs/; revision=101632
2008-04-24 00:38:24 +00:00
Konstantin Triger beb58ae31a TARGET_J2EE: reverted r80308
svn path=/trunk/mcs/; revision=95485
2008-02-12 09:30:34 +00:00
Igor Zelmanovich 6d244cc6a0 refactoring:
use Trace.WriteLine instead Console.WriteLine within #if TRACE.

svn path=/trunk/mcs/; revision=92786
2008-01-13 13:01:38 +00:00
Marek Habersack 222c5eb23c 2007-11-05 Marek Habersack <[email protected]>
* SessionStateModule.cs: use TimeSpan.TotalMinutes wherever a
	session timeout is required, so that sessions do not expire
	prematurely. Fixes bug #339026. Patch from Adriaan van Kekem
	<[email protected]>, thanks!

svn path=/trunk/mcs/; revision=88845
2007-11-05 09:40:29 +00:00
Juraj Skripsky 9d8f783fc9 2007-10-15 Juraj Skripsky <[email protected]>
* SessionStateModule.cs (Init): Use HttpApplication.LoadType,
	don't swallow TypeLoadException.


svn path=/trunk/mcs/; revision=87504
2007-10-15 12:48:57 +00:00
Igor Zelmanovich a9287ab15f 2007-07-30 Igor Zelmanovich <[email protected]>
* SessionStateModule.cs:
	ensure release (save) session state at OnEndRequest.	


svn path=/trunk/mcs/; revision=82975
2007-07-30 11:44:23 +00:00
Marek Habersack 19f92c957d 2007-06-20 Marek Habersack <[email protected]>
* SessionStateModule.cs: if session is abandoned and the handler
	supports expiration, disable the handler's session expiration
	callback and call SessionStateUtility.RaiseSessionEnd
	directly. Fixes bug #81853.

svn path=/trunk/mcs/; revision=80308
2007-06-20 11:58:14 +00:00
Konstantin Triger 675fb4eaa5 suppress errors for unsupported session mode and fallback to the servlet session provider
svn path=/trunk/mcs/; revision=75254
2007-04-01 09:33:02 +00:00
Konstantin Triger 18a158237c TARGET_J2EE: support only J2EE sessions
svn path=/trunk/mcs/; revision=74098
2007-03-12 07:30:47 +00:00
Marek Habersack 7fcf8ab762 Fix for bug 80682
svn path=/trunk/mcs/; revision=73773
2007-03-06 00:51:45 +00:00
Konstantin Triger f81faf1f33 call Session_End callback only if the handler does not support expiration
svn path=/trunk/mcs/; revision=73096
2007-02-19 07:59:31 +00:00
Miguel de Icaza 6b4c7232fd * SiteMapNode.cs (GetExplicitResourceString): implement.
* HttpContext.cs (GetGlobalResourceObject): remove unused variable.

        * StaticFileHandler.cs (ProcessRequest): remove unused variable.

        * HttpApplication.cs (ProcessError): Remove unused variable.

2007-01-20  Miguel de Icaza  <[email protected]>

        * ClientBuildManager.cs: Remove unused variable (this could be a
        real problem, we never use the appPhysicalTargetDir)

        * AssemblyBuilder.cs: Remove unused field.

        * AppResourceFilesCollection.cs: Remove unused field.

        * TemplateControlCompiler.cs (GetExpressionFromString): Remove
        unused variable.

        * AppResourcesCompiler.cs: Remove unused variable.

        * AppSettingsExpressionBuilder.cs (GetAppSetting): remove unused
        parameter.

        * PageCompiler.cs: Put InternalCreatePageProperty inside the
        NET_2_0 block to eliminate warnings.

2007-01-20  Miguel de Icaza  <[email protected]>

        * HandlerFactoryConfiguration.cs (LoadType): remove unused
        variable.
        (ctor): do not assign parent, we do not use it, keep the code for
        reference.

2007-01-20  Miguel de Icaza  <[email protected]>

        * ApplicationManager.cs: Remove unused variable.
        (ShutdownAll) remove unused variables.

        * ApplicationHost.cs: Protect create_dir lock

2007-01-20  Miguel de Icaza  <[email protected]>

        * SqlRoleProvider.cs: comment out unused code.

        * SqlMembershipProvider.cs: Removed unused variables.
        Remove unused variable.

        * AnonymousIdentificationModule.cs (ClearAnonymousIdentifier):
        remove unused variable.   This might be a real bug.

2007-01-20  Miguel de Icaza  <[email protected]>

        * SessionStateModule.cs: Removed unused variables.

2007-01-20  Miguel de Icaza  <[email protected]>

        * SessionDictionary.cs: Removed unused variable (dirty).

2007-01-20  Miguel de Icaza  <[email protected]>

        * XhtmlTextWriter.cs: comment out unused code.

        * ThemeProvider.cs: comment out unused code.

        * DataSourceView.cs: Comment unused variable.

        * ClientScriptManager.cs: Put the expandoAttributes inside the 2.0
        code

        * Control.cs: Put _templateControl inside the NET_2_0 ifdef

2007-01-20  Miguel de Icaza  <[email protected]>

        * HtmlHead.cs: comment out unused code, in particular metadata is
        commented out because nothing could have triggered its creation.

        * HtmlButton.cs: Move declaration of `csm' inside the 1.1 case.

2007-01-20  Miguel de Icaza  <[email protected]>

        * DataControlFieldCollection.cs (RemoveAt): remove unused
        variable.

        * RoleGroupCollection.cs (OnValidate): Flag as protected, as it
        should not show up.

        * RadioButton.cs (RaisePostDataChangedEvent): This method was not
        used in 1.0, so put the whole method in 2.0

2007-01-20  Miguel de Icaza  <[email protected]>

        * WebPart.cs: Remove

        * PersonalizableAttribute.cs: Remove extra API that was wrong as well.

2006-11-28  Miguel de Icaza  <[email protected]>

        * WebPart.cs:

2007-01-20  Miguel de Icaza  <[email protected]>

        * FileUtils.cs (CreateTemporaryFile): Remove unused variable.



svn path=/trunk/mcs/; revision=71399
2007-01-20 22:42:04 +00:00
Konstantin Triger c82553c225 Implemented raising of Session_OnEnd event, refactoring
svn path=/trunk/mcs/; revision=70595
2007-01-07 16:56:14 +00:00
Igor Zelmanovich fc1e45618a typo fix
svn path=/trunk/mcs/; revision=70164
2006-12-28 12:02:59 +00:00
Konstantin Triger c52feb2a1f * SessionIDManager.cs: Pass config to SessionStateModule.IsCookieLess.
* SessionStateStoreData.cs: fix constructor signature.
* SessionInProcHandler.cs, SessionStateServerHandler.cs: ensure has a default
	constructor to make instantiating same as for custom provider.
* SessionStateModule.cs: support custom providers.

svn path=/trunk/mcs/; revision=70128
2006-12-27 16:23:13 +00:00
Konstantin Triger 86066e0e22 Add #if TRACE arround debug prints
svn path=/trunk/mcs/; revision=69855
2006-12-21 10:18:37 +00:00
Marek Habersack 434e59e4bc Implementation of the 2.0 session state model
svn path=/trunk/mcs/; revision=69828
2006-12-20 18:34:00 +00:00