[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 216
  • Last Modified:

Adding new payment gateway questions...

I have been asked to add a new payment gateway to a web app that I created. This new payment gateway takes my visitors to another site where they actually do the transaction. It then redirects the visitors back to my site after the payment has been finished. My concern is that upon redirect all of my session variables will be lost. This would ruin the entire session an make finalizing the data impossible.

I have a LOT of session variables, many of which are ASP.NET objects so just passing them in the URL is not an option. Am I correct in my assumption that the redirect would kill my session variables? If so, how should I handle this?

Just so you know I'm using a C# code behind.
1 Solution
Manoj PatilSr. Software EngineerCommented:
Hi tatton777,
Your assumption is not correct, Redirecting the page will not kill the session variables. Its due to time out of Session.

A session ends if a user has not requested or refreshed a page in the application for a specified period. By default, this is 20 minutes.

If you want to set a timeout interval that is shorter or longer than the default, use the Timeout property.


Open in new window

This will create a session for 60 minutes. You can increase it.
tatton777Author Commented:
Sweet!! That makes my life SOOO much better. Let me  test it...

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now