I have a created a simple aspx page to try and debug a situation in which
our viewstate gets "lost" between requests. Our setup is 2 servers behind a
BigIP. Everytime the request move from one server to the other the
viewstate is lost, but when the request stays on the same server everything
works fine. The wierd thing is that viewstate is on the page but its wrong.
I say its wrong because for one the IsPostBack property is reset. I have
done all the modifications to the <machineKey> setting so each server is
using the exact same keys for the viewstate MAC. I cant think of anything
else to do!!!
The page I have been able to recreate it has 2 labels and a link button.
Label1 has the machine name and Label2 holds the IsPostBack value.
if (IsPostBack) {
this.lblIsPostBack.Text = "IsPostBack = true";
}
else {
this.lblIsPostBack.Text = "IsPostBack = false";
}
System.Threading.Thread.Sleep(new TimeSpan(0,0,2)); //this is just used to
help force request to other server
this.lblServerName.Text = "MachineName = " + Environment.MachineName;