Getting error "HTTP Error 401. The requested resource requires user authentication"

518 views
Skip to first unread message

Mayank Mishra

unread,
Dec 20, 2011, 11:41:44 PM12/20/11
to lr-loa...@googlegroups.com

Hi,

 I am getting an error message "HTTP Error 401. The requested resource requires user authentication" while replaying the script.

 And in soap request i am seeing an error message:

 The message with Action 'http://tempuri.org/IProcessManagementService/ListProcesses' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).

 Manually i am able to login to the application without any fail. i have correlated the script where ever required. i am sure there is no issue with the correlation.

 Did anyone have experienced such kind of issue?
 
Thanks
Mayank

chaitanya bhatt

unread,
Dec 21, 2011, 12:55:48 AM12/21/11
to lr-loa...@googlegroups.com
Most probable cause of this error in your case is missing security certificate and/or missing http header.
 
Chaitanya M Bhatt
--
You received this message because you are subscribed to the Google "LoadRunner" group.
To post to this group, send email to LR-Loa...@googlegroups.com
To unsubscribe from this group, send email to
LR-LoadRunne...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/LR-LoadRunner?hl=en

gkmishr...@gmail.com

unread,
Dec 21, 2011, 1:07:07 AM12/21/11
to lr-loa...@googlegroups.com
You have given web_set_user ?

Sent from my HTC

Taranjot Singh

unread,
Dec 21, 2011, 1:24:07 AM12/21/11
to lr-loa...@googlegroups.com
Hi,

Go to Run time settings of the script in the Load runner Controller and then click preferences in which u need to go to authentication option and select yes the use windows native NTLM implementation property and run the same.( if is not working then, also check the wininet replay instead of sockets opetion in perfrences with the combination of above setting.

Hope u will get the solution.

By: Taran 
--

Taranjot Singh

Mayank Mishra

unread,
Dec 21, 2011, 8:02:19 AM12/21/11
to lr-loa...@googlegroups.com
@Gaurav --- Yes i have given web_set_user

Mayank Mishra

unread,
Dec 21, 2011, 8:14:46 AM12/21/11
to lr-loa...@googlegroups.com
@Taran-- Thanks for your reply, i tried with your solution but failed to succeed..... is there any other way to get out of this?

Gaurav Mishra

unread,
Dec 21, 2011, 8:25:48 AM12/21/11
to lr-loa...@googlegroups.com
mayank

is there a login page of ur application or it is taking cridential on the basis of active directory on computer or some other way ????

Taranjot Singh

unread,
Dec 21, 2011, 8:57:30 AM12/21/11
to lr-loa...@googlegroups.com

Hi ,
Could u pls confirm , r u recording the script using sockets, because my settings are only wrked if u record ur script using sockets.
Pls check in the recording options.

Taranjot Singh

unread,
Dec 21, 2011, 9:02:32 AM12/21/11
to lr-loa...@googlegroups.com

Forget to say, Also comment web_set..function with my given settings .and check and apply the same

Mayank Mishra

unread,
Dec 21, 2011, 11:48:55 PM12/21/11
to lr-loa...@googlegroups.com
@Gaurav: There is no login page, once we hit URL(example: you can hit the http://cpanel.chaptaco.com/), a windows pop-up dialog box(HTTP Authentication) opens which prompts for username & password.

On Wed, Dec 21, 2011 at 6:55 PM, Gaurav Mishra <gkmishr...@gmail.com> wrote:
mayank

is there a login page of ur application or it is taking cridential on the basis of active directory on computer or some other way ????

Mayank Mishra

unread,
Dec 21, 2011, 11:49:58 PM12/21/11
to lr-loa...@googlegroups.com
@Taran: Yes i have recorded the script using sockets

Mayank Mishra

unread,
Dec 21, 2011, 11:54:17 PM12/21/11
to lr-loa...@googlegroups.com
@Taran: It didnt worked....

Taranjot Singh

unread,
Dec 22, 2011, 7:38:40 AM12/22/11
to lr-loa...@googlegroups.com
could u pls attach a replay script in word pad .
Taranjot Singh

Mayank Mishra

unread,
Dec 23, 2011, 1:31:54 AM12/23/11
to lr-loa...@googlegroups.com
@Taran: Thanks for your interest in helping me... I have attached the Script..
VugenScript.txt

chaitanya bhatt

unread,
Dec 23, 2011, 1:35:50 PM12/23/11
to lr-loa...@googlegroups.com
Feedback of your script:
 
1. Authentication could most likely be NTLM v2. Use of windows integrated authentication technique is recommended. 
2. SOAP based requests in you script indicates that there is a critical need for the presence of the HTTP headers. Regenerate the scripts with all essential headers.
3. Extensive usage of correlation rules and auto-correlation indicates that your script is may not have accurate boundaries for the parameters.
 
Chaitanya M Bhatt
 
 

Taranjot Singh

unread,
Dec 23, 2011, 1:04:27 PM12/23/11
to lr-loa...@googlegroups.com
please check in which request u can get this error.
by go to the line number given in the controller error message.


--
-----
*Taranjot Singh*
*+91-9717058408*

Mayank Mishra

unread,
Dec 26, 2011, 4:46:33 AM12/26/11
to lr-loa...@googlegroups.com

Thanks Taran, Gaurav and Chaitanya for your reply....

 @Chaitanya : Your point number 2 adding web_add_header to the SOAP based requests worked out :-) Thanks again.....

Taranjot Singh

unread,
Dec 26, 2011, 6:52:44 AM12/26/11
to lr-loa...@googlegroups.com
Thats Great !! mayank....could you please share the header name ie : which header you have used in web_add header() or kindly let us know the parameters required in web_add_header function for the same.
Taranjot Singh

Taranjot Singh

unread,
Dec 26, 2011, 7:29:13 AM12/26/11
to lr-loa...@googlegroups.com
@Mayank...or if u can attach your running script  in word pad then it would be great for me.
--
-----
Taranjot Singh

Mayank Mishra

unread,
Dec 28, 2011, 6:04:43 AM12/28/11
to lr-loa...@googlegroups.com
@Taran: Find the attached script
Script_1.txt

Taranjot Singh

unread,
Dec 28, 2011, 7:57:51 AM12/28/11
to lr-loa...@googlegroups.com
Thanks a lot .. JJ
Reply all
Reply to author
Forward
0 new messages