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>
|
|
|
|
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.
|
|
|
|
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/upewehewuhAlso, is there a way to make the error page show the header and left nav that show on the home page? Thanks
|
|
|
|
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
|
|
|
|
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 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?
|
|
|
|
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.
|
|
|
|
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>
|
|
|
|
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.
|
|
|
|
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