I've great news about this issue!
Searching on Google I've found a lot of post about this MVC exception ([url=https://stackoverflow.com/questions/34270192/server-cannot-append-header-after-http-headers-have-been-sent-exception-at-html?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa]this one of them[/url]) and it seems to be caused by use of
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:
[CODE]
// 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.
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.