I can’t find what I need. In an old application, I have a POST generated in VB.NET which has worked fine for a number of years. I recently moved my web site to a new, more secure hosting provider. The data from the VB.NET generated POST is not being seen by the .aspx page. However if I enter the same data in Postman, it is read and accepted without difficulty.
I am probably missing something obvious but how can I see what Postman is generated so that I can compare it to my VB.NET-generated POST?
I’m honestly not sure what a VB.NET Post request would even look like but there’s a Code feature in the app that creates a snippet in various different languages that might get you closer to how Postman creates that request.
You could also look at the request in the Postman Console to see exactly what is set in the different areas that are used to send the request.
So if you want to do a direct comparison in VB.NET, there isnt an exact way to generate that code. You can generate C# code, which apparently uses the RestSharp library, and thats the closest you’ll get.
Moreever, the best way to truly address this problem is by doing a packet capture. Ideally, the way you test it out is by doing a packet capture when sending a POST request from your VB.NET application, and a POST request using Postman. You should be able to see any differences in the packet capture. Most likely, you’re missing some headers, but I can’t confirm that is the case.
Ideally, generate a raw http request from both and do a direct comparison that way, your answer should lie in there.
Otherwise, do you have any error messages you can show us that’ll provide more guidance?
Hey, thanks for the replies. The console is very helpful. In fact, Postman itself has been terrifically helpful! I had to change hosting providers for my web site, since the previous supplier wouldn’t update TLS 1.0. Everything was working fine on the old site so I suspect there is a security issue with the new site. The basic problem is when I try to read the POST via Request.Form, in a code behind aspx page, which worked perfectly in the past, the results are all null. However, the site reads the same body components from Postman without a problem.
I matched the code (using httpwebrequest) to the Postman headers and all looks ok. Perhaps I don’t have the correct separators between the elements in the POST body?
For some reason, I don’t get the code option on the right side of the window, as illustrated in the video. I’m probably missing something obvious but no luck so far.