I'm not sure how or when this happened but the Continue Shopping button on the checkout page is no longer working in my application. The ClientContext.Context.LastCatalogPageUrl value is being set to http://localhost:1686/PublicStore/product/8-Tooth-Gear,3182,211.aspx?id=3182&cid=211 instead of
http://localhost:1686/PublicStore/product/8-Tooth-Gear,3182,211.aspx
The ClientContext.Context.IsUrlRewritten is never getting set to true for some reason.
The PageHandler GetHandler function never gets to set the IsUrlReWritten to true because the file exists.
public IHttpHandler GetHandler(HttpContext context, string requestType,
string url, string pathTranslated)
{
if (File.Exists(pathTranslated))
{
return PageParser.GetCompiledPageInstance(url, pathTranslated, context);
}
ErrorsError[] errors = new ErrorsError[] { };
SiteNode[] nodes = ClientCatalog.LookupPages(new string[] { CommonHelper.GetRelativeUrl(url) }, new string[] { "ItemAttributes", "AccessLevels", "ItemMetaAttributes" }, ref errors);
if (nodes != null && nodes.Length > 0 && nodes[0] != null)
{
ClientContext.Context.IsUrlReWritten = true;
context.Items["PageNode"] = nodes[0];
return PageParser.GetCompiledPageInstance("~/Custom/CustomPageHandler.aspx", context.Server.MapPath("~/Custom/CustomPageHandler.aspx"), context);
}
else
{
ClientContext.Context.IsUrlReWritten = false;
return PageParser.GetCompiledPageInstance(url, pathTranslated, context);
}
}