Progromatically get SessionId Cookie name used in an asp.net application

09 Sep 2013 .Net, C#, MVC No Comments

The default name for the SessionId cookie in an Asp.Net application is ASP.NET_SessionId, but this can be changed in the web.config, e.g. I wanted to get the name of the SessionId cookie for the web app that was implementing my class library. I knew the dll would be implemented by many

Continue reading →

Storing a byte array in a Cookie (nom!) C# MVC

15 Aug 2013 .Net, C#, MVC No Comments

It seems that cookies can eat store just about any kind of data, but keeping to a limit of 20 cookies per domain and 4096 bytes per cookie is the safe way to do it (source). I needed to store a byte

Continue reading →