Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. customError in Web.Config file is not working

customError in Web.Config file is not working

Scheduled Pinned Locked Moved ASP.NET
comsysadminhelpworkspace
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Prakash SE
    wrote on last edited by
    #1

    Hi All, I am getting the following error whenever i try to throw an error in my web application. I have specified customErrors in web.config file like as follows: <configuration> <system.web> <customErrors mode="On" defaultRedirect="CustomError.aspx"/> <error statusCode="404" redirect="CustomError.aspx"/> </system.web> </configuration> Error: Runtime Error Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed. Details: To enable the details of this specific error message to be viewable on the local server machine, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "RemoteOnly". To enable the details to be viewable on remote machines, please set "mode" to "Off". <!-- Web.Config Configuration File --> <configuration> <system.web> <customErrors mode="RemoteOnly"/> </system.web> </configuration> Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL. <!-- Web.Config Configuration File --> <configuration> <system.web> <customErrors mode="On" defaultRedirect="mycustompage.htm"/> </system.web> </configuration> Please let me know the solution. Prakash G, Software Engineer Iridium Interactive Limited, SriNagar Colony Road #3 Banjara Hills Hyderabad - 500035 mail me @ prakash.se@indiatimes.com call me @ +91 9866833523

    R 1 Reply Last reply
    0
    • P Prakash SE

      Hi All, I am getting the following error whenever i try to throw an error in my web application. I have specified customErrors in web.config file like as follows: <configuration> <system.web> <customErrors mode="On" defaultRedirect="CustomError.aspx"/> <error statusCode="404" redirect="CustomError.aspx"/> </system.web> </configuration> Error: Runtime Error Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed. Details: To enable the details of this specific error message to be viewable on the local server machine, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "RemoteOnly". To enable the details to be viewable on remote machines, please set "mode" to "Off". <!-- Web.Config Configuration File --> <configuration> <system.web> <customErrors mode="RemoteOnly"/> </system.web> </configuration> Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL. <!-- Web.Config Configuration File --> <configuration> <system.web> <customErrors mode="On" defaultRedirect="mycustompage.htm"/> </system.web> </configuration> Please let me know the solution. Prakash G, Software Engineer Iridium Interactive Limited, SriNagar Colony Road #3 Banjara Hills Hyderabad - 500035 mail me @ prakash.se@indiatimes.com call me @ +91 9866833523

      R Offline
      R Offline
      RepliCrux
      wrote on last edited by
      #2

      Try this: (I am just doing hit and trial) in the internet explorer, go to Tools --> Internet options -->Advanced: Then untick the option for "Show friendly http error messages"

      P U 2 Replies Last reply
      0
      • R RepliCrux

        Try this: (I am just doing hit and trial) in the internet explorer, go to Tools --> Internet options -->Advanced: Then untick the option for "Show friendly http error messages"

        P Offline
        P Offline
        Prakash SE
        wrote on last edited by
        #3

        hi, thank you. but i already tried the option u suggested. Even its not working. I restarted the IIS also. Still its showing the same error. Let me know, if u find any other solution/way to solve the problem. thank u once again

        Prakash G, Software Engineer Iridium Interactive Limited, SriNagar Colony Road #3 Banjara Hills Hyderabad - 500035 mail me @ prakash.se@indiatimes.com call me @ +91 9866833523

        R 1 Reply Last reply
        0
        • P Prakash SE

          hi, thank you. but i already tried the option u suggested. Even its not working. I restarted the IIS also. Still its showing the same error. Let me know, if u find any other solution/way to solve the problem. thank u once again

          Prakash G, Software Engineer Iridium Interactive Limited, SriNagar Colony Road #3 Banjara Hills Hyderabad - 500035 mail me @ prakash.se@indiatimes.com call me @ +91 9866833523

          R Offline
          R Offline
          RepliCrux
          wrote on last edited by
          #4

          I think I remember, Go to the folder in Inetpub\wwwroot and give Network Service \ Asp.Net user permissions. Try this.

          1 Reply Last reply
          0
          • R RepliCrux

            Try this: (I am just doing hit and trial) in the internet explorer, go to Tools --> Internet options -->Advanced: Then untick the option for "Show friendly http error messages"

            U Offline
            U Offline
            Ulhas Morbale
            wrote on last edited by
            #5

            Hello, I m also having the same runtime error but for only https:// pages, all other .aspx pages are working fine. Can any body guide me about how to use host server's Shared SSL certificate. What are the settings to be done for IIS of host server? I have my web.config file as, here secureWebPages mode="On" works as cutomerrors & I tried by doing it "Off" & "Remoteonly" also, but it is still giving error. Thanks in advance.

            by ULZ

            S 1 Reply Last reply
            0
            • U Ulhas Morbale

              Hello, I m also having the same runtime error but for only https:// pages, all other .aspx pages are working fine. Can any body guide me about how to use host server's Shared SSL certificate. What are the settings to be done for IIS of host server? I have my web.config file as, here secureWebPages mode="On" works as cutomerrors & I tried by doing it "Off" & "Remoteonly" also, but it is still giving error. Thanks in advance.

              by ULZ

              S Offline
              S Offline
              sidbaruah
              wrote on last edited by
              #6

              Instead of using a .aspx page as the error page try having an html page as the error page.It might work. Just try out..

              I was born dumb!! :laugh:Programming made me laugh:laugh:!!! --sid--

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups