You can't store anything to Session at application start. Session = client initiated interaction. You don't have Sessions for all clients at application start.
Controller usually do not interact with session directly - it makes controllerd dependent on session. Instead controller methods (actions) accepts parameters which are automatically filled from the session by creating custom ModelBinder. Simple example:
public class MyDataModelBinder : IModelBinder
{
private const string _key = "MyData";
public object BindModel(ControllerContext context, ModelBindingContext bindingContext)
{
MyData data = (MyData)context.HttpContext.Session[_key];
if (data == null)
{
data = new MyData();
context.HttpContext.Session[_key] = data;
}
return data;
}
}
You will than register your binder in Application_Start (Global.asax):
ModelBinders.Binders.Add(typeof(Mydata), new MyDataModelBinder());
And you define your action like:
public ActionResult MyAction(MyData data)
{ ... }
As you can see the controller is in no way dependent on Session and it is fully testable.