Can't see the real ASP.NET application error message?

I have a nearly blank ASP.NET website that I have created (1 page). I have deliberately coded division by zero error in page_Load. If the application pool is set to "ASP.NET 4.0 Pipeline: Integrated" then I don't see the page load error, but instead I get:

Runtime error

Description. Application error on the server. Electric current custom error settings for this application prevent application error details from being viewed.

The folder is configured as an application in IIS and the correct entries in the web.config to show errors are present, but for some reason I cannot get .NET to show me the correct error message unless I change the ASP.NET Classic application pool ... Why is "classic" mode needed? I am pulling my hair out as all other sites on the same computer are working fine (IIS7) and yet any new site I create seems to have this same problem.

Any idea what could be causing IIS to either not recognize this folder, or the application, or otherwise not display the correct error message?

EDIT: Web.Config:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.web>
        <customErrors mode="Off" />
        <compilation debug="true" targetFramework="4.0" />
    </system.web>
</configuration>

      

+3


source to share


1 answer


OK, after a lot of temptation and comparing the installation to a production computer, I found that the answer actually lies in the .NET 4 application pool settings.

Once I checked "Enable 32-bit applications" (see screenshot) in the advanced IIS settings screen for the application pool, everything started to behave normally. I can only assume that something is installed somewhere that requires this setting in order for this application pool to work correctly, and that was preventing me from seeing the real error message. I would still be interested to see if anyone will know why this fixes the problem or how I can display the "real" error message that should be displayed when trying to use this application pool without checking "Enable 32-bit applications".



IIS App Pool Advanced Settings

+1


source







All Articles