473,698 Members | 2,246 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to maintain ViewState in web-farm environment?

My question is about how to maintain view state in mobile ASP.NET
across postback / request in a web farm environment.

First of all, let's assume the web-farm does NOT use stick-session
feature. In other words, different web servers may serve different
requests in the SAME session.

In non-mobile ASP.NET, my understanding is that the view state
information is passed between each client browser and server with
every post-back. Even if the request is handled by another different
web server in the web farm, the viewstate information is still
available in the postback because it is stored in the request (not the
web server). Therefore, maintaining viewstate information is not an
issue in a web farm environment.

However, in mobile ASP.NET, view state is stored in session object
(ref: Building Microsoft ASP.NET Applications for Mobile Devices by
Andy Wigley and Peter Roxburgh - p. 386). In order to maintain view
state, is it true that the ONLY option is to store the session
information in a separate web server or database server (setting
<sessionState mode="StateServ er" or "SqlServer" > in web.config)?
Without doing that, how can we maintain the viewstate across postback
in a non-sticky-session web-farm environment?

I don't quite like the idea of storing session information in separate
web server or database server. It is because one important reason of
running a web-farm is to increase availability. If the web-server / DB
server storing the session information fails, the whole web-farm will
fail to run properly. Right?

Any insight is much appreciated! Thanks!

Dom
Nov 18 '05 #1
5 5156
SQL Server
Google: "maintain state"+"web farm"+"asp.net"
--
<%= Clinton Gallagher, "Twice the Results -- Half the Cost"
Architectural & e-Business Consulting -- Software Development
NET cs*********@REM OVETHISTEXTmetr omilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/

"Dominic" <do****@hotmail .com> wrote in message
news:2b******** *************** **@posting.goog le.com...
My question is about how to maintain view state in mobile ASP.NET
across postback / request in a web farm environment.

First of all, let's assume the web-farm does NOT use stick-session
feature. In other words, different web servers may serve different
requests in the SAME session.

In non-mobile ASP.NET, my understanding is that the view state
information is passed between each client browser and server with
every post-back. Even if the request is handled by another different
web server in the web farm, the viewstate information is still
available in the postback because it is stored in the request (not the
web server). Therefore, maintaining viewstate information is not an
issue in a web farm environment.

However, in mobile ASP.NET, view state is stored in session object
(ref: Building Microsoft ASP.NET Applications for Mobile Devices by
Andy Wigley and Peter Roxburgh - p. 386). In order to maintain view
state, is it true that the ONLY option is to store the session
information in a separate web server or database server (setting
<sessionState mode="StateServ er" or "SqlServer" > in web.config)?
Without doing that, how can we maintain the viewstate across postback
in a non-sticky-session web-farm environment?

I don't quite like the idea of storing session information in separate
web server or database server. It is because one important reason of
running a web-farm is to increase availability. If the web-server / DB
server storing the session information fails, the whole web-farm will
fail to run properly. Right?

Any insight is much appreciated! Thanks!

Dom

Nov 18 '05 #2
> I don't quite like the idea of storing session information in separate
web server or database server. It is because one important reason of
running a web-farm is to increase availability. If the web-server / DB
server storing the session information fails, the whole web-farm will
fail to run properly. Right?
It is always good to be aware of, and account for, points of failure. As
this seems to be the only issue which troubles you, let me remind you that
SQL Servers can be mirrored, and that you can set up a Fail-Over SQL Server
in case the problem you described occurs.

If, on the other hand, you're trying to make sure that there are absolutely
NO points of failure, I would suggest using an abacus. ;-)

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

"Dominic" <do****@hotmail .com> wrote in message
news:2b******** *************** **@posting.goog le.com... My question is about how to maintain view state in mobile ASP.NET
across postback / request in a web farm environment.

First of all, let's assume the web-farm does NOT use stick-session
feature. In other words, different web servers may serve different
requests in the SAME session.

In non-mobile ASP.NET, my understanding is that the view state
information is passed between each client browser and server with
every post-back. Even if the request is handled by another different
web server in the web farm, the viewstate information is still
available in the postback because it is stored in the request (not the
web server). Therefore, maintaining viewstate information is not an
issue in a web farm environment.

