Skip to main content

Posts

Showing posts from February, 2007

Application deployed on a web farm - View state validation.

By default, ASP.Net 2.0 encrypts the data in the ViewState with a private key generated on the server. This key is unique to the server. So in a scenario where there is more than one server e.g. in a web farm, each server will generate its own key. This is where the trouble starts. Consider there are 3 servers A, B and C. Say users first request is served by server A. Now when user posts the data back, say the request is sent to server B. Server B will now try to validate the data in ViewState with its own key. As the key is different to the one with which the data was encrypted, it will fail validation and will raise "Unable to validate data" error. To avoid this, configures MachineKey element in Web.Config for a cohosted website or in Machine.Config for dedicated server. Please see http://msdn2.microsoft.com/en-us/library/ms998288.aspx on how to configure machinekey. DebugGuru

Testing performance of ASP.Net Application

I have been looking at various ways of testing the performance of ASP.Net applications. Here are few tools that might be useful. 1. Application Test Center by Microsoft If you have Microsoft Visual Studio 2005 enterprise version, then you will have this software included. Please see http://msdn.microsoft.com/msdnmag/issues/05/06/ExtremeASPNET/ on how to use this great tool. 2. BadBoy This is another good software. Please visit http://www.badboy.com.au/ to download the software. This software can be used for free if you are a non profit organisation. 3. LoadRunner If you are a commerical organisation and have a good size budget, this is the software for you. Please visit http://www.mercury.com/us/products/performance-center/loadrunner/ for more information. This software gives you lot more control and has good reporting tools as well. You need special training to use this software or you can have a consultant doing the job for you. Happy performance testing. Thanks DebugGuru