In the Asp.net MVC Project I am redirecting my users to another page after login.
On the development environment all my session variables return null.
On Production however this works fine and session variables are retrieved correctly.
can some One please explain why all variables are null on the development environment.
[AllowAnonymous]
[HttpPost]
public ActionResult Login(LoginModel model, string returnUrl)
{
// Some validations
if (Url.IsLocalUrl(returnUrl))
{
var urlDeCoded = HttpUtility.UrlDecode(returnUrl);
var htmlDecoded = HttpUtility.HtmlDecode(urlDeCoded);
return Redirect(htmlDecoded);
}
}
/// Retreiveing session variables
var vm = SessionData.GetCurrentObject<MembershipWizardViewModel>();
In web.Config I have the same value for sessionState on both Envirnoments i.e. "InProc"