However, in mobile ASP.NET, view state is stored in session object
(ref: Building Microsoft ASP.NET Applications for Mobile Devices by
Andy Wigley and Peter Roxburgh - p. 386). In order to maintain view
state, is it true that the ONLY option is to store the session
information in a separate web server or database server (setting
<sessionState mode="StateServ er" or "SqlServer" > in web.config)?
Without doing that, how can we maintain the viewstate across postback
in a non-sticky-session web-farm environment?

I don't quite like the idea of storing session information in separate
web server or database server. It is because one important reason of
running a web-farm is to increase availability. If the web-server / DB
server storing the session information fails, the whole web-farm will
fail to run properly. Right?

Any insight is much appreciated! Thanks!

Dom

Nov 18 '05 #3
What if his fingers get greasy after lunch?

--
<%= Clinton Gallagher, "Twice the Results -- Half the Cost"
Architectural & e-Business Consulting -- Software Development
NET cs*********@REM OVETHISTEXTmetr omilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/
"Kevin Spencer" <ks******@takem pis.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
I don't quite like the idea of storing session information in separate
web server or database server. It is because one important reason of
running a web-farm is to increase availability. If the web-server / DB
server storing the session information fails, the whole web-farm will
fail to run properly. Right?
It is always good to be aware of, and account for, points of failure. As
this seems to be the only issue which troubles you, let me remind you that
SQL Servers can be mirrored, and that you can set up a Fail-Over SQL

Server in case the problem you described occurs.

If, on the other hand, you're trying to make sure that there are absolutely NO points of failure, I would suggest using an abacus. ;-)

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

"Dominic" <do****@hotmail .com> wrote in message
news:2b******** *************** **@posting.goog le.com...
My question is about how to maintain view state in mobile ASP.NET
across postback / request in a web farm environment.

First of all, let's assume the web-farm does NOT use stick-session
feature. In other words, different web servers may serve different
requests in the SAME session.

In non-mobile ASP.NET, my understanding is that the view state
information is passed between each client browser and server with
every post-back. Even if the request is handled by another different
web server in the web farm, the viewstate information is still
available in the postback because it is stored in the request (not the
web server). Therefore, maintaining viewstate information is not an
issue in a web farm environment.

However, in mobile ASP.NET, view state is stored in session object
(ref: Building Microsoft ASP.NET Applications for Mobile Devices by
Andy Wigley and Peter Roxburgh - p. 386). In order to maintain view
state, is it true that the ONLY option is to store the session
information in a separate web server or database server (setting
<sessionState mode="StateServ er" or "SqlServer" > in web.config)?
Without doing that, how can we maintain the viewstate across postback
in a non-sticky-session web-farm environment?

I don't quite like the idea of storing session information in separate
web server or database server. It is because one important reason of
running a web-farm is to increase availability. If the web-server / DB
server storing the session information fails, the whole web-farm will
fail to run properly. Right?

Any insight is much appreciated! Thanks!

Dom


Nov 18 '05 #4
Kevin, thanks for your reply.

Let me put my question in another way.

Let's assume the following:
- I don't want to set up SQL server to store session (say, for the
sake of performance) and so I use "Inproc" mode for session state,
- The load-balancer DOES support sticky-session, and
- I don't want to use abacus

Can I conclude that the session and viewstate information can be
safely maintained in the web server in this web farm environment for
mobile ASP.NET?

Dom

"Kevin Spencer" <ks******@takem pis.com> wrote in message news:<#2******* *******@TK2MSFT NGP12.phx.gbl>. ..
I don't quite like the idea of storing session information in separate
web server or database server. It is because one important reason of
running a web-farm is to increase availability. If the web-server / DB
server storing the session information fails, the whole web-farm will
fail to run properly. Right?


It is always good to be aware of, and account for, points of failure. As
this seems to be the only issue which troubles you, let me remind you that
SQL Servers can be mirrored, and that you can set up a Fail-Over SQL Server
in case the problem you described occurs.

