Legal Notice
The opinions expressed herein are my own personal opinions and do not represent my employer’s view in anyway.Top Posts
- C# DateTime to UNIX timestamps
- C# HttpClient POST or PUT Json with content type application/json
- C# get results from Task.WhenAll
- Run tasks in parallel using .NET Core, C# and async coding
- Write to file from multiple threads async with C# and .NET Core
- Build .net core 6 projects with Azure Devops using yml files
- .NET API CORS: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header.NET API
Archive
Meta
Tag Archives: HttpContext
.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
Add and Remove cookies
Creating cookies is no problem: But have you ever tried to remove a cookie, but nothing happens? It seemes that the “Remove” have no effect: Setting a cookie is a dialog between the client and server. Adding a cookie is done … Continue reading