<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Basic Sample - How To Keep ASP.NET ViewState On The Server</title><link>http://blogs.msdn.com/alikl/archive/2008/01/02/basic-sample-how-to-keep-asp-net-viewstate-on-the-server.aspx</link><description>During recent few engagements with my customers I've noticed&amp;#160; VIewState is extensively [unintentionally] used. ViewState is on by default. The result is heavy weight Html that round trips on the network. This causes slow response time and high network</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Basic Sample - How To Keep ASP.NET ViewState On The Server</title><link>http://blogs.msdn.com/alikl/archive/2008/01/02/basic-sample-how-to-keep-asp-net-viewstate-on-the-server.aspx#6954936</link><pubDate>Wed, 02 Jan 2008 17:05:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6954936</guid><dc:creator>shuj</dc:creator><description>&lt;p&gt;What about if your customer uses more than one page in the same session? I think he won't be happy...&lt;/p&gt;</description></item><item><title>re: Basic Sample - How To Keep ASP.NET ViewState On The Server</title><link>http://blogs.msdn.com/alikl/archive/2008/01/02/basic-sample-how-to-keep-asp-net-viewstate-on-the-server.aspx#6956622</link><pubDate>Wed, 02 Jan 2008 19:40:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6956622</guid><dc:creator>Russ</dc:creator><description>&lt;p&gt;Dude, WAY Simplier&lt;/p&gt;
&lt;p&gt;protected override PageStatePersister PageStatePersister&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;get&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return new SessionPageStatePersister(Page);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;</description></item><item><title>re: Basic Sample - How To Keep ASP.NET ViewState On The Server</title><link>http://blogs.msdn.com/alikl/archive/2008/01/02/basic-sample-how-to-keep-asp-net-viewstate-on-the-server.aspx#6958070</link><pubDate>Wed, 02 Jan 2008 22:18:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6958070</guid><dc:creator>kazlak</dc:creator><description>&lt;p&gt;saving viewstatesss to session? unless you are kidding me this is not for real world web applications.&lt;/p&gt;</description></item><item><title>re: Basic Sample - How To Keep ASP.NET ViewState On The Server</title><link>http://blogs.msdn.com/alikl/archive/2008/01/02/basic-sample-how-to-keep-asp-net-viewstate-on-the-server.aspx#6958396</link><pubDate>Wed, 02 Jan 2008 22:51:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6958396</guid><dc:creator>alikl</dc:creator><description>&lt;p&gt;@shuj - Good question! Dino has an aswer.&lt;/p&gt;
&lt;p&gt;from &lt;a rel="nofollow" target="_new" href="http://msdn.microsoft.com/msdnmag/issues/03/02/CuttingEdge/#S6"&gt;http://msdn.microsoft.com/msdnmag/issues/03/02/CuttingEdge/#S6&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;How should you choose the name of the file to ensure that no conflicts arise? The view state is specific to a page request made within a particular session. So the session ID and the request URL are unique pieces of information that can be used to associate the request with the right file. Alternatively, you could give the view state file a randomly generated name and persist the file name in a custom hidden field within the page&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;@Russ - I am not sure i get this.I need to do my H/W here. Thanks for the code.&lt;/p&gt;
&lt;p&gt;@kazlak - I think I know what you mean. I saw cases where session was not the option i saw also cases where it perfectly was. Both were very real to me :). Any way the sample demonstrate overrideing Page's ViewState relevant methods - way too many developers are not aware of it. The rest is up to your imagination - save it to Session, DB, files, even Cache [i did that too - we had our reasons for that - very real world reasons]. Yesterday i was at customer's where we implemented &amp;nbsp;it and explained implications of using session for saving ViewSate. He understood and accepted the risks. All is happy. What are the risks of using Session from your stand?&lt;/p&gt;
</description></item><item><title>re: Basic Sample - How To Keep ASP.NET ViewState On The Server</title><link>http://blogs.msdn.com/alikl/archive/2008/01/02/basic-sample-how-to-keep-asp-net-viewstate-on-the-server.aspx#6959770</link><pubDate>Thu, 03 Jan 2008 00:44:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6959770</guid><dc:creator>Russ</dc:creator><description>&lt;p&gt;Sorry, should have included....&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://msdn2.microsoft.com/en-us/library/system.web.ui.sessionpagestatepersister.sessionpagestatepersister.aspx"&gt;http://msdn2.microsoft.com/en-us/library/system.web.ui.sessionpagestatepersister.sessionpagestatepersister.aspx&lt;/a&gt;&lt;/p&gt;</description></item><item><title>re: Basic Sample - How To Keep ASP.NET ViewState On The Server</title><link>http://blogs.msdn.com/alikl/archive/2008/01/02/basic-sample-how-to-keep-asp-net-viewstate-on-the-server.aspx#6959796</link><pubDate>Thu, 03 Jan 2008 00:47:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6959796</guid><dc:creator>Russ</dc:creator><description>&lt;p&gt;And, again because I can't put two thoughts into the same submission....&lt;/p&gt;
&lt;p&gt;The code that Dino goes into is great, we used a version of it for a while, but did run into problems when session would time out with out implimentation.&lt;/p&gt;
&lt;p&gt;What Dino's code also gives you is the ability to deploy this with all versions of .NET, where the SessionPageStatePersister is new to 2.0&lt;/p&gt;</description></item><item><title>re: Basic Sample - How To Keep ASP.NET ViewState On The Server</title><link>http://blogs.msdn.com/alikl/archive/2008/01/02/basic-sample-how-to-keep-asp-net-viewstate-on-the-server.aspx#6962214</link><pubDate>Thu, 03 Jan 2008 05:48:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6962214</guid><dc:creator>kazlak</dc:creator><description>&lt;p&gt;alik am sure you understand the risks already, am more interested now to know scalable is the application you are referring to. things like how many concurrent users are you talking about? what is the server architecture that this application can be deployed to?.. etc&lt;/p&gt;</description></item><item><title>re: Basic Sample - How To Keep ASP.NET ViewState On The Server</title><link>http://blogs.msdn.com/alikl/archive/2008/01/02/basic-sample-how-to-keep-asp-net-viewstate-on-the-server.aspx#6963271</link><pubDate>Thu, 03 Jan 2008 07:48:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6963271</guid><dc:creator>alikl</dc:creator><description>&lt;p&gt;@Russ - be sure you got me hooked on this new feature and i am definitely going to do my H/W :) – thanks. BTW – w/r to session expiration, I hit the same problem once. This was the case where we decided to put into Cache – it is independent from Session and then we set proper expiration timeout. &lt;/p&gt;
&lt;p&gt;@kazlak – totally agree and I even – it is less scalable approach. I hate the fact I did not state it in first place – good catch! Imagine the situation where the application cannot breath…. Because of ViewSate of 400-600 Kb. It is in production and your end users are really mad at you. What would you prefer to make it breath or make the “right” architecture. Things like that. It depends where you at with the project – inception phase or fire alarm in production. That is why I am a big fun of PDL – performance development lifecycle. Doing right things during all dev stages. And not waiting for a fire alarm when in production&lt;/p&gt;
</description></item><item><title>How To Keep ASP.NET ViewState On The Server – Revised</title><link>http://blogs.msdn.com/alikl/archive/2008/01/02/basic-sample-how-to-keep-asp-net-viewstate-on-the-server.aspx#7032153</link><pubDate>Tue, 08 Jan 2008 23:13:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7032153</guid><dc:creator>alik levin's</dc:creator><description>&lt;p&gt;This is a follow up post to Basic Sample - How To Keep ASP.NET ViewState On The Server ASP.NET 2.0 offers&lt;/p&gt;
</description></item><item><title>Basic Sample - How To Keep ASP.NET ViewState On The Server</title><link>http://blogs.msdn.com/alikl/archive/2008/01/02/basic-sample-how-to-keep-asp-net-viewstate-on-the-server.aspx#7125706</link><pubDate>Wed, 16 Jan 2008 07:16:41 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7125706</guid><dc:creator>Vincent Yang</dc:creator><description>&lt;p&gt;Ref:ArticleDuringrecentfewengagementswithmycustomersI'venoticed&lt;/p&gt;
</description></item></channel></rss>