If, on the other hand, you're trying to make sure that there are absolutely
NO points of failure, I would suggest using an abacus. ;-)

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

"Dominic" <do****@hotmail .com> wrote in message
news:2b******** *************** **@posting.goog le.com...
My question is about how to maintain view state in mobile ASP.NET
across postback / request in a web farm environment.

First of all, let's assume the web-farm does NOT use stick-session
feature. In other words, different web servers may serve different
requests in the SAME session.

In non-mobile ASP.NET, my understanding is that the view state
information is passed between each client browser and server with
every post-back. Even if the request is handled by another different
web server in the web farm, the viewstate information is still
available in the postback because it is stored in the request (not the
web server). Therefore, maintaining viewstate information is not an
issue in a web farm environment.

However, in mobile ASP.NET, view state is stored in session object
(ref: Building Microsoft ASP.NET Applications for Mobile Devices by
Andy Wigley and Peter Roxburgh - p. 386). In order to maintain view
state, is it true that the ONLY option is to store the session
information in a separate web server or database server (setting
<sessionState mode="StateServ er" or "SqlServer" > in web.config)?
Without doing that, how can we maintain the viewstate across postback
in a non-sticky-session web-farm environment?

I don't quite like the idea of storing session information in separate
web server or database server. It is because one important reason of
running a web-farm is to increase availability. If the web-server / DB
server storing the session information fails, the whole web-farm will
fail to run properly. Right?

Any insight is much appreciated! Thanks!

Dom

Nov 18 '05 #5
Be aware that you will still have session problems with InProc if the
servers in your farm are multi-processor machines running IIS6 with web
gardens enabled. This is because each processor will be given its own
worker process and each worker process will have its own session and
application objects in memory. Application isn't a problem bu session
will be if you don't at minimum configure StateServer on the same
machine for the two worker processes to talk to. This may not be an
issue for you (if you are not using IIS6 or web gardens) but it is worth
mentioning when someone is looking for possible issue.

Have A Better One!

John M Deal, MCP
Necessity Software

P.S. I just noticed the mention of the "mobile" qualification and have
no idea how that impacts my statements above as I've never tried the
scenario with a mobile device but I still think it is worth mentioning
"just-in-case."

Dominic wrote:
Kevin, thanks for your reply.

Let me put my question in another way.

Let's assume the following:
- I don't want to set up SQL server to store session (say, for the
sake of performance) and so I use "Inproc" mode for session state,
- The load-balancer DOES support sticky-session, and
- I don't want to use abacus

Can I conclude that the session and viewstate information can be
safely maintained in the web server in this web farm environment for
mobile ASP.NET?

Dom

"Kevin Spencer" <ks******@takem pis.com> wrote in message news:<#2******* *******@TK2MSFT NGP12.phx.gbl>. ..
I don't quite like the idea of storing session information in separate
web server or database server. It is because one important reason of
running a web-farm is to increase availability. If the web-server / DB
server storing the session information fails, the whole web-farm will
fail to run properly. Right?


It is always good to be aware of, and account for, points of failure. As
this seems to be the only issue which troubles you, let me remind you that
SQL Servers can be mirrored, and that you can set up a Fail-Over SQL Server
in case the problem you described occurs.

If, on the other hand, you're trying to make sure that there are absolutely
NO points of failure, I would suggest using an abacus. ;-)

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

"Dominic" <do****@hotmail .com> wrote in message
news:2b****** *************** ****@posting.go ogle.com...
My question is about how to maintain view state in mobile ASP.NET
across postback / request in a web farm environment.

First of all, let's assume the web-farm does NOT use stick-session
feature. In other words, different web servers may serve different
requests in the SAME session.

In non-mobile ASP.NET, my understanding is that the view state
informatio n is passed between each client browser and server with
every post-back. Even if the request is handled by another different
web server in the web farm, the viewstate information is still
available in the postback because it is stored in the request (not the
web server). Therefore, maintaining viewstate information is not an
issue in a web farm environment.

However, in mobile ASP.NET, view state is stored in session object
(ref: Building Microsoft ASP.NET Applications for Mobile Devices by
Andy Wigley and Peter Roxburgh - p. 386). In order to maintain view
state, is it true that the ONLY option is to store the session
informatio n in a separate web server or database server (setting
<sessionStat e mode="StateServ er" or "SqlServer" > in web.config)?
Without doing that, how can we maintain the viewstate across postback
in a non-sticky-session web-farm environment?

I don't quite like the idea of storing session information in separate
web server or database server. It is because one important reason of
running a web-farm is to increase availability. If the web-server / DB
server storing the session information fails, the whole web-farm will
fail to run properly. Right?

Any insight is much appreciated! Thanks!

Dom

Nov 18 '05 #6

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

Similar topics

3
3459
by: | last post by:
This is a very open ended question. I have an app with a page that uses link buttons to change the display. On the prior page you have a list of objects. You click one of those objects to see it's details. I have nav Link buttons that allow you to go to previous or next object from the object list on previous page. In the command event of the linkbutton, the page is redrawn with the details of the next or previous object. I am using...
9
21642
by: John Kirksey | last post by:
I have a page that uses an in-place editable DataGrid that supports sorting and paging. EnableViewState is turned ON. At the top of the page are several search fields that allow the user to filter the results in the grid. Say you filter the grid for records that have a certain condition set to "NO" (in this case a checkbox). In this scenario the search returns one result. If I then check the checkbox ("YES") and save it, I now get my message...
3
2645
by: Steve Drake | last post by:
All, I have a CONTROL that contains 1 control (Control ONE), the 1 control that it can contain 1 or 2 control (Control A and B). Control A, raises and event and Control ONE receives this event and this causes control B to be created, when this is done the VIEWSTATE is lost for CONTROL B. In the EVENT that causes CONTROL B to be created I have to set
2
3193
by: Jay Walker | last post by:
I created a custom DataGridColumn based on Marcie Robillard's MSDN Article: Creating Custom Columns for the ASP.NET Datagrid http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/creatingcustomcolumns.asp The problem I am having is that the data in the custom datagridcolumn is not saved to viewstate and after postback, the column does not contain data.
5
1315
by: DC Gringo | last post by:
I have an asp.net vb page with two web user controls on it. The first user control, uc1.ascx has a series of list boxes that are populated in series by each other with ONSELECTEDINDEXCHANGED. In the second control, uc2.ascx, lower down on the page, there is an imagebutton. When the imagebutton is clicked, it goes to the same page with a change in url parameter pageID. The control mentioned above sticks around, while the second one is...
7
2033
by: Tom wilson | last post by:
I have created a very simple example that doesn't work. Form1 contains a textbox and a button: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Response.Redirect("login.aspx") End Sub Very simple. Forget what login.aspx does, it's just somewhere to redirect to.
12
1865
by: Tom wilson | last post by:
This is the same topic as the thread above, "Dealing with the Back button". I'm getting nowhere. The closest I've come is a sample left for me: <%@ Page Language="vb" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> </head> <body>
4
3352
by: bijoy | last post by:
My page has a Listbox called Rooms, a text field called chairPerson and a button called Add. When Add is clicked, the script needs to display the selected info in a datagrid. For example, if the user selects Rooms 1,5 and 7, and enters Bijoy for chairperson and clicks Add, a datagrid on the page should display the following:
7
10346
by: Andrew Robinson | last post by:
I have a treeview control that I use as a menu & navigation control within a master page. The nodes for this control are loaded from a database which contains the text and url of each like and the hierarchy of the menu tree. All pretty normal stuff. Is there any simple method of maintaining the expanded / collapsed state of each node as my application moves from page to page? Remember this is on a master page used by numerous content...
4
8543
by: Jason | last post by:
I have a DataTable from which I am trying to delete rows using the DataGrid control. However, I'm having trouble maintaining the changes to the DataTable between PostBacks. This is my first go 'round with the DataGrid control, so pardon me if there are glaring mistakes... public partial class control_panel_mail_Default : System.Web.UI.Page { private DataTable dt; protected void Page_Load(object sender, EventArgs e)
0
8674
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8603
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
9027
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
8895
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,...
1
6518
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
5860
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
4369
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
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2329
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.