Loading ...
Sorry, an error occurred while loading the content.

Re: View State Verification Errors

Expand Messages
  • alnoorkhimani
    Hi James, Diff utility is useful but in this case viewstate has a timeout of 30 minutes so 2 recordng will show the same viewstate in 30 min time window. Have
    Message 1 of 4 , Nov 1, 2010
    • 0 Attachment
      Hi James,

      Diff utility is useful but in this case viewstate has a timeout of 30 minutes so 2 recordng will show the same viewstate in 30 min time window.

      Have anyone used any custom header file for base64 encoding for a viewstate and make it worked successfully?

      Regards,
      Al

      --- In LoadRunner@yahoogroups.com, James Pulley <loadrunner-lists@...> wrote:
      >
      > Record business process twice
      >
      > diff the recordings. Make note of the differences which resolve to
      > correlation candidates
      >
      > Examine each candidate, correlating/parameterizing where necessary
      >
      > Replay.
      >
      > Your viewstate issue is a well-known challenge, with correlation of the
      > viewstate information at the core of the solution.
      >
      > James Pulley, http://www.loadrunnerbythehour.com/PricingMatrix
      >
      > On Fri, 2010-10-29 at 03:28 +0000, alnoorkhimani wrote:
      > > Hello everyone,
      > >
      > > I am working on MS Sharepoint application. When I am submitting a correlated parameter of _VIEWSTATE on a save form, I am getting back error from server about invalid view state. The viewstate parameter on the form is actully a hidden parameter and I confirmed with development guys that it only accept base64 encoding. I wonder how to achieve it inside loadrunner. I tried converting the correlated value to plain and URL encoding but no solution works.
      > > Here is a sample viewstate from the application. I have truncated the mid part for readability but gives an idea. Its not too huge upto mb.
      > > I have also pasted some section for request loadrunner sending to submit the following form.
      > > As you can see that in the request it has replacing / with %2F in URL as well as plain encoding.I think this is where its actually breaking on server as we can see Viewstate verification errors.
      > >
      > > I have also pasted the relevant script code following the request chunk. Can anyone please advise if you have come across similiar issue? How it was resolved?
      > >
      > > ViewState in a response from prior call to submit form:
      > > =======================================================
      > > <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJMTc0NzUyMzgyD2QWAmYPZBYCAgEPZBYCAgMPZBYYAgMPZBYCBSZnX2VWJyb29rIFRlY2hub2xvZ3kgSFNkZAI/D2QWAgIBD2QWAgIHD2QWAgIBDw8WAh8AaGQWAgIDD2QWAgIDD2QWAgIBDzwrAAkBAA8WAh4NTmV2ZXJFeHBhbmRlZGdkZAJBD2QWAmYPDxYCHwBnZGRkQTnU8EtIUGNfvJACFS3CszH4CyE=" />
      > >
      > >
      > >
      > > ViewState in following Form Request from LoadRunner
      > > ===================================================
      > > __VIEWSTATE=%2FwEPDwUJMTc0NzUyMzgyD2QWAmYPZBYCAgEPZBYCAgMPZBYYAgMPZBYCBSZnX2ViZWFkZjk2X2ZmZTNfNDkwZV85OTJmXzU4NDlhZTRlODgzNA9kFgJmD2QWEAIDD2QWAgIBD2QWBgIBDxYCHgdWaXNpYmxlaGQCAw9kFgJmD2QWAgIDDw8WBh4EVGV4dAUEU2F2ZR4NT25DbGllbnRDbGljawUhaWYgKCFQcmVTYXZlSXRlbSgpKSByZXR1cm4
      > >
      > >
      > > LOADRUNNER SCRIPT:
      > > ==================
      > > web_set_max_html_param_len("200000");
      > >
      > > //View State Correlation
      > > web_reg_save_param_ex("ParamName=ViewState",
      > > "LB/IC=<input type=\"hidden\" name=\"__VIEWSTATE\" id=\"__VIEWSTATE\" value=\"",
      > > "RB/IC=\" />",
      > > SEARCH_FILTERS,
      > > "IgnoreRedirections=Yes",
      > > "RequestUrl=*/EditForm.aspx*",
      > > LAST);
      > >
      > > //URL which is used for correlation
      > >
      > > web_url("listform.aspx_2",
      > > "URL=https://ebp-r2.test.det.nsw.edu.au/sites/43sajzso/_layouts/listform.aspx?ListId={8fc0db4b-1950-4398-84fd-c2a5dbd2bf87}&PageType=6&ID=3&Source=https%3A%2F%2Febp%2Dr2%2Etest%2Edet%2Ensw%2Eedu%2Eau%2Fsites%2F43sajzso%2FPages%2Fworkspace%2Easpx",
      > > "Resource=0",
      > > "RecContentType=text/html",
      > > "Referer=",
      > > "Snapshot=t26.inf",
      > > "Mode=HTML",
      > > LAST);
      > >
      > > //I have tried converting it into URL encoding as well as plain //encoding. I suppose plain encoding should convert it into base64 //but I dont think its a case here.
      > >
      > > web_convert_param("ViewState1","SourceString={ViewState}","SourceEncoding=HTML","TargetEncoding=URL",LAST);
      > >
      > > web_submit_data("EditForm.aspx_3",
      > > "Action=https://ebp-r2.test.det.nsw.edu.au/sites/43sajzso/Lists/DET.eBackPack.SP.Announcements-Announcements/EditForm.aspx?ID=5&Source=https%3A%2F%2Febp%2Dr2%2Etest%2Edet%2Ensw%2Eedu%2Eau%2Fsites%2F43sajzso%2FPages%2Fworkspace%2Easpx",
      > > "Method=POST",
      > > "RecContentType=text/html",
      > > "Referer=https://ebp-r2.test.det.nsw.edu.au/sites/43sajzso/Lists/DET.eBackPack.SP.Announcements-Announcements/EditForm.aspx?ID=5&Source=https%3A%2F%2Febp%2Dr2%2Etest%2Edet%2Ensw%2Eedu%2Eau%2Fsites%2F43sajzso%2FPages%2Fworkspace%2Easpx",
      > > "Snapshot=t31.inf",
      > > "Mode=HTML",
      > > ITEMDATA,
      > > "Name=MSOWebPartPage_PostbackSource", "Value=", ENDITEM,
      > > "Name=MSOTlPn_SelectedWpId", "Value=", ENDITEM,
      > > "Name=MSOTlPn_View", "Value=0", ENDITEM,
      > > "Name=MSOTlPn_ShowSettings", "Value=False", ENDITEM,
      > > "Name=MSOGallery_SelectedLibrary", "Value=", ENDITEM,
      > > "Name=MSOGallery_FilterString", "Value=", ENDITEM,
      > > "Name=MSOTlPn_Button", "Value=none", ENDITEM,
      > > "Name=__EVENTTARGET", "Value=ctl00$m$g_ebeadf96_ffe3_490e_992f_5849ae4e8834$ctl00$toolBarTbl$RightRptControls$ctl00$ctl00$diidIOSaveItem", ENDITEM,
      > > "Name=__EVENTARGUMENT", "Value=", ENDITEM,
      > > "Name=__REQUESTDIGEST", "Value={RequestDigest}", ENDITEM,
      > > "Name=_ListSchemaVersion_{8fc0db4b-1950-4398-84fd-c2a5dbd2bf87}", "Value=3", ENDITEM,
      > > "Name=MSOSPWebPartManager_DisplayModeName", "Value=Browse", ENDITEM,
      > > "Name=MSOSPWebPartManager_ExitingDesignMode", "Value=false", ENDITEM,
      > > "Name=MSOWebPartPage_Shared", "Value=", ENDITEM,
      > > "Name=MSOLayout_LayoutChanges", "Value=", ENDITEM,
      > > "Name=MSOLayout_InDesignMode", "Value=", ENDITEM,
      > > "Name=_wpSelected", "Value=", ENDITEM,
      > > "Name=_wzSelected", "Value=", ENDITEM,
      > > "Name=MSOSPWebPartManager_OldDisplayModeName", "Value=Browse", ENDITEM,
      > > "Name=MSOSPWebPartManager_StartWebPartEditingName", "Value=false", ENDITEM,
      > > "Name=MSOSPWebPartManager_EndWebPartEditing", "Value=false", ENDITEM,
      > > "Name=__LASTFOCUS", "Value=", ENDITEM,
      > > "Name=ms-rtefocuselementid", "Value=", ENDITEM,
      > > "Name=ms-rtedirtybit", "Value=0", ENDITEM,
      > > "Name=_maintainWorkspaceScrollPosition", "Value=0", ENDITEM,
      > > "Name=__VIEWSTATE", "Value={ViewState1}", ENDITEM,
      > > "Name=__SCROLLPOSITIONX", "Value=0", ENDITEM,
      > > "Name=__SCROLLPOSITIONY", "Value=0", ENDITEM,
      > > "Name=__EVENTVALIDATION", "Value={EventValidation1}", ENDITEM,
      > > "Name=ctl00$ctl35", "Value=Ribbon.EditingTools.CPEditTab", ENDITEM,
      > > "Name=FontFamilyStyleValue", "Value=Verdana", ENDITEM,
      > > "Name=FontSizeStyleValue", "Value=8pt", ENDITEM,
      > > "Name=ctl00$PlaceHolderSearchArea$ctl01$ctl00", "Value=https://ebp-r2.test.det.nsw.edu.au/sites/43sajzso", ENDITEM,
      > > "Name=InputKeywords", "Value=", ENDITEM,
      > > "Name=ctl00$PlaceHolderSearchArea$ctl01$SBScopesDDL", "Value=This Site", ENDITEM,
      > > "Name=ctl00$m$g_ebeadf96_ffe3_490e_992f_5849ae4e8834$ctl00$ctl05$ctl00$ctl00$ctl00$ctl04$ctl00$ctl00$TextField", "Value=test", ENDITEM,
      > > "Name=ctl00$m$g_ebeadf96_ffe3_490e_992f_5849ae4e8834$ctl00$ctl05$ctl01$ctl00$ctl00$ctl04$ctl00$ctl00$TextField", "Value=test", ENDITEM,
      > > "Name=ctl00$m$g_ebeadf96_ffe3_490e_992f_5849ae4e8834$ctl00$ctl05$ctl02$ctl00$ctl00$ctl04$ctl00$ctl00$TextField_spSave", "Value=<div class=\"ExternalClass0D71685EF5C4498EBBB2A0012BE4C57C\"><p>This is testing</p></div>", ENDITEM,
      > > "Name=ctl00$m$g_ebeadf96_ffe3_490e_992f_5849ae4e8834$ctl00$ctl05$ctl03$ctl00$ctl00$ctl04$ctl00$ctl00$DateTimeField$DateTimeFieldDate", "Value=28/10/2010", ENDITEM,
      > > "Name=ctl00$m$g_ebeadf96_ffe3_490e_992f_5849ae4e8834$ctl00$ctl05$ctl04$ctl00$ctl00$ctl04$ctl00$ctl00$DateTimeField$DateTimeFieldDate", "Value=4/11/2010", ENDITEM,
      > > "Name=ctl00$m$g_ebeadf96_ffe3_490e_992f_5849ae4e8834$ctl00$ctl08$ctl00$owshiddenversion", "Value=2", ENDITEM,
      > > "Name=attachmentsToBeRemovedFromServer", "Value=", ENDITEM,
      > > "Name=RectGifUrl", "Value=/_layouts/images/rect.gif", ENDITEM,
      > > "Name=fileupload0", "Value=", ENDITEM,
      > > "Name=__spText1", "Value=", ENDITEM,
      > > "Name=__spText2", "Value=", ENDITEM,
      > > "Name=_wpcmWpid", "Value=", ENDITEM,
      > > "Name=wpcmVal", "Value=", ENDITEM,
      > > LAST);
      > >
      > >
      > >
      > >
      > > ------------------------------------
      > >
      > > Yahoo! Groups Links
      > >
      > >
      > >
      >
    • James Pulley
      Clear all cookies and cache on your browser before each recording. Session with a thirty minute timeout I could see. State is a different issue altogether -
      Message 2 of 4 , Nov 1, 2010
      • 0 Attachment
        Clear all cookies and cache on your browser before each recording. Session
        with a thirty minute timeout I could see. State is a different issue
        altogether - the whole reason application state is sent to you is so the
        server can remain stateless and does not have to store this information.

        Note: if your viewstate does not change for thirty minutes then indeed you
        have a very exceptional application for every application I have ever dealt
        with (in the past five years) with viewstate attached had it changing for
        every single page request.

        -----Original Message-----
        From: LoadRunner@yahoogroups.com [mailto:LoadRunner@yahoogroups.com] On
        Behalf Of alnoorkhimani
        Sent: Monday, November 01, 2010 7:12 AM
        To: LoadRunner@yahoogroups.com
        Subject: [LoadRunner] Re: View State Verification Errors

        Hi James,

        Diff utility is useful but in this case viewstate has a timeout of 30
        minutes so 2 recordng will show the same viewstate in 30 min time window.

        Have anyone used any custom header file for base64 encoding for a viewstate
        and make it worked successfully?

        Regards,
        Al

        --- In LoadRunner@yahoogroups.com, James Pulley <loadrunner-lists@...>
        wrote:
        >
        > Record business process twice
        >
        > diff the recordings. Make note of the differences which resolve to
        > correlation candidates
        >
        > Examine each candidate, correlating/parameterizing where necessary
        >
        > Replay.
        >
        > Your viewstate issue is a well-known challenge, with correlation of the
        > viewstate information at the core of the solution.
        >
        > James Pulley, http://www.loadrunnerbythehour.com/PricingMatrix
        >
        > On Fri, 2010-10-29 at 03:28 +0000, alnoorkhimani wrote:
        > > Hello everyone,
        > >
        > > I am working on MS Sharepoint application. When I am submitting a
        correlated parameter of _VIEWSTATE on a save form, I am getting back error
        from server about invalid view state. The viewstate parameter on the form is
        actully a hidden parameter and I confirmed with development guys that it
        only accept base64 encoding. I wonder how to achieve it inside loadrunner. I
        tried converting the correlated value to plain and URL encoding but no
        solution works.
        > > Here is a sample viewstate from the application. I have truncated the
        mid part for readability but gives an idea. Its not too huge upto mb.
        > > I have also pasted some section for request loadrunner sending to submit
        the following form.
        > > As you can see that in the request it has replacing / with %2F in URL as
        well as plain encoding.I think this is where its actually breaking on server
        as we can see Viewstate verification errors.
        > >
        > > I have also pasted the relevant script code following the request chunk.
        Can anyone please advise if you have come across similiar issue? How it was
        resolved?
        > >
        > > ViewState in a response from prior call to submit form:
        > > =======================================================
        > > <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
        value="/wEPDwUJMTc0NzUyMzgyD2QWAmYPZBYCAgEPZBYCAgMPZBYYAgMPZBYCBSZnX2VWJyb29
        rIFRlY2hub2xvZ3kgSFNkZAI/D2QWAgIBD2QWAgIHD2QWAgIBDw8WAh8AaGQWAgIDD2QWAgIDD2Q
        WAgIBDzwrAAkBAA8WAh4NTmV2ZXJFeHBhbmRlZGdkZAJBD2QWAmYPDxYCHwBnZGRkQTnU8EtIUGN
        fvJACFS3CszH4CyE=" />
        > >
        > >
        > >
        > > ViewState in following Form Request from LoadRunner
        > > ===================================================
        > >
        __VIEWSTATE=%2FwEPDwUJMTc0NzUyMzgyD2QWAmYPZBYCAgEPZBYCAgMPZBYYAgMPZBYCBSZnX2
        ViZWFkZjk2X2ZmZTNfNDkwZV85OTJmXzU4NDlhZTRlODgzNA9kFgJmD2QWEAIDD2QWAgIBD2QWBg
        IBDxYCHgdWaXNpYmxlaGQCAw9kFgJmD2QWAgIDDw8WBh4EVGV4dAUEU2F2ZR4NT25DbGllbnRDbG
        ljawUhaWYgKCFQcmVTYXZlSXRlbSgpKSByZXR1cm4
        > >
        > >
        > > LOADRUNNER SCRIPT:
        > > ==================
        > > web_set_max_html_param_len("200000");
        > >
        > > //View State Correlation
        > > web_reg_save_param_ex("ParamName=ViewState",
        > > "LB/IC=<input type=\"hidden\" name=\"__VIEWSTATE\" id=\"__VIEWSTATE\"
        value=\"",
        > > "RB/IC=\" />",
        > > SEARCH_FILTERS,
        > > "IgnoreRedirections=Yes",
        > > "RequestUrl=*/EditForm.aspx*",
        > > LAST);
        > >
        > > //URL which is used for correlation
        > >
        > > web_url("listform.aspx_2",
        > >
        "URL=https://ebp-r2.test.det.nsw.edu.au/sites/43sajzso/_layouts/listform.asp
        x?ListId={8fc0db4b-1950-4398-84fd-c2a5dbd2bf87}&PageType=6&ID=3&Source=https
        %3A%2F%2Febp%2Dr2%2Etest%2Edet%2Ensw%2Eedu%2Eau%2Fsites%2F43sajzso%2FPages%2
        Fworkspace%2Easpx",
        > > "Resource=0",
        > > "RecContentType=text/html",
        > > "Referer=",
        > > "Snapshot=t26.inf",
        > > "Mode=HTML",
        > > LAST);
        > >
        > > //I have tried converting it into URL encoding as well as plain
        //encoding. I suppose plain encoding should convert it into base64 //but I
        dont think its a case here.
        > >
        > >
        web_convert_param("ViewState1","SourceString={ViewState}","SourceEncoding=HT
        ML","TargetEncoding=URL",LAST);
        > >
        > > web_submit_data("EditForm.aspx_3",
        > >
        "Action=https://ebp-r2.test.det.nsw.edu.au/sites/43sajzso/Lists/DET.eBackPac
        k.SP.Announcements-Announcements/EditForm.aspx?ID=5&Source=https%3A%2F%2Febp
        %2Dr2%2Etest%2Edet%2Ensw%2Eedu%2Eau%2Fsites%2F43sajzso%2FPages%2Fworkspace%2
        Easpx",
        > > "Method=POST",
        > > "RecContentType=text/html",
        > >
        "Referer=https://ebp-r2.test.det.nsw.edu.au/sites/43sajzso/Lists/DET.eBackPa
        ck.SP.Announcements-Announcements/EditForm.aspx?ID=5&Source=https%3A%2F%2Feb
        p%2Dr2%2Etest%2Edet%2Ensw%2Eedu%2Eau%2Fsites%2F43sajzso%2FPages%2Fworkspace%
        2Easpx",
        > > "Snapshot=t31.inf",
        > > "Mode=HTML",
        > > ITEMDATA,
        > > "Name=MSOWebPartPage_PostbackSource", "Value=", ENDITEM,
        > > "Name=MSOTlPn_SelectedWpId", "Value=", ENDITEM,
        > > "Name=MSOTlPn_View", "Value=0", ENDITEM,
        > > "Name=MSOTlPn_ShowSettings", "Value=False", ENDITEM,
        > > "Name=MSOGallery_SelectedLibrary", "Value=", ENDITEM,
        > > "Name=MSOGallery_FilterString", "Value=", ENDITEM,
        > > "Name=MSOTlPn_Button", "Value=none", ENDITEM,
        > > "Name=__EVENTTARGET",
        "Value=ctl00$m$g_ebeadf96_ffe3_490e_992f_5849ae4e8834$ctl00$toolBarTbl$Right
        RptControls$ctl00$ctl00$diidIOSaveItem", ENDITEM,
        > > "Name=__EVENTARGUMENT", "Value=", ENDITEM,
        > > "Name=__REQUESTDIGEST", "Value={RequestDigest}", ENDITEM,
        > > "Name=_ListSchemaVersion_{8fc0db4b-1950-4398-84fd-c2a5dbd2bf87}",
        "Value=3", ENDITEM,
        > > "Name=MSOSPWebPartManager_DisplayModeName", "Value=Browse", ENDITEM,
        > > "Name=MSOSPWebPartManager_ExitingDesignMode", "Value=false", ENDITEM,
        > > "Name=MSOWebPartPage_Shared", "Value=", ENDITEM,
        > > "Name=MSOLayout_LayoutChanges", "Value=", ENDITEM,
        > > "Name=MSOLayout_InDesignMode", "Value=", ENDITEM,
        > > "Name=_wpSelected", "Value=", ENDITEM,
        > > "Name=_wzSelected", "Value=", ENDITEM,
        > > "Name=MSOSPWebPartManager_OldDisplayModeName", "Value=Browse", ENDITEM,
        > > "Name=MSOSPWebPartManager_StartWebPartEditingName", "Value=false",
        ENDITEM,
        > > "Name=MSOSPWebPartManager_EndWebPartEditing", "Value=false", ENDITEM,
        > > "Name=__LASTFOCUS", "Value=", ENDITEM,
        > > "Name=ms-rtefocuselementid", "Value=", ENDITEM,
        > > "Name=ms-rtedirtybit", "Value=0", ENDITEM,
        > > "Name=_maintainWorkspaceScrollPosition", "Value=0", ENDITEM,
        > > "Name=__VIEWSTATE", "Value={ViewState1}", ENDITEM,
        > > "Name=__SCROLLPOSITIONX", "Value=0", ENDITEM,
        > > "Name=__SCROLLPOSITIONY", "Value=0", ENDITEM,
        > > "Name=__EVENTVALIDATION", "Value={EventValidation1}", ENDITEM,
        > > "Name=ctl00$ctl35", "Value=Ribbon.EditingTools.CPEditTab", ENDITEM,
        > > "Name=FontFamilyStyleValue", "Value=Verdana", ENDITEM,
        > > "Name=FontSizeStyleValue", "Value=8pt", ENDITEM,
        > > "Name=ctl00$PlaceHolderSearchArea$ctl01$ctl00",
        "Value=https://ebp-r2.test.det.nsw.edu.au/sites/43sajzso", ENDITEM,
        > > "Name=InputKeywords", "Value=", ENDITEM,
        > > "Name=ctl00$PlaceHolderSearchArea$ctl01$SBScopesDDL", "Value=This Site",
        ENDITEM,
        > >
        "Name=ctl00$m$g_ebeadf96_ffe3_490e_992f_5849ae4e8834$ctl00$ctl05$ctl00$ctl00
        $ctl00$ctl04$ctl00$ctl00$TextField", "Value=test", ENDITEM,
        > >
        "Name=ctl00$m$g_ebeadf96_ffe3_490e_992f_5849ae4e8834$ctl00$ctl05$ctl01$ctl00
        $ctl00$ctl04$ctl00$ctl00$TextField", "Value=test", ENDITEM,
        > >
        "Name=ctl00$m$g_ebeadf96_ffe3_490e_992f_5849ae4e8834$ctl00$ctl05$ctl02$ctl00
        $ctl00$ctl04$ctl00$ctl00$TextField_spSave", "Value=<div
        class=\"ExternalClass0D71685EF5C4498EBBB2A0012BE4C57C\"><p>This is
        testing</p></div>", ENDITEM,
        > >
        "Name=ctl00$m$g_ebeadf96_ffe3_490e_992f_5849ae4e8834$ctl00$ctl05$ctl03$ctl00
        $ctl00$ctl04$ctl00$ctl00$DateTimeField$DateTimeFieldDate",
        "Value=28/10/2010", ENDITEM,
        > >
        "Name=ctl00$m$g_ebeadf96_ffe3_490e_992f_5849ae4e8834$ctl00$ctl05$ctl04$ctl00
        $ctl00$ctl04$ctl00$ctl00$DateTimeField$DateTimeFieldDate",
        "Value=4/11/2010", ENDITEM,
        > >
        "Name=ctl00$m$g_ebeadf96_ffe3_490e_992f_5849ae4e8834$ctl00$ctl08$ctl00$owshi
        ddenversion", "Value=2", ENDITEM,
        > > "Name=attachmentsToBeRemovedFromServer", "Value=", ENDITEM,
        > > "Name=RectGifUrl", "Value=/_layouts/images/rect.gif", ENDITEM,
        > > "Name=fileupload0", "Value=", ENDITEM,
        > > "Name=__spText1", "Value=", ENDITEM,
        > > "Name=__spText2", "Value=", ENDITEM,
        > > "Name=_wpcmWpid", "Value=", ENDITEM,
        > > "Name=wpcmVal", "Value=", ENDITEM,
        > > LAST);
        > >
        > >
        > >
        > >
        > > ------------------------------------
        > >
        > > Yahoo! Groups Links
        > >
        > >
        > >
        >




        ------------------------------------

        Yahoo! Groups Links
      Your message has been successfully submitted and would be delivered to recipients shortly.