I\'m running an application that has its own error handlers. Error pages are displayed properly while testing in dev environment (error pages are displayed properly). Howe
Well It turned out that in order to force IIS 7 to show custom pages the following lines should be added to web.config file.
Put in system.webServer section