Load Balancing and PostBack - form post lost

J

Jeffrey Kelso

I am having an issue where doing a PostBack in ASP.NET is
losing the form information. This is happening in a NLB
environment with two servers using Application Center

When a user selects an item from a DropDownList and then
clicks a submit button, the Click event on the button
redirects them to the value of the selected item. This
works fine if you are on Webserver1 and the button click
PostBacks to Webserver1. If you are on Webserver1 and
the load balance submits back to Webserver2, the page
reloads and the Button click event never fires. This
happens site wide and affects utilities such as
submitting a textbox search and other form posting
events. The web site was running fine without this error
for almost a year.

Here is some sample code that will cause the problem ...

Protected WithEvents lstAgentTools As _
System.Web.UI.WebControls.DropDownList
Protected WithEvents btnAgentTools As _
System.Web.UI.WebControls.Button

Private Sub Page_Load(ByVal sender As _
System.Object, ByVal e As System.EventArgs) _
Handles MyBase.Load
'Put user code to initialize the page here
End Sub

Private Sub Button1_Click(ByVal sender As _
System.Object, ByVal e As System.EventArgs) _
Handles Button1.Click
Response.Redirect
(DropDownList1.SelectedItem.Value)
End Sub


Things I've Tried:
1)Taken the steps in KB 313091 (multiple times) and
ensured that the machine key is the same on both servers.
2)In machine.config, I set <pages
enableViewStateMac="false" /> This has solved the
problem, but I do not feel comfortable with opening a
security hole. I would like to have
enableViewStateMac="true" and still be able to post from
server to server. I'm assuming that somewhere between
Webserver1 and Webserver2 the ViewState appears to be
tampered with, thus the server just drops the form state
information.

The Setup:
Compiled in VS.NET 2002
..NET Framework 1.1.4322 (also happened on 1.0.3705)
Microsoft Application Center 2000 Standard v. 1.00.0780
Web Servers:
Windows 2000, Service Pack 4 (same problem happening
before SP4)
P3, 1.4 GHz
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top