the problem is that when i am sending the request to server from local system without debugging, the code is running perfectly, but when i debug the code it is throwing the following exception
"Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack"
and not getting the required result.
How to resolve the issue
I am attaching the code:
using (System.IO.StreamReader sr =new System.IO.StreamReader(objResponse.GetResponseStream()))
{
TranResponse = sr.ReadToEnd();
string[] ErrorCheck = GetStringInBetween(TranResponse, "!", "!-", false, false);
if (ErrorCheck[0]!= "ERROR")
{
string payid=TranResponse.Substring(0,TranResponse.IndexOf(":http"));
string payURL=TranResponse.Substring(TranResponse.IndexOf("http"));
string TranRedirect=payURL+"?PaymentID="+payid;
sql = "insert into onlinepay values('" + registration + "','90002752','" + TranTrackid + "','" + payid + "','" + name + "','" + email + "','" + TranAmount + "','" + DateTime.Today.Date + "','Transaction in Progress','')";
con.InsertData(sql);
Response.Redirect(TranRedirect);
}
else
{
string TranErrorUrl = "http://test.conferencepacific.ac.in/FailedTRAN.aspx?Message=Transaction Failed&ResTrackId=" + TranTrackid + "&ResAmount=" + TranAmount + "&ResError=" + TranResponse;
Response.Redirect(TranErrorUrl);
}
}