0
votes

I am trying to perform load testing using JMeter on my project's web service (search web service for instance), the problem I am facing is that I am getting {"Message":"Authorization has been denied for this request."} in "Response data" tab in JMeter

This same message I also get when I try to paste the same query string (which I am using in JMeter as Path) in browser new tab without logging in first,, but if I login on my project first and then try to paste the query string in browser's new tab then it works fine.

Now the actual problem that I am facing in JMeter is that I am unable to log in to the system using "HTTP Header Manager" I tried by adding Basic authentication in "HTTP Header Manager" but it didn't worked, then my developer told me that he is using "ASP Membership" authentication instead of Basic authentication,, now I am not sure how to use this type of authentication in JMeter.

I think I have explained my problem in detail here, can any one please help me in this as I am really stuck into it.

Thanks in advance

2

2 Answers

0
votes

You need to add a cookie-manager to your Thread Group. This will preserve the cookies ( hence sessions) between requests. Next add a http request which will do a POST of your login form then another HTTP Request with your actual request. This way you are imitating the steps you do on your browser - that is - login followed by request.

0
votes

Looking into ASP.NET Forms Authentication Overview article:

Forms authentication lets you authenticate users by using your own code and then maintain an authentication token in a cookie or in the page URL.

So depending on implenentation of ASP.NET Forms on server side you can use one of the following test elements:

Also you may need to perform the correlation of the mandatory dynamic parameters such as VIEWSTATE or EVENTVALIDATION. See ASP.NET Login Testing with JMeter guide for detailed explanation and walkthrough.