enableViewStateMAC and 3DES

  • Thread starter Thread starter Simang
  • Start date Start date
S

Simang

Hi,

I am trying to encrypt viewstate in my ASP.NET web site.
I put these items in the web.config..

<pages enableViewStateMac="true" />
<machineKey validation="3DES"/>

However, when I tried to access the .NET pages, I encountered the ff error:

"Specified key is not a valid size for this algorithm"

What could be wrong?

Help from anyone will be much appreciated!

Thanks!

Mayet
 
Simang,

I'm not sure if this will solve your problem but try adding the following
attributes to your <machineKey> element:

<machineKey validationKey="AutoGenerate,IsolateApps"
decryptionKey="AutoGenerate,IsolateApps"
validation="3DES"/>

If your app is running in a web farm, you'll need to generate a unique key
for both the validationKey and decryptionKey attributes.

http://support.microsoft.com/default.aspx?scid=kb;en-us;312906

HTH,
Jorge
 
Hi! Thanks for the reply.
I tried your suggestion but unfortunately, its still not working :(

What's really puzzling is that I tried it with another PC, same PC
specs, same dotnet version but it worked.
Im really stumped now.. could this be some other configuration? in the
web.config or machine.config perhaps?

Any help will be appreciated...

Thanks!

Mayet
 
Back
Top