Dnn.Platform: 404 errors are creating 503 errors

Description of bug

When navigating to a page that does not exist you get a 503 DNN error for a 404 error page load along with 2 errors in Admin log related to the site/page.

Steps to reproduce

List the steps to reproduce the behavior:

  1. Open your browser to a page that does not exist on your DNN website.
  2. See Current Result

Current result

DNN Error : No sites currently exist for this installation. - 503 Service Unavailable

Expected result

404 error page that uses the same site skin.

Screenshots

If applicable, provide screenshots to help explain your problem. image

image

Error log

A simple Page 404 Admin Log error for page is shown.

image

And this error follows after:

` Page Load Exception

DefaultDataProvider:DotNetNuke.Data.SqlDataProvider, DotNetNuke Message:Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration><system.web><httpModules> section in the application configuration.

StackTrace:

InnerMessage:Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration><system.web><httpModules> section in the application configuration.

InnerStackTrace:

at System.Web.UI.Page.get_Session() at DotNetNuke.Framework.CachePageStatePersister.Save() at System.Web.UI.Page.SaveAllState() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)`

Additional context

I do not like seeing it say “DNN Error” i would rather it say Application Error. Maybe just sorry you found a page that does not exist or something that covers a lot of issues. The DNN error is being logged, no real need for a visitor to see DNN. Or this could be set to the website Portal Name Website Error. Something more generic or related to the website that has the issue.

Affected version

  • 10.0.0 alpha build
  • [x ] 9.4.2 alpha build
  • 9.4.1 latest supported release

Affected browser

  • Chrome
  • Firefox
  • Safari
  • Internet Explorer
  • Edge

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Comments: 16 (13 by maintainers)

Most upvoted comments

we have a winner thank you @david-poindexter for making this clear. This is the issue I have been having. I don’t think it matters which theme you use, just using a custom 404 page.

I get a lot of requests for example bots hitting WP admin and other common folders people have in sites such as “backup” and they plague my error logs on some sites.

@mitchelsellers not in my case.

I do have some additional information to provide:

  • Setting the 404 page to “None Specified” does in fact allow IIS to render a standard 404.
  • Changing the 404 page back to a simple page (only one module with <p>404 - Not Found</p> in the content, and setting that page to use the Xcillion 404 skin/container results in the 503 page being displayed by DNN.
  • Setting the 500 page setting in Site Settings to the same page does not resolve the issue.