473,378 Members | 1,482 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,378 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 5054
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.