locked
Do we have to apply the workaround on each website on IIS? RRS feed

  • Question

  • User-327914518 posted

    I am maintaining hundreds of websites, is there a way to do this workaround in one place such as machine.config?


    thanks

    Saturday, September 18, 2010 9:46 AM

Answers

  • User-1179452826 posted

    I'd recommend applying it on each website. You can put it in machine.config, but if the web.config specifies the custom errors section, that will override machine.config. Furthermore, you'll need to add / change the error.aspx page on each site.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, September 18, 2010 10:01 AM
  • User541108374 posted

    Applying it server wide can indeed be done by setting the machine.config setting and specifying allowOverride="false". However that might break sites if they have an override of it in one of their web.config files.

    If you're a site admin then you should be able to use powershell to check up on all files in the folders where you put your sites, filter the web.config files and search for the customError section.

    Another option would be to set the firewall to not let error messages (http codes) go through.

    Grz, Kris.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, September 18, 2010 10:36 AM

All replies

  • User-1179452826 posted

    I'd recommend applying it on each website. You can put it in machine.config, but if the web.config specifies the custom errors section, that will override machine.config. Furthermore, you'll need to add / change the error.aspx page on each site.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, September 18, 2010 10:01 AM
  • User541108374 posted

    Applying it server wide can indeed be done by setting the machine.config setting and specifying allowOverride="false". However that might break sites if they have an override of it in one of their web.config files.

    If you're a site admin then you should be able to use powershell to check up on all files in the folders where you put your sites, filter the web.config files and search for the customError section.

    Another option would be to set the firewall to not let error messages (http codes) go through.

    Grz, Kris.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, September 18, 2010 10:36 AM