locked
<customErrors mode="Off"/> is there but server says it isnt RRS feed

  • Question

  • User1598575726 posted

     I have just got a dedicated server.

    Having uploaded my pages to it, I trired to run the default.aspx page but it got the runtime error but wouldnt show the details. However, the <customErrors mode="Off"/> is there in the right polace because i have added it before. It works on localhost and shows errors, but not the server.

    Moreover, the default.aspx works fine on localhost but not on the server. I know I cant ask you why because I cant see the error!!

    Thank you very much for your help in getting my application to show the error on local machines,

    Sam

    Friday, August 22, 2008 5:36 AM

Answers

  • User1598575726 posted

    Sorry. I have been going through plesk for my server and just discovered that the server had custome error mode set to on.

     

    I changed it to off and everything worked.

     It seems both web.config and the server need to be configured.

    Sam

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, August 22, 2008 11:13 AM

All replies

  • User854688209 posted

    If you have multiple web.config file, you need to <customErrors mode="Off"/>  for each config file.

    Read this article : http://technicalsol.blogspot.com/2008/06/aspnet-deployment-true.html

    It might help you.

    Mark this as answer if it resovles the issue.

    visti: http://technicalsol.blogspot.com

    Friday, August 22, 2008 7:21 AM
  • User-850316366 posted

    from where you r checking the application from the server itself or from some other system.

    In that case you need to look into the remoteonly attribute also.

    Friday, August 22, 2008 8:49 AM
  • User1485238302 posted

    In that case you need to look into the remoteonly attribute also.

    Not necessarily.

    RemoteOnly: Enables custom errors on remote clients only. Custom errors are shown only to remote clients and ASP.NET errors are shown to the local host.

    On: Enables custom errors. If no DefaultRedirect is specified, standard errors are issued.

    Off: Disables custom errors, allowing display of standard errors.

    If CustomErrorsMode = "Off" is not working, there can a few reasons that I know of.

    1. You web.config itself has errors.

    2. The .Net Version is not correct on the server for your application. By this I mean that if my application is targetted for version 2.0 and my on the web server the application version is set to version 1.0, then also you will get the standard error page.

    3. The "Off" value is typed in lowercase like this "off".

     

    Friday, August 22, 2008 9:03 AM
  • User1598575726 posted

     

    In that case you need to look into the remoteonly attribute also.

    Not necessarily.

    RemoteOnly: Enables custom errors on remote clients only. Custom errors are shown only to remote clients and ASP.NET errors are shown to the local host.

    On: Enables custom errors. If no DefaultRedirect is specified, standard errors are issued.

    Off: Disables custom errors, allowing display of standard errors.

    If CustomErrorsMode = "Off" is not working, there can a few reasons that I know of.

    1. You web.config itself has errors.

    2. The .Net Version is not correct on the server for your application. By this I mean that if my application is targetted for version 2.0 and my on the web server the application version is set to version 1.0, then also you will get the standard error page.

    3. The "Off" value is typed in lowercase like this "off".

     

    I have checked the .net version - correct.

    The Off value is not in lower case.

    How would I know if my web.config file is worng?

    Thanks,

    Sam

    Friday, August 22, 2008 11:02 AM
  • User1485238302 posted

    I have checked the .net version - correct.

    Just to be sure we are on the same page, how did you check this?

    How would I know if my web.config file is worng?

    Post it here (using the "Source Code" option at the top right of the post editor, using XML option), and lets see if anyone can find anything wrong with it. The key point is that you said it works fine on your dev machine, that means that web.config should be fine. 

    Friday, August 22, 2008 11:09 AM
  • User1598575726 posted

    Sorry. I have been going through plesk for my server and just discovered that the server had custome error mode set to on.

     

    I changed it to off and everything worked.

     It seems both web.config and the server need to be configured.

    Sam

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, August 22, 2008 11:13 AM
  • User930584213 posted

    Thanks sumitd.  I was having this very problem today and it was because I have a web.config file in my project folder and also in the web root.  When I added <customErrors mode="Off"/> to the web.config in both places it worked.  I hope I remember this when it happens again in 4 or 5 years. [:)]

     

    Wednesday, October 15, 2008 4:03 PM
  • User138965008 posted

    Hi

    Please Read this article http://msdn.microsoft.com/en-us/library/system.web.configuration.deploymentsection.retail(VS.80).aspx

    Shazz
    Thursday, October 16, 2008 2:48 AM
  • User930584213 posted

    Huh?  That article doesn't seem to be related to this thread.

     

    Thursday, October 16, 2008 9:11 AM