In your web.config file you have set the customErrors attribute to Off and still get an error message like this:

...

Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
...

Chances are there’s another web.config file closer to the page requested with it’s customErrors attribute set to On. As SharePoint’s layouts directory has it’s own web.config file this typically happens when calling custom application pages.