i put a code in my website to redirect user to paypal sandbox , after entering his email id , and storing it in session ,
in return url of paypal sandbox i mentioned a page but it doesn't work, it doesn't maintaing the session variable, it assigns null to session variable upon returning , even i checked same session variable on every page and it is working but not with the one to which paypal sandbox is returning upon succesful transaction , why ?
i think that redirection between http and https destroys session ,
help plz ?
public partial class paymentSuccessful : System.Web.UI.Page
protected void Page_Load(object sender, EventArgs e)
if (Session["tempSubAdmin"] == null)
String subAdminEmail = Session["tempSubAdmin"].ToString();
String conString = "Data Source=COSANOSTRA; MultipleActiveResultSets=true; Initial Catalog=Waleed_orsfinal;Integrated Security=True";
SqlConnection con = new SqlConnection(conString);
String query = "Update tblUser Set paid=1 where email='" + subAdminEmail + "'";
SqlCommand com = new SqlCommand(query, con);
catch (Exception exc)
hmm, you may want to ask on the asp.net and/or iis.net forum as well. I've checked with some other developer friends of mine and cannot get a clear answer on the best approach. One option I got today was to store the session info in the database, which shouldnt be the answer.