Last post Nov 12, 2013 11:42 PM by klpatil
Nov 11, 2013 11:15 PM|klpatil|LINK
Our application has MachineKey as AutoGenerate, IsolateApps.
Was going through this document,
http://msdn.microsoft.com/en-us/library/ff649308.aspx and it stats that
In the default settings shown above, the AutoGenerate setting instructs
ASP.NET to generate a random key. The IsolateApps modifier causes
ASP.NET to generate a unique key for each application on your server by using the application ID of each application.
Now, last weekend we upgraded our application pool and aplication from .NET 3.5 (App Pool 2.0) to 4.0 (App Pool 4.0) and after that we are getting Viewstate related errors from the applications which are using old view state.</div>
Can you please help us to understand why so? Also, Can I print MachineKey? And what is Application ID? It generates it on each start-up?
Nov 12, 2013 01:23 AM|hans_v|LINK
The machinekey is used (among others) to encrypt and decrypt the viewstate. With your settings, a random key is generated. But if the application pool recycles a new key is generated. When the viewstate was encrypted using the previous generated key, it
cannot be decrypted using the new key, and an error wil be raised. To solve the problem, simple add a machinekey (instead of ASP.NET generating a random key), so the same key is used on each and every request:
Nov 12, 2013 11:42 PM|klpatil|LINK
Thank you for your reply!
>>But if the application pool recycles a new key is generated
Are you sure on this? Because we recycle our application pool every Saturday. And If that's the case. We should have faced this issue earlier. But that's not the case.