 <p>You should first introduce the "UserName" to your Session by using </p> <pre><code>HttpContext.Current.Session.Add("UserName", value) </code></pre> <p>in your setter.</p> <pre><code>public class CurrentUser { public static string UserName { get { if (HttpContext.Current.Session["UserName"] != null) return (string)HttpContext.Current.Session["UserName"]; else return null; } set { if (HttpContext.Current.Session["UserName"] == null) HttpContext.Current.Session.Add("UserName", value); else HttpContext.Current.Session["UserName"] = value; } } } </code></pre> <p>After doing that it should work as you wrote.</p>