2 Replies Latest reply: Apr 26, 2012 3:37 AM by IHodgetts RSS

    VIEWSTATE in ASP.NET Applications (sometimes not being changed)

    IHodgetts
      Has anyone any experience of dealing with the __VIEWSTATE (and __EVENTVALIDATION) variables as used by ASP.NET applications?

      I've dealt with them before in OATS but recently I've encountered an issue whereby on some steps, the __VIEWSTATE isn't being identified as dynamic. The majority of the steps do have a "SolveXPath: web.input.VIEWSTATE_xxx" where xxx is the unique identifier assigned by OpenScript. However certain other steps don't generate these.

      I even have a custom correlation rule set up to attempt to catch these (but re-recording with that in place also doesn't generate a dynamic value).

      I get the impression something is staring me in the face here (and I'm just not seeing it).

      Any tricks/tips on VIEWSTATE would be appreciated.
        • 1. Re: VIEWSTATE in ASP.NET Applications (sometimes not being changed)
          glenn.s
          When you have any variables that are not being correlated as you assume they should, the quickest verification is to turn off all other correlation rules except your custom one (and/or in this case the default openscript viewstate rule). Most likely there is another rule that is matching some sub-string contained in the viewstate. Since viewstate is usually extremely long it's possible for a substring mismatch. In the end you will be able to move the most important rule to the top of the correlation rules/library list. I have not worked on a .NET application with viewstate/eventvalidation in any 9.x version, but I recall similar problems in older versions.
          • 2. Re: VIEWSTATE in ASP.NET Applications (sometimes not being changed)
            IHodgetts
            Thanks for that. I'd already headed down the route of re-ordering my custom correlation rules but haven't actually tried disabling the majority.