1

I have used MachineKey.Encode to encrypt a ID that is getting passed as a query string to a page but as expected this is making the URL huge.

Is there a option such as HTTP handlers that could customize the url but still load the required page?

Also I am yet to find out if MachineKey.Encode is using the MachineKey that I have defined in my web.config file to encrypt the data, can anybody confirm this for me with web information that backs this up.

Thanks.

4
  • Have a look at this stackoverflow.com/questions/2989703/… Commented Feb 24, 2012 at 11:07
  • not clear what is your problem here - not clear what you ask - what you try to solve. Commented Feb 24, 2012 at 11:50
  • I was passing a encrypted value as a query string and was wondering if there was a method customizing the url to not show the query string. Commented Feb 24, 2012 at 12:18
  • Couldn't you just 'POST' the request instead? Commented Feb 24, 2012 at 13:47

1 Answer 1

0

Also I am yet to find out if MachineKey.Encode is using the MachineKey that I have defined in my web.config file to encrypt the data, can anybody confirm this for me with web information that backs this up.

It does indeed use the configured keys. MachineKey calls MachineKeySection.EncryptOrDecryptData to perform the encryption, which uses encryption objects configured from the machine key section. If you want to see for yourself, the interesting calls are EncryptOrDecryptData=>EnsureConfig=>ConfigureEncryptionObject=>SetKeyOnSymAlgorithm

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.