In Sharepoint, if you want to get the real yellow ASP.Net page with the real error message, just update your web.config:
<SafeMode MaxControls="200" CallStack="false" ...>
<!-- should be-->
<SafeMode MaxControls="200" CallStack="true" ...>
<customErrors mode="On" />
<!-- should be-->
<customErrors mode="Off" />
<compilation batch="false" debug="false">
<!-- should be-->
<compilation batch="true" debug="true">