I have a form following the following resemblance...
@using (Html.BeginForm())
{
@* Model elements go here *@
<input type="submit" value="Save" />
}
and the following methods for this View, which we will just call 'Test'
public ActionResult Test()
{
return View();
}
[HttpPost]
public ActionResult Test(ModelObj m)
{
try{
//do save logic with ModelObj entity
}
catch(Exception ex){
//Log error - send e-mail to self and display 'save failed' msg to front end user
}
return View(m);
}
This code functions as expected when loading up the page and running it immediately, but other users (I cannot recreate the issue myself) are complaining that on longer wait times (leaving the page idle for over 10 minutes), on 'Save' click, the page does a postback (page flashes and reloads) but the data has not been saved.
I added the error logging in the try/catch to try to figure out the issue, but am receiving no error emails, and the users are not seeing the front end 'save failed' message provided by the catch block.
I can only imagine that this is a session issue - but I have eliminated all of my own uses of Session variables on this page and am wondering if MVC has it's own timeout period for a View (where it just tosses away all of the model information). If so, is there a way to increase this? Any other possibilities I should be looking for?