HTTP Error 500.19 - Internal Server Error (Module: CustomErrorModule, Error Code: 0x80070021)


I'm programming ASP.Net MVC 5 in VS2015. My website runs with no error from visual studio but after publishing (IIS 8.5, Windows Server 2012), this error displays.

Of course, I would point out that this error is displayed for pages where errors like 403, 404, 500, etc. occur.

enter image description here

I tried many ways but I didn't get it. For example a change to Web.Config or adding a new Feature to IIS but none worked.

1 Answer


After two weeks, finally I solve this problem:

simply clear tag and copy these tags:

  <remove statusCode="403"/>
  <remove statusCode="404"/>
  <remove statusCode="500"/>
answered on Stack Overflow Jan 6, 2020 by Rashid Bagheri

User contributions licensed under CC BY-SA 3.0