1

I want to login and get my transcript from my school's website using nodejs. I checked the network flow while logging in. Website uses asp.net and there is __VIEWSTATE __VIEWSTATEGENERATOR and __EVENTVALIDATION parameters passed to the form-data. I think this values are randomly generated on the browser. How can i do the same thing on node.js? However it works when I run it by copying request from chrome devtools and pasting it in postman. But why it doesn't work in node?

Nick.Mc
  • 18,304
  • 6
  • 61
  • 91
kutaykurt
  • 23
  • 8
  • I believe those values are generate by the back end and embedded in the generated page, then posted back. These would be ASP.Net forms things. I don't think you can generate these on the client side because they are generated on the server side. I've added webforms as a tag because this sounds like webforms – Nick.Mc Sep 30 '21 at 23:48
  • @Nick.McDermaid I'm copy pasting already generated form parameters, It works in Postman but not in nodejs. Why do you think it happen? – kutaykurt Sep 30 '21 at 23:52
  • Without knowing what you mean by "works" (do you get an error?), and without being certain that the node.js post perfectly matches the postman post, I don't know. – Nick.Mc Oct 01 '21 at 04:05
  • https://learn.microsoft.com/en-us/previous-versions/dotnet/articles/ms972976(v=msdn.10) This may help you understand the logic behind it more. There are also some online decoders (https://stackoverflow.com/questions/22814/how-to-decode-viewstate) But haven’t come across a solution that helps generate it from other frameworks, unfortunately. – Spartak Feb 06 '22 at 01:56

0 Answers0