AbleCommerce Forums
»
AbleCommerce
»
General Questions
»
Invalid product, Invalid category errors
Rank: Advanced Member
Groups: Developers
Joined: 11/7/2018(UTC) Posts: 303
Thanks: 21 times Was thanked: 5 time(s) in 5 post(s)
|
We saw these errors in a site when they were Gold, now AC9, when we used Elmah logging. They add so many errors to the log that it takes longer finding the real errors. These are thrown in the NavigationHelper. Can you think of any issue with removing the throw line? I read that you can use return new HttpStatusCodeResult(HttpStatusCode.NotFound); https://stackoverflow.co...ttpstatuscoderesult?rq=1Would it be better to change the code in places like ValidateCategoryAttribute On ActionExecuting? The client is not interested in reviewing every 404 for an invalid product or category. Thanks public static void Trigger404(HttpResponse response, string statusDescription) { if (HttpContext.Current.IsCustomErrorEnabled) { throw new HttpException(404, statusDescription); } else { response.Clear(); response.StatusCode = 404; response.StatusDescription = statusDescription; throw new HttpException(404, statusDescription); } }
|
|
|
|
Rank: Advanced Member
Groups: Admin, Developers, Registered, HelpDesk, Authorized User Joined: 10/5/2018(UTC) Posts: 704
Thanks: 5 times Was thanked: 113 time(s) in 112 post(s)
|
|
|
|
|
AbleCommerce Forums
»
AbleCommerce
»
General Questions
»
Invalid product, Invalid category errors
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The AbleCommerce Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close