Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 989119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T05:44:25+00:00 2026-05-16T05:44:25+00:00

I need to thread state through the client, but only for particular get requests

  • 0

I need to thread state through the client, but only for particular get requests (aka links). As such, I don’t want to add this state to the client’s ViewState, cluttering it up. The state needs to be encrypted. How can I create a new ViewState-like dictionary and encrypt it with the key and settings from MachineKey in machine.config? If the dictionary component isn’t exposed, how can I encrpyt/decrypt strings using the key from machine.config. I don’t want to add more configuration that must be replicated across our server farm to duplicate existing functionality.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T05:44:26+00:00Added an answer on May 16, 2026 at 5:44 am

    The machine key configuration is accessible through System.Web.Configuration.MachineKeySection which has no public methods besides a constructor and Reset.

    Decryption of strings is handled by the following method:

    .method assembly hidebysig static string 
        DecryptStringWithIV(string s,
                            valuetype System.Web.Configuration.IVType ivType) cil managed
    

    Which calls

    .method assembly hidebysig static uint8[] 
        EncryptOrDecryptData(bool fEncrypt,
                             uint8[] buf,
                             uint8[] modifier,
                             int32 start,
                             int32 length,
                             bool useValidationSymAlgo,
                             bool useLegacyMode,
                             valuetype System.Web.Configuration.IVType ivType) cil managed
    

    These are both private; the encryption/decryption functionality isn’t exposed. It might be possible to access decryption through implementations of System.Web.IHttpHandler by constructing an HttpContext, though I’m not sure where one could go to call the encryption functionality.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 495k
  • Answers 495k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Any changes to compiled code will require a rebuild. This… May 16, 2026 at 11:26 am
  • Editorial Team
    Editorial Team added an answer You can get the number of lines using: $file =… May 16, 2026 at 11:26 am
  • Editorial Team
    Editorial Team added an answer You don't need to init frameBuf if you use binRead.ReadBytes… May 16, 2026 at 11:26 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I need to load textures in background thread in OpenGL ES. But glGenTextures always
I went through some tutorials on the State monad and I think I got
I need to send messages to the GUI thread which should be processed the
Is it possible to run R in Processing through rJava/JRI? If I deployed a
Suppose a application level protocol is implemented via UDP. Client timeout is required, thus
I am going through a java 6 book. A sample code snippet is given
I am working through some of the exercises in The C++ Programming Language by
In C#, a class field means every thread has its own instance of that
I am doing development of a Tomcat webapp and need to be able to
I've managed to implement the code on this listing to get a list of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.