asp.net-mvcpaypalweb-farm

Paypal Express checkout in web farm environment


We have an intermittent problem which I was hoping I could get some help with. Our website uses PayPal's ExpressCheckout method whereby the customer is redirected to PayPal's site and is then returned to our site to complete their purchase. The customer starts the checkout process on server1, but when they return from paypal our load balancer sends them to server2. The application then looks in the session variable for something and fails because the session is null. This is because we're using inproc sessions and the session only exists on server1.

I'm not that familiar with web apps so was wondering if someone more experienced in this regard could offer some advice.

Is moving to an out of proc session server the only solution?

Thanks.


Solution

  • Instead of using session data, save the data to temporary records in a database. Then you can pull those records back out and it won't matter what server you're running from.