469,645 Members | 1,971 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,645 developers. It's quick & easy.

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 4927
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by John Kirksey | last post: by
3 posts views Thread by Steve Drake | last post: by
5 posts views Thread by DC Gringo | last post: by
7 posts views Thread by Tom wilson | last post: by
12 posts views Thread by Tom wilson | last post: by
4 posts views Thread by bijoy | last post: by
7 posts views Thread by Andrew Robinson | last post: by
4 posts views Thread by Jason | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.