In this tutorial you will see how to deal with session. It is very important to check if the session exists before you set its value, otherwise you can get an exception. What you should do is to check if the Session element exist, you doing this by checking if it is not null.
if (Session["UserName"] != null)
Session["UserName"] = "string value";