You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looking at event log I could see a lot of these exceptions: Server cannot append header after HTTP headers have been sent
Looking at them I've also noticed that one of the cases in which they are fired is when I go from Cart page on Checkout page after clicking on 'Secure Checkout' button.
Searching on Google I've found a lot of post about this MVC exception (this one of them) and it seems to be caused by use of: Response.Redirect
instead return Redirect
in fact, looking at HCC source code, in the CartController.cs when the 'Secure Checkout' button is pressed is called the ActionResult IndexPost() where is called the void ForwardToCheckout with in turn a call to Checkout controller using just Response.Redirect
I did a quick test modifing the ActionResult IndexPost() in CartController in this way:
`// POST: /Cart/
[ActionName("Index")]
[HccHttpPost]
public ActionResult IndexPost()
{
var model = IndexSetup();
LoadCart(model);
var intResult = CartIntegration.Create(HccApp).BeforeProceedToCheckout(HccApp, model);
if (!intResult.IsAborted)
{
if (CheckForStockOnItems(model))
{
return Redirect(Url.RouteHccUrl(HccRoute.Checkout, null, Uri.UriSchemeHttps));
//ForwardToCheckout(model);
}
}
else
{
FlashWarning(intResult.AbortMessage);
}
return View(model);
}
`
In this quick test I bypass the ForwardToCheckout call replacing directly with a 'return Redirect' to Checkout, and this remove all exceptions around 'Secure Checkout' button.
Then I am therefore reasonably sure that the part of the source code to be corrected is that part.
I do not know if the Response.Redirect was also used in other parts of the HCC project, in that case it is to be reviewed in all the points where it was used.
Here you can find the reference to discussion about this on hotcakes.org forum: https://hotcakes.org/Forums/g/posts/t/163/find/unread/Exceptions-in-event-log
The text was updated successfully, but these errors were encountered:
WillStrohl
changed the title
Server cannot append header after HTTP headers have been sent
CI: Server cannot append header after HTTP headers have been sent
Mar 22, 2018
This has been confirmed to be resolved in the pending 03.02.02 release, but only during checkout. There is another instance that may occur, but it hasn't yet been determined when/how.
Looking at event log I could see a lot of these exceptions: Server cannot append header after HTTP headers have been sent
Looking at them I've also noticed that one of the cases in which they are fired is when I go from Cart page on Checkout page after clicking on 'Secure Checkout' button.
Searching on Google I've found a lot of post about this MVC exception (this one of them) and it seems to be caused by use of:
Response.Redirect
instead
return Redirect
in fact, looking at HCC source code, in the CartController.cs when the 'Secure Checkout' button is pressed is called the ActionResult IndexPost() where is called the void ForwardToCheckout with in turn a call to Checkout controller using just Response.Redirect
I did a quick test modifing the ActionResult IndexPost() in CartController in this way:
`// POST: /Cart/
[ActionName("Index")]
[HccHttpPost]
public ActionResult IndexPost()
{
var model = IndexSetup();
LoadCart(model);
`
In this quick test I bypass the ForwardToCheckout call replacing directly with a 'return Redirect' to Checkout, and this remove all exceptions around 'Secure Checkout' button.
Then I am therefore reasonably sure that the part of the source code to be corrected is that part.
I do not know if the Response.Redirect was also used in other parts of the HCC project, in that case it is to be reviewed in all the points where it was used.
Here you can find the reference to discussion about this on hotcakes.org forum:
https://hotcakes.org/Forums/g/posts/t/163/find/unread/Exceptions-in-event-log
The text was updated successfully, but these errors were encountered: