Once the traffic on any website goes beyond what could be handled by single stand alone server the natural progression is to port the website into a web farm or web garden. There is a good article that explain the difference between web farm and web garden here (http://www.dotnetfunda.com/articles/article713-difference-between-web-farm-and-web-garden-.aspx ).
Few of the key points that need attention when porting an ASP.NET web application to a web farm are:
1. ViewState Machine Authentication Code Validation or ViewStateMac Validation
2. Session State Management
3. Caching
Viewstate Machine Authentication Code Validation
“EnableViewStateMac” is a security feature provided by asp.net to ensure data integrity. ViewState mac is nothing but the encrypted version of the encoded viewstate stored in the hidden variable on the page. When the property is set to true the framework will validate the viewstatemac return from the client to ensure that no data tampering has occurred. ASP.NET uses the machine key to perform the encryption and decryption.
So viewstatemac generated on a particular server in the farm will not work on a different machine as the machine key will be different. Available solutions are:
Solution 1: Disable ViewStateMac validation
We can do this by setting the web.config property “enableViewStateMac” = “false”.
<system.web>
<pages enableViewState =“false“/>
</system.web>
This is not a recommended approach as this can lead to security holes in your application.
Solution2: Matching Machine Key on every server
We can edit the machine key on every server in the farm to ensure that they match.
We can use the visual studio to generate a machine key. Please refer the following to know how:
http://support.microsoft.com/kb/312906
You can also use the following link to generate a machine key:
http://aspnetresources.com/tools/machineKey
Session State Management
For session state management to work in a web farm we need to ensure that session state mode is “OutProc”. ASP.NET provides two different “OutProc” session state management options namely:
1. ASP.NET State Server Service
2. Microsoft SQL Server
Which one of these options to select completely depends on the nature of the application and nature of the data that is stored in session. Irrespective of our choice we need to ensure that all the data stored in session are serializable for “OutProc” session management to work.
One more critical issue we need to address while using “OutProc” session management is to ensure the application path is identical in the IIS metabase on each server. Please refer to the following link to read more about this requirement:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q325056
Caching
Unique instance of Cache runs in application scope of an appdomain. This implementation makes it impossible for using the default asp.net cache in web farm. As these Caches instances run independently for each instance of the web application there is no default mechanism available to achieve synchronization among them. We can either write a custom solution that will provide as an “OutProc” cache (http://forums.asp.net/p/1077042/1588690.aspx ) or will have to use a distributed cache like NCache by Alachisoft.
Hope this would help you to port your asp.net web application to web farm with ease. Please share your comments in case I have missed points.
Popularity: 87% [?]

July 21st, 2010 at 2:27 pm
These are the main changes when we shift from single web server to multiple servers.
July 25th, 2011 at 6:44 am
Asp.net cache has some limitations in web forms. Therefore distributed caching is better option in such situation where we can’t compromise on performance and scalability is our major concern. See asp.net cache and its limitations.
July 25th, 2011 at 6:47 am
Asp.net cache has some limitations in web forms. Therefore distributed caching is better option in such situation where we can’t compromise on performance and scalability is our major concern. See Asp.Net cache and its limitations.
January 10th, 2012 at 7:27 am
Actually we have also use InProc mode with sticky session to store session in web farm