0
votes

I am trying to access the Webpage that only accessible in Browser when i am connected through VPN but when I am sending the Request from JMeter by using the HTTP Request Script it shows the error "Unauthorized" even when I am connected with VPN still I am getting same error.

Also I try the Http Proxy server option in the Advance tab section of Http Request and provide the VPN IP Address and Port Number and Username and Password but still I am unable to access the Url from JMeter.

2

2 Answers

0
votes

This is not due to vpn. Check your request headers for token or authorization value. You need to correlate that before moving ahead. Please share complete request with header & cookies for more help.

0
votes

Proxy != VPN, given your machine is connected to the VPN you should be able to access the application using JMeter's HTTP Request samplers without any extra configuration

With regards to your "Unauthorized", if it stands for HTTP Status Code 401 - Unauthorized which means that you need to provide valid authorization context along with the request.

  • If you're able to open the application using your browser without having to enter credentials, most probably the authorization is being performed via SSO, in this case you need to add HTTP Authorization Manager and properly configure it for your application authentication flow, see Windows Authentication with Apache JMeter article for more details
  • If you need to provide credentials and just trying to replay the recorded script - most probably you need to implement correlation: detect all dynamic parameters and replace recorded hard-coded values with the ones fetched from the previous responses using JMeter Post-Processors