473,406 Members | 2,208 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

enableViewStateMAC and 3DES

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
Jul 21 '05 #1
3 5060
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...b;en-us;312906

HTH,
Jorge

"Simang" wrote:
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

Jul 21 '05 #2
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

Jul 21 '05 #3
Mayet,

Did you try generating keys for the machineKey using the link I sent you?

http://support.microsoft.com/default...b;en-us;312906

Make sure you use 24 for 3DES as input to the code in the above kb article.

HTH,
Jorge

"ma******@gmail.com" wrote:
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

Jul 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: underwmd | last post by:
Hello, My problem is two fold. 1) I must support a deployed legacy application written in VB6 SP5. I need to export data from a database, compress it and the encrypt the data using 3DES (to...
0
by: Simang | last post by:
Hi, Im just wondering, I set the enableViewStateMAC to true and the machineKey validation to 3DES is my web.config. How do I test my asp.net pages if its really working? Thanks! Mayet
2
by: Simang | last post by:
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...
1
by: Sathyaish | last post by:
I have the following scenario: Algorithm: 3DES Cipher Mode: CBC Key Size: 128-bit Block Size: 64 bit IV: 0x0000000000000000 (an eight byte array of zeros) The results I get using .NET with...
1
by: tshad | last post by:
I am trying to use 3DES to encrypt my keys and am using VS 2003. I am confused with some code I have that seems to use a hash (MD5) in the 3DES. But a Hash is one way. You are not suppose to be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.