Generate Machine Key For Web Config
The all-in-one ultimate online toolbox that generates all kind of keys! Every coder needs All Keys Generator in its favorites! Php artisan generate key command. It is provided for free and only supported by ads and donations. Jan 04, 2017 Overview: The property in web.config file configures algorithms and keys to use for encryption, decryption, and validation of forms-authentication data and view-state data, and for out-of-process session state identification.This encryption prevents tempering of session data on the server.
Is machine key required for a web application with single page using view state
May 08, 2017 01:10 PMragavalliLINK
I have created a web forms .net application which has jut got one page with four input fields.
I am storing the input parameters in the view state to be available between post backs.
This application is now deployed onto live server which is actually load balanced between two servers.
When I load the page, it works fine. But this application is going to be used by
10,000 users.
There is no machine key on the web.config file for this application. I read in a documentation when a application
is loaded on a web farm(when load balanced between two servers), a machine key is required to preserve
view state information.
C# Generate Machine Key
So I tried to generated a machine key on my local host with the following settings
Encryption method: SHA1
Decryption method: auto
Validation key:
Automatically generate at runtime (unchecked)
Generate a unique key for each application (unchecked)
Web.config File Example
Decryption key:
Automatically generate at runtime (unchecked)
Generate a unique key for each application (unchecked)
I used the generated keys on the web.config of live server, but the application fails to load trying to load the login
page which is not my start page.
Web Config Configuration Files
So my questions are:
1) Do I really need a machine key as the application is loading without it?
2) When thousands of users use the applicaiton page at the same time, is it alright without machine key?
3) If machine key is required, how is it generated and what encryption method, validation key and decryption key
parameters need to be used?