Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8383501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T17:10:42+00:00 2026-06-09T17:10:42+00:00

I have been trying to work out an issue with Sagepay server intergration into

  • 0

I have been trying to work out an issue with Sagepay server intergration into a c#.net site. At first I believed that the Sagepay simulator was not sending back the POST.

I have since discovered that (during logging) that the simulator is POSTing the values back to the site but it is then losing them. I thought this might be an issue in global.asax.

I have tried commenting out everything in global.asax and the values from the simulator are still being lost.

I have been using log4net to track the stages this is one of the calls from the simulator and how my log4net puts it in the database:

Application_BeginRequest
Application_BeginRequest
Request.UrlReferrer :
Application_BeginRequest
Request.ServerVariables.Count : 49
Application_BeginRequest: Form
count = 16
Application_AuthenticateRequest
Application_EndRequest
Application_PreSendRequestHeaders
Application_PreSendRequestContent
Application_End
Appliction
Started
Application_BeginRequest
Application_BeginRequest
Request.UrlReferrer :
Application_BeginRequest
Request.ServerVariables.Count : 48
Application_BeginRequest: Form
count = 0
Application_Begin Request.Form:
Application_AuthenticateRequest
Application_AuthorizeRequest
Application_ResolveRequestCache

That all happens within a few seconds. When it comes to load the page it has lost the post data.

This is the return we get on the sagepay simulator:

Raw Reponse from your Notification URL
Your Notification URL returned the following information in the response part of the POST. It has been formatted to wrap every 100 characters to make it more readable.

    <form method="post" action="/(A(ubPhPgmAzQEkAAAANzA1MTdhOTctZTJiZi00NzU3LWEyZjItODcxMzI2NW<BR>I3ZjA20))/PaymentGateway/SagePayServerReturn2.aspx" id="ctl00"><input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJMzIwOTI4NzM3ZGR7QWh08mOnnMUf7wtZMkwEWKknSW6n2TMurN5RJnAIbw==" />

We resorted back to using .asp to check that the simulator returned the POST and it works with .asp. We are really stuck as to why it shouldn’t work in .aspx. Any help would be greatly appreciated.

Andrew

I have managed to update and get a least a valied respones now from sage page.

Status=INVALID
StatusDetail=Unable to find the transaction in our database.
RedirectURL=/PaymentGateway/SagePayOrderFailed.aspx?reasonCode=001

but it is still losing the post data some where as it firing the Application_BeginRequest twice.(I dont know if this is any help)

Found out why Application_BeginRequest is firing twice. When sage pay is sending the data to the page it is getting redirected to the same page.

So it is losing the data there however i have removed all of our redirect rules and it is still doing it. there are no Response.Redriect() in our solution. So i am lost where to look next for where the issues is occoring.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T17:10:43+00:00Added an answer on June 9, 2026 at 5:10 pm

    We have found the issue it was to do with anonymousIdentification in the web config.

    Within that the cookieless value was set and this was making it 302 to the same page which strip the post values. Didnt see that it was redireting till we checked the server logs.

    This is the code :
    <anonymousIdentification enabled="true" cookieName=".ASPXANONYMOUS" cookieTimeout="100000" cookieless="UseDeviceProfile" cookiePath="/" cookieRequireSSL="false" cookieSlidingExpiration="true" cookieProtection="None" />

    So all we did is take out the cookieless value and the Sagepay now works a dream.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay I been trying to work this out but unable too. I have a
I have been pulling my hair out trying to make this work. I have
I have been trying for quite a while to work out how to accomplish
I have been trying to figure out this issue I am having with PHP
I have been pulling my hair out trying to get the shadows to work
I have been trying to work out a file rename program based on ruby,
I have been trying to work with the Projector and Ray classes in order
I have been trying to make it work with either fwrite or fputcsv but
I have been trying to get nServiceBus to work with Ninject 2.0 as the
I have been trying to get this to work correctly and I think I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.