Ask a Question related to ASP.NET Security, Design and Development.
-
Kevin Burton #1
Web Farm and <machineKey>
I have a Web Farm and I understand that in order to keep
ViewState safe I want to modify the <machineKey>.
1) The documentation indicates that EnableViewStateMac
defaults to "false" but I am seeing View State corruption
messages (as a result of HttpException). Can the View
State be detected as corrupt without the MAC validation?
2) I see some examples of some keys that I can use for
validation and encryption. Is there a utility that I can
use to generate a key? Yes, I understand that the same key
has to be on each member of the Web farm. I would just
like to generate my own key.
3) Is the default to encrypt and hash or just hash or none?
Thank you.
Kevin
[email]rkevinburton@charter.net[/email]
Kevin Burton Guest
-
Session Timeout and Web Farm
Hi Folks, I am creating a web service that will be hosted on a web farm. The web service also uses sessions to store user specific data. I have... -
Changing machineKey in live production site
In an effort to address ViewState invalid errors, I want to set the machineKey element in web.config on my two web servers. (The load balancer... -
alpaca Farm site
'www.nuclearfusion.com.au/alpaca.htm (http://www.nuclearfusion.com.au/alpaca.htm) tell me what you think - I've just started making it, the... -
Web Farm
Scenario is load balancer and two machines(1&2) in production. Out of state session server on another machine (Session). Works perfectly. ... -
Clustered web farm
Hi, Is it possible to redirect user to same webserver in clustered web farm until his session ends? -
Teemu Keiski #2
Re: Web Farm and <machineKey>
Hi,
1. Docs are incorrect here. enableViewStateMac="true" is the default.
2. [url]http://www.eggheadcafe.com/articles/20030514.asp[/url]
3. By default both validationKey and decryptionKey are autogenerated which
means both techniques are applied as well.
You could also take a peek at docs about <machineKey> though the article at
answer 2) covers those also.
[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/gngrfmachinekeysection.asp[/url]
--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
"Kevin Burton" <anonymous@discussions.microsoft.com> wrote in message
news:033901c39f32$08cf2440$a401280a@phx.gbl...> I have a Web Farm and I understand that in order to keep
> ViewState safe I want to modify the <machineKey>.
>
> 1) The documentation indicates that EnableViewStateMac
> defaults to "false" but I am seeing View State corruption
> messages (as a result of HttpException). Can the View
> State be detected as corrupt without the MAC validation?
>
> 2) I see some examples of some keys that I can use for
> validation and encryption. Is there a utility that I can
> use to generate a key? Yes, I understand that the same key
> has to be on each member of the Web farm. I would just
> like to generate my own key.
>
> 3) Is the default to encrypt and hash or just hash or none?
>
> Thank you.
>
> Kevin
> [email]rkevinburton@charter.net[/email]
>
Teemu Keiski Guest
-
Imtiaz Hussain #3
RE: Web Farm and <machineKey>
The purpose of the View State MAC feature is to make it impossible for
clients to send a request containing malicious View State. This feature is
enabled by default, via the enableViewStateMac="true" flag in your
machine.config. The simplest way to determine whether the issue you are
dealing with is related to the MAC is to turn off the feature, by setting
enableViewStateMac="false". If you no longer get View State errors, then
the problem is MAC related.
The viewstate error can be caused due to an underlying exception not being
handled properly.
One of the prominent causes of this error in a web farm environment is the
fact that the validation key is left as AutoGenerate.
In a Web Farm, each client request can go to a different machine on every
postback. Because of this, you cannot leave the validationKey set to
'AutoGenerate' in machine.config. Instead, you must set it to a fixed
string that is shared among all the machines on the Web Farm.
The following article tells you how to create the keys.
313091 HOW TO: Create Keys by Using Visual Basic .NET for Use in Forms
[url]http://support.microsoft.com/?id=313091[/url]
Hope this helps.
Imtiaz Hussain.
Imtiaz Hussain Guest



Reply With Quote

