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.
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.
After two weeks, finally I solve this problem:
simply clear tag and copy these tags:
<remove statusCode="403"/> <remove statusCode="404"/> <remove statusCode="500"/>
User contributions licensed under CC BY-SA 3.0