473,401 Members | 2,125 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

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="StateServer" 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 5139
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*********@REMOVETHISTEXTmetromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/

"Dominic" <do****@hotmail.com> wrote in message
news:2b*************************@posting.google.co m...
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="StateServer" 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.google.co m... 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="StateServer" 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*********@REMOVETHISTEXTmetromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/
"Kevin Spencer" <ks******@takempis.com> wrote in message
news:%2****************@TK2MSFTNGP12.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.google.co m...
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="StateServer" 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******@takempis.com> wrote in message news:<#2**************@TK2MSFTNGP12.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.google.co m...
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="StateServer" 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******@takempis.com> wrote in message news:<#2**************@TK2MSFTNGP12.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.google. 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="StateServer" 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
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...
9
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...
3
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...
2
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...
5
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. ...
7
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...
12
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...
4
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...
7
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...
4
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.