Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...404 errors giving a 200 response404 errors giving a 200 response
Previous
 
Next
New Post
7/15/2016 3:33 PM
 

Hello,

 

 I'm on 7.4.1 which was upgraded from 6.2.x .  everything works fine except that any 404 error (anypage.aspx or blahblah.bad) gives a 200 okay response. 

If the request was for Error404.aspx  a 200 response would be okay, but when its a request for /blah/bad/test/admin and we get a 200 response that's not okay

I've tried this http://www.dnnsoftware.com/wiki/dnn-404-handling but to no avail. 

 

anyone else run into this? how do i fix this? 

 

thank you

 

 
New Post
7/21/2016 4:17 PM
 

So i was able to solve this (although admittedly not really how i wanted to ) 

 

I see in PageBase.cs where it should be setting the 404, but it doesn't seem to actually get triggered. 

 

I'm on version 7.04.01 

 

by adding the following into Default.aspx on line 866

//Added a 404 status if the page is the 404 error page 

if (Page.Title.IndexOf("Error404") > 0) Response.StatusCode = 404;

 

also needed the following web.config settings 

 

line 112

    <httpErrors>

      <remove statusCode="404" subStatusCode="-1" />

      <error statusCode="404" prefixLanguageFilePath="" path="/Error404.aspx" responseMode="ExecuteURL"  />

      <remove statusCode="500" subStatusCode="-1" />

      <error statusCode="500" prefixLanguageFilePath="" path="/Error404.aspx" responseMode="ExecuteURL" />

    </httpErrors>

 

 

line 206

 

    <customErrors mode="On">

      <error statusCode="404" redirect="/Error404.aspx" />

      <error statusCode="500" redirect="/Error500.aspx" />

      

    </customErrors>

 

seems like its not getting to Handle404Exception in PageBase.cs ,  when i try to attatch a remote debugger i keep getting "no symbols loaded" for most of the project.  not sure why as i added a path to the symbols locally, maybe i need to put them on the server and load from there ? 

 

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...404 errors giving a 200 response404 errors giving a 200 response


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.

Content Layout

Subscribe to DNN Digest

DNN Digest is our monthly email newsletter. It highlights news and content from around the DNN ecosystem, such as new modules and themes, messages from leadership, blog posts and notable tweets. Keep your finger on the pulse of the ecosystem by subscribing.  


Copyright 2017 by DNN Corp Terms of Use Privacy
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out