I have problem with ASP.NET MVC5. It works well on Visual Studio 2013 update 2 but on production or test server 2008 or 2012 it is not.
I have simple thing to do. Deliver bunch of variables form one view to other. Naturally I use:
HttpContext.Session["Mailpack_ID"] = id;
Doesn't work on Windows Server (both iis 7.5&8 ). I use this solution: ASP.NET MVC - Session is null
Solution 1 - Don't work, so I write my own class witch can storage variables (avoid using session):
public class StorageSingleton
{
private static StorageSingleton instance;
private StorageSingleton() { }
public static StorageSingleton Instance
{
get
{
if (instance == null)
{
instance = new StorageSingleton();
}
return instance;
}
}
public string Mailpack_ID { get; set; }
}
Use in code:
var storage = StorageSingleton.Instance;
storage.Mailpack_ID = id.ToString();
It was surprise for me - but nothing. I think when I use class all information are in code, but I get the same error. I have any idea. Any help?