Legal Notice
The opinions expressed herein are my own personal opinions and do not represent my employer’s view in anyway.Top Posts
- C# HttpClient POST or PUT Json with content type application/json
- C# get results from Task.WhenAll
- C# Get expiry timestamp from JWT token
- Run tasks in parallel using .NET Core, C# and async coding
- Handling "415 Unsupported Media Type" in .NET Core API
- Using C# HttpClient from Sync and Async code
- ASP.Net Core API - "'s' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0."
Archive
Meta
Tag Archives: session
.NET Session state is not thread safe
When working with the .NET session state you should bear in mind that the HttpContext.Current.Session cannot be transferred to another thread. Imagine that you, from the Global.asax would like to read the SessionID each time a session is started: To … Continue reading
Posted in .net, c#, General .NET
Tagged .NET 4.5, global.asax, HttpContext, QueueUserWorkItem, session, Session state, ThreadPool
Leave a comment
Why is session NULL in BeginRequest()? (httpRequestBegin)
Have you ever wondered why the session is NULL when a request begins? The answer is simple: The Application_BeginRequest() event is fired before the Session_Start() event. The BeginRequest() event is fired for each request as the first event. The Session_Start() … Continue reading
Posted in General .NET, Sitecore 6, Sitecore 7, Sitecore 8
Tagged BeginRequest, global.asax, httpRequestBegin, httpRequestProcessed, session, Session_Start, Sitecore
1 Comment
Measuring sessions for Sitecore 6 sites
I recently had to do some performance and stress tests on a Sitecore 6 website. But no matter what I did, the Perfmon showed 0 sessions. At first I blamed the built in session handling in Sitecore, where Sitecore persists the … Continue reading
How to allow sessions in framesets
As described in this MS article (http://support.microsoft.com/kb/323752) embedding web sites in framesets will disable the usage of session variables due to a security issue. The real question is why you ever wish to embed a website in a frameset, why … Continue reading