473,774 Members | 2,147 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Load Balancing and PostBack - form post lost

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.W ebControls.Drop DownList
Protected WithEvents btnAgentTools As _
System.Web.UI.W ebControls.Butt on

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

Private Sub Button1_Click(B yVal sender As _
System.Object, ByVal e As System.EventArg s) _
Handles Button1.Click
Response.Redire ct
(DropDownList1. SelectedItem.Va lue)
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
enableViewState Mac="false" /> This has solved the
problem, but I do not feel comfortable with opening a
security hole. I would like to have
enableViewState Mac="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

Nov 18 '05 #1
1 2466
sagey
1 New Member
Hello Jeffrey,

Did you ever resolve this issue? as i am having exactly the same issue as you have described. i've read the same knowledge base articles as you and it still doesn't work.

my email is sagey79@hotmail .com if you can let me know how you resolved this


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.W ebControls.Drop DownList
Protected WithEvents btnAgentTools As _
System.Web.UI.W ebControls.Butt on

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

Private Sub Button1_Click(B yVal sender As _
System.Object, ByVal e As System.EventArg s) _
Handles Button1.Click
Response.Redire ct
(DropDownList1. SelectedItem.Va lue)
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
enableViewState Mac="false" /> This has solved the
problem, but I do not feel comfortable with opening a
security hole. I would like to have
enableViewState Mac="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
May 3 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
5314
by: Max | last post by:
Frankly, i need session variables to persist regardless of load balancing. My hoster says save them in files, yuk. Are there any other thoughts The problem is that the session variables are lost when the load is switched to another server. Also, i am locked out, because there is now a cookie on my PC that will not expire until the timeout has expired? Max
2
4856
by: yagish | last post by:
Hi Techies, Am really new with the Oracle 9i Forms and am searching for a way to perform Load Balancing in Oracle 9i Forms Application. Its not a J2EE application, so cannot go the OC4J way. I need Load Balancing at 2 levels - 1) Load Balancing of the Forms Server 2) Load Balancing of the Database
3
5165
by: Shabam | last post by:
When a web application becomes overloaded with traffic, one can offload it by load balancing and clustering the front end web servers. What happens when the back-end MSSQL database becomes overloaded? Does MYSQL offer load balancing and clustering?
10
2652
by: GeekBoy | last post by:
Okay, I have two identical web servers running Windows 2003 web server. I have an ASP.NET application which runs great on one of them. Dedicated IP address, behind our firewall, etc. Everyone's happy. Now -- how do I take advantage of that second computer to "load-balance" the web site? Will it really give my users a noticable performance increase? How do you accomplish this? I've read many of those MS articles and it's...
6
4067
by: Andrew Robinson | last post by:
I am running two servers with a hardware network load balancing device. I know that to share session information between the two servers I need to implement some type of SQL based session information, but I would simply like to share the SessionID. Mainly for some logging applications. The SessionID does currently seem to be shared between the two servers and I haven't changed anything with my configuration or implemented anything...
2
2323
by: RahulBose | last post by:
I am trying to implement Load Balancing but facing some problems: A Web farm usually consists of 2 or more computers, orchestrated by some form of load balancing. Consider my scenario: 1. I have an Intranet site say www.intranet.com 2. I arrive at a load balancing machine 3. This machine redirectes me to the machine WebServer01 (contents from www.01.intranet.com are shown) 4. I request another page, for example
0
1360
by: ors.public.email | last post by:
Hi, My company has recently experienced an issue when posting back aspx pages across multiple servers that were being load balanced. In a nutshell, the problem involved initially loading the page on server A, then posting it back to server B (because of the load balancer). Occasionally, server B would fail to recognize the postback event and load the page as if we're dealing with a GET request, thus losing all the form data. Our...
4
3696
by: nemesis.saurabh | last post by:
hi, i am stuck up on this problem. In a load balanced scenario the post back is not happening i.e. when a control on the web form is clicked, the post back does not occur at the server and server code does not get executed and it times out depending on the IIS settings. For example, we have a simple web form with a button. When the button is clicked, the code in the button click event in the .cs should get executed. However this does...
1
2274
by: m.a | last post by:
Hello, I am looking for a hosting solution for my asp.net application. I found that some ISP stated that session states are not preserved in a load balancing system. As I know, if the asp.net is configured to save the session states in SQL server or file system, it would be preserved in load balancing systems. What is the whole story from the hosting point of view?
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10040
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9914
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7463
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6717
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5355
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5484
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4012
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.