Highlighted
Absent Member.
Absent Member.
7103 views

Pending web_reg_save_param/reg_find/create_html_param[_ex] request(s) detected

Hi, I am working on a script and encountering this issue -

Error -27257: Pending web_reg_save_param/reg_find/create_html_param[_ex] request(s) detected and reset at the end of iteration number 1 [MsgId: MERR-27257]

Although, its a small script, I am not able to identify the issue. For your reference, I am providing the script here.

VUserInit

vuser_init()
{
web_set_max_html_param_len("1300000");

web_reg_save_param("ViewState","LB=VIEWSTATE\" value=\"","RB=\" />","ORD=1",LAST);
web_reg_save_param("EventVal","LB=\"__EVENTVAL\" value=\"","RB=\" />","ORD=1",LAST);

web_url("login.aspx",
"URL=https://www.abcd.com/login.aspx",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);

web_reg_save_param("NewsAlertType","LB=
lr_start_transaction("FN_NewsAlerts_T01_Login");

web_reg_find("Text= Home","SaveCount=Count",LAST);

web_submit_data("login.aspx_2",
"Action=https://abcd.com/login.aspx",
"Method=POST",
"TargetFrame=",
"RecContentType=text/html",
"Referer=https://abcd.com/login.aspx",
"Snapshot=t2.inf",
"Mode=HTML",
ITEMDATA,
"Name=__VIEWSTATE", "Value={V...






































































































































































0 Likes
6 Replies
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Pending web_reg_save_param/reg_find/create_html_param[_ex] request(s) detected

Is this web_url getting executed? Could the Article Count be 0?

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


web_reg_save_param("ViewState_HomePage_1","LB=hidden\" name=\"__VIEWSTATE\" id=\"__VIEWSTATE\" value=\"","RB=\" />","Notfound=warning","ORD=1",LAST);
web_reg_save_param("EventVal_HomePage_1","LB=hidden\" name=\"__EVENTVALIDATION\" id=\"__EVENTVALIDATION\" value=\"","RB=\" />","Notfound=warning","ORD=1",LAST);

lr_start_transaction("FN_NewsAlerts_T04_SelectArticle");

web_reg_find("Text=\r\n\tFinancial Network\r\n","SaveCount=Count",LAST);

if(atoi(lr_eval_string("{Article_count}")) > 0)
{
randNumArticle = rand() % atoi(lr_eval_string("{Article_count}")) + 1;
sprintf(randValueArticle,"%d",randNumArticle);
lr_save_string(randValueArticle,"randValue2");
lr_save_string(lr_eval_string(lr_eval_string("{Article_{randValue2}}")), "ArticlePage");

web_url("TwoColumn.aspx",
"URL=https://abcd.com/TwoColumn.aspx?pageid={PageId}&id={ArticlePage}",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=https://abcd.com/{CategoryPage}",
"Snapshot=t5.inf",
"Mode=HTML",
LAST);
}

-----------------------------------------
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Pending web_reg_save_param/reg_find/create_html_param[_ex] request(s) detected

That is just a check that I have put here. Because, running the same script simultaneously on two instances of load runner to simulate the load on the application causes the category count and article count to return 0 in one of the script. However, interestingly, the second script runs fine.
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Pending web_reg_save_param/reg_find/create_html_param[_ex] request(s) detected

The problem is that you have your web_reg_save_param functions outside your if condition, and the web_ functions inside.
For example, see the code below:

--------------------------------------------------------------
web_reg_save_param("ViewState_HomePage_1","LB=hidden\" name=\"__VIEWSTATE\" id=\"__VIEWSTATE\" value=\"","RB=\" />","Notfound=warning","ORD=1",LAST);
web_reg_save_param("EventVal_HomePage_1","LB=hidden\" name=\"__EVENTVALIDATION\" id=\"__EVENTVALIDATION\" value=\"","RB=\" />","Notfound=warning","ORD=1",LAST);

lr_start_transaction("FN_NewsAlerts_T04_SelectArticle");

web_reg_find("Text=\r\n\tFinancial Network\r\n","SaveCount=Count",LAST);

if(atoi(lr_eval_string("{Article_count}")) > 0) {
randNumArticle = rand() % atoi(lr_eval_string("{Article_count}")) + 1;
sprintf(randValueArticle,"%d",randNumArticle);
lr_save_string(randValueArticle,"randValue2");
lr_save_string(lr_eval_string(lr_eval_string("{Article_{randValue2}}")), "ArticlePage");

web_url("TwoColumn.aspx",
"URL=https://abcd.com/TwoColumn.aspx?pageid={PageId}&id={ArticlePage}",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=https://abcd.com/{CategoryPage}",
"Snapshot=t5.inf",
"Mode=HTML",
LAST);
}
--------------------------------------------------------------

So, if the if condition evaluates to "false", web_reg_save_param is registered, but the web_url is not executed. So, VuGen will throw an error.
You need to put the web_reg_save_param functions inside the if condition. So, you will have:

if(condition) {
web_reg_save_param(...);
web_url(...);
...
}

Change this at all places. Hope this helps.
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Pending web_reg_save_param/reg_find/create_html_param[_ex] request(s) detected

While running a script with the advance trace set to 'On', I am getting this error message -

Read to host 'host name'failed[10054] Connection reset by peer

Please tell me the resolution for the same.
0 Likes
Highlighted
Established Member..
Established Member..

Re: Pending web_reg_save_param/reg_find/create_html_param[_ex] request(s) detected

Hi Sid,

Code looks to be for .Net based application.

If I am correct below would help you definetly.

Then try below codes into your script.

Place these codes at very top of the script before application URL gets loaded.

web_set_sockets_option("OVERLAPPED_SEND", "0");
web_set_sockets_option("IGNORE_PREMATURE_SHUTDOWN", "1");
web_enable_keep_alive();
web_set_sockets_option ("CLOSE_KEEPALIVE_CONNECTIONS", "1");
web_set_sockets_option("MAX_CONNECTIONS_PER_HOST","1");


Thanks
Ajay Kumar
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Pending web_reg_save_param/reg_find/create_html_param[_ex] request(s) detected

Dear try to add ' web_reg_find' before  'web_custom_request'  this will hopefully fix your problem

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.