logo
Welcome to our new AbleCommerce forums. As a guest, you may view the information here. To post to this forum, you must have a registered account with us, either as a new user evaluating AbleCommerce or an existing user of the application. For all questions related to the older version of Gold and earlier, please go to AbleCommerce Gold forum. Please use your AbleCommerce username and password to Login. New Registrations are disabled.

Notification

Icon
Error

Options
Go to last post Go to first unread
judy at Web2Market  
#1 Posted : Tuesday, August 30, 2022 9:31:18 AM(UTC)
judy at Web2Market

Rank: Advanced Member

Groups: Developers
Joined: 11/7/2018(UTC)
Posts: 303

Thanks: 21 times
Was thanked: 5 time(s) in 5 post(s)
Why would the following html code be showing for a 404 error instead of what the html would render?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<title>Page Not Found</title>


<link href="/Content/bootstrap.min.css" rel="stylesheet" />
<link href="/Themes/xxx/Content/favicon.ico" rel="icon" type="image/x-icon" />

<link href="/Themesxxx/Content/CSS?v=6e6Ta8lNhkYfbY4u0vJdpMCu5jnJIKBZ3LnJgGcf1YI1" rel="stylesheet"/>


</head>
<body>
<div id="page-wrapper" class="error-page">

<section class="content error">
<div class="error-wrapper">
<div class="error-number">404</div>
<div class="error-text">
<h1>PAGE NOT FOUND</h1>
<p>We cannot find the page you are looking for. We apologize for the inconvenience. </p>
<p><a href="/default">Go Back To Home Page</a></p>
</div>
</div>
</section>
</div>


<script src="/script/app?v=aOL17tsTFMLf-E9lobdVj9304Pktxf9mEzn7g1mROfQ1"></script>

</body>
</html>

Wanna join the discussion?! Login to your AbleCommerce Forums forum account. New Registrations are disabled.

nadeem  
#2 Posted : Tuesday, August 30, 2022 10:30:40 AM(UTC)
nadeem

Rank: Advanced Member

Groups: Administrators, Developers, Registered, HelpDesk, Authorized User, Admin, System
Joined: 10/11/2018(UTC)
Posts: 110

Thanks: 19 times
Was thanked: 18 time(s) in 18 post(s)
Is there any specific scenario where the HTML code is rendered in case of an error? I have copied the same HTML to /Views/Errors/PageNotFound.cshtml and it worked just fine.
judy at Web2Market  
#3 Posted : Wednesday, August 31, 2022 6:41:40 AM(UTC)
judy at Web2Market

Rank: Advanced Member

Groups: Developers
Joined: 11/7/2018(UTC)
Posts: 303

Thanks: 21 times
Was thanked: 5 time(s) in 5 post(s)
It is rendered if you type garbage after the domain name, like www.xxx.com/upewehewuh
Also, is there a way to make the error page show the header and left nav that show on the home page?
Thanks
judy at Web2Market  
#4 Posted : Wednesday, August 31, 2022 6:46:05 AM(UTC)
judy at Web2Market

Rank: Advanced Member

Groups: Developers
Joined: 11/7/2018(UTC)
Posts: 303

Thanks: 21 times
Was thanked: 5 time(s) in 5 post(s)
On the same site, they are getting random IIS 404 error displays when they try to access the home page. In one instance when he got a 404, the page view was still registered in the database. That seems to indicate to me that the page was hit? Any idea what would cause this? It can't be reproduced purposely.
Thanks
nadeem  
#5 Posted : Thursday, September 1, 2022 7:48:54 AM(UTC)
nadeem

Rank: Advanced Member

Groups: Administrators, Developers, Registered, HelpDesk, Authorized User, Admin, System
Joined: 10/11/2018(UTC)
Posts: 110

Thanks: 19 times
Was thanked: 18 time(s) in 18 post(s)
Quote:
It is rendered if you type garbage after the domain name, like www.xxx.com/upewehewuh


Is this happening consistently?

Quote:
Also, is there a way to make the error page show the header and left nav that show on the home page?


Since the errors view isn't part of the CMS system, you have to add all the widgets (from the store header board and left sidebar) manually on the page. You can also try to create/use your custom errors page by creating a content page from the merchant admin. This isn't tested.

Quote:
On the same site, they are getting random IIS 404 error displays when they try to access the home page. In one instance when he got a 404, the page view was still registered in the database. That seems to indicate to me that the page was hit? Any idea what would cause this?


Have you customized the error handling code inside Global.asax.cs file or any change in the custom errors section in web.config? Can you share the site URL where this is happening?
judy at Web2Market  
#6 Posted : Thursday, September 1, 2022 9:49:07 AM(UTC)
judy at Web2Market

Rank: Advanced Member

Groups: Developers
Joined: 11/7/2018(UTC)
Posts: 303

Thanks: 21 times
Was thanked: 5 time(s) in 5 post(s)
Is this happening consistently? - yes, every time I do it. It doesn't do it on their development site on our servers though.

The 404s were on the home page and I asked them to test on another page if they get it on the home page. I checked IIS logs yesterday and I had turned on failed request logging in IIS, and the only 404s registered were valid 404s. Now one person says everyone at work was getting a 404, but he was getting the page on his phone. They are going to check their network and firewall.
nadeem  
#7 Posted : Thursday, September 1, 2022 12:31:43 PM(UTC)
nadeem

Rank: Advanced Member

Groups: Administrators, Developers, Registered, HelpDesk, Authorized User, Admin, System
Joined: 10/11/2018(UTC)
Posts: 110

Thanks: 19 times
Was thanked: 18 time(s) in 18 post(s)
Check IIS configurations to see if there is any new module installed on the server or the handler mappings been modified somehow.

Also, make sure the following entries are there in the web.config file:

Code:
<handlers>
   <remove name="ExtensionlessUrlHandler-Integrated-4.0"/>
   <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0"/>
</handlers> 
judy at Web2Market  
#8 Posted : Monday, September 26, 2022 6:14:47 AM(UTC)
judy at Web2Market

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 finally found out what the issue was. I logged on to the web server itself to eliminate the Sucuri WAF firewall and viewed the error page there and it was OK. Sururi said:

I've to disable the 'Additional security headers' to resolve the issue.

>https://waf.sucuri.net/?settings&site=thegpsstore.com&panel=security



This option will add some recommended security headers to your site in order to protect you against some forms of XSS and clickjacking attacks. If you allow other sites to "iframe" your content, do not enable this option. The following headers will be added: X-XSS-Protection, X-Frame-Options.
Users browsing this topic
Guest (4)
Similar Topics
404 Errors on Product Pages After Upgrade to 9.0.3 (General Questions)
by david9688526 12/18/2020 11:15:52 AM(UTC)
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.