Search code examples
asp.netsessionvariablesviewstate

Tool (similar to Firebug) for editing session and viewstate variables real time


Does anyone have any good methodologies OR tools for editing session variables and viewstate variables real time for ASP.NET? Every time I want to test something, I need to update my source code, recompile my application and then log in again, then navigate to the page I'm testing. It would be really efficient if there was a tool out there, similar to Firebug, where you can change a variable and see the outcome immediately. Am I dreaming or is there such a thing? If not, is there something that shows me a nice easily readable representation of the session variables and viewstate?


Solution

  • Session variables are stored on server. There is no way you can view/tweak them in the browser.

    Viewstate on the other hand can be decoded. Here's an online decoder: http://lachlankeown.blogspot.com/2008/05/online-viewstate-viewer-decoder.html

    However, modifying it is tricky and .Net guards against tampering.

    But then, Session/Viewstate are not like dom/script/css elements where you may want to tweak one or two settings and fix the issue. Tweaking them is not going to be easy, nor is it going to server the same purpose/benefit.

    Let me know if I'm overlooking something.