Azure load testing with JMX Script files

Natarajan, Srikanth 20 Reputation points
2024-09-17T12:57:17.63+00:00

HI ,

i am working on load testing for the .net core mvc website .

I am using JMeter tool to generate the JMX script

when i integrate with Azure load test with script file ,i am able to run the test successfully for the login page.

when i tried to invoke the test for user creation it is failing with below error

HTTP/1.1. 401 Unauthorized response

Login action have marked only with ValidateAnitiforgeryToken attribute which is working fine.

Create user action have marked with ValidateAnitiforgeryToken and authorize attribute is failing with unauthorized error

Can some body help me here what is the header needs to be sent in the request headers

.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,009 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,704 questions
Azure Load Testing
Azure Load Testing
An Azure service that enables developers and testers to generate insights on how to improve the performance, scalability, and capacity usage of their application
68 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 68,636 Reputation points
    2024-09-17T18:25:28.38+00:00

    on postback, ValidateAnitiforgeryToken validation compare a value in the cookie to form field value. In mvc every response updates the cookie value, and if the response contains a form, the value is rendered in a hidden field.

    authentication of a request is just checking a token in the cookie value. the token contains the user name and claims. a successful login post should return the cookie value. the value, unlike a jwt token, is a custom format and encryption.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.