I have a page that is blowing up and I am getting this error:
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.
In this particular case I am unable to remote into the server. I am however able to access the wwwroot folder where pages are being hosted. The page I am trying to upload works on my test server but when I put it into production it is throwing the error. I suspect due to a missing namespace.
Is there anyway to enable remote errors for this one page or otherwise capture the exception detail? It is being thrown before Page_Load()
If you have access to the Event Log of the server, this is the place where unhandled exception details are usually written by ASP.NET.
Another possibility is to enable temporarily exception details in web.config to be shown remotely by setting:
This will display the exception stacktrace instead of a YSOD so that you know what the problem is.
And yet another possibility is to subscribe to the Appliaction_Error method in Global.asax and log yourself the exception being thrown. By the way that’s something that you should do anyways.
You may also checkout ELMAH.
Of course all this will be futile if your application is not configured properly in IIS (like for example errors in your web.config, incorrect ASP.NET version in the virtual directory, .NET Framework not installed on the remote server, …). In this case you probably need access to the server.