Last post Feb 20, 2021 01:42 AM by firstname.lastname@example.org
Feb 19, 2021 01:25 AMemail@example.com|LINK
I am redirecting my web site to a outside vendor payment web site. Web site gets redirected successfully. Once the payment is done outside vendor gives the value in the post. I capture the value using Request.Form. When I checked the the browser developer
tools Network tab, I noticed - the POST request is successfully completed but immediately followed by a GET request. After searching around in Google. I Commented out the entire body of the RegisterRoutes method in the RouteConfig.cs file. I also cleared the
browser cache programmatically, but still the value is null. Below is my code:Code for .aspx page
<asp:LinkButton runat="server" ID="btnNext" Text="Place your Order" data-role="button" class="ss-right" data-inline="true" data-theme="b" data-iconpos="right" OnClick="btnplaceOrder_click" data-icon="check" CausesValidation="true" ></asp:LinkButton>
protected void btnplaceOrder_click(object sender, EventArgs e)
// sending some data to outside vendor
// outside vendor give me URL with a GUID appended to URL
private void clearCache()
Response.CacheControl = "no-cache";
Response.Expires = -1;
This is how I capture the value:code for .aspx page:
<form id="form1" runat="server" method="post">
code for .cs page:
protected void Page_Load(object sender, EventArgs e)
NameValueCollection nvc = Request.Form;
Request.Form is totally empty in some cases and sometimes Request.Form has value in it. I am not sure what am I doing wrong.
I already looked at the following answers:
Below is the image from developers tool.
<div> </div> <div>The first Receipt is post and second one is Get</div>
any help will be highly appreciated.
Feb 19, 2021 10:12 AM|Sean Fang|LINK
Actually the error is not related to that link you have read.
The reason is that you are using <cookieless="AutoDetect"> in your web.config for session or something else.
If the browser is blocking the cookie, then you will see a second get request
with a query string "AspxAutoDetectCookieSupport=1".
The solution is to remove/modify the cookieless in web.config.
You could refer to :
References about Cookieless:
Hope this helps.
Feb 20, 2021 01:42 AMfirstname.lastname@example.org|LINK
Thank you. I spent 4-5 hours, but could not find the solution anywhere. I should have posted my question here before.