all groups > asp.net mobile > november 2004 >
asp.net mobile :
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!
SQL Server Google: "maintain state"+"web farm"+"asp.net" -- <%= Clinton Gallagher, "Twice the Results -- Half the Cost" Architectural & e-Business Consulting -- Software Development NET csgallagher@REMOVETHISTEXTmetromilwaukee.com URL http://www.metromilwaukee.com/clintongallagher/ [quoted text, click to view] "Dominic" <domtam@hotmail.com> wrote in message news:2b7c69f5.0411171708.dd94368@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
[quoted text, click to view] > 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. [quoted text, click to view] "Dominic" <domtam@hotmail.com> wrote in message news:2b7c69f5.0411171708.dd94368@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
What if his fingers get greasy after lunch? -- <%= Clinton Gallagher, "Twice the Results -- Half the Cost" Architectural & e-Business Consulting -- Software Development NET csgallagher@REMOVETHISTEXTmetromilwaukee.com URL http://www.metromilwaukee.com/clintongallagher/ [quoted text, click to view] "Kevin Spencer" <kspencer@takempis.com> wrote in message news:%232B4kiXzEHA.2876@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" <domtam@hotmail.com> wrote in message > news:2b7c69f5.0411171708.dd94368@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 > >
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 [quoted text, click to view] "Kevin Spencer" <kspencer@takempis.com> wrote in message news:<#2B4kiXzEHA.2876@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" <domtam@hotmail.com> wrote in message > news:2b7c69f5.0411171708.dd94368@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! > >
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." [quoted text, click to view] 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" <kspencer@takempis.com> wrote in message news:<#2B4kiXzEHA.2876@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" <domtam@hotmail.com> wrote in message >>news:2b7c69f5.0411171708.dd94368@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! >>>
Don't see what you're looking for? Try a search.
|
|
|