I've installed Framework 4.5 Beta and MVC 4 Beta on a development server.
The server runs Windows Server 2008 R2 and IIS 7.5.
I've deployed one website and 3 services on this server.
All code is built using .Net 4.5 and the new Asp.Net 4.5/MVC 4 framework.
The services derive from the new ApiController.
In one service method there was a bug that was causing a Null reference exception to be thrown.
When this method is called, the browser/Fiddler returns a HTTP 500 error, but no error details.
Try as I might I have not been able to get the server to return details of the error.
There is nothing in the event log of the server. The failed request tracing only mentions the error occured during processing of the request, but no other details. All variations of suggested changes to the config (http://stackoverflow.com/questions/2640526)
failed to provide details of the actual error.
I eventually debugged the issue by commenting out sections of the code and repeatedly deploying.
The services deployed on the remote server still do not return details when an exception is thrown.
If anyone has deployed .Net 4.5 and MVC 4 Beta and are able to retrieve error details then I'll be very keen to hear from them.
Otherwise I believe this is a significant issue that needs to be looked into.
May I know if you had the access to this server IIS.
If yes, then you can click on your site -> Error Pages -> Edit Features Setting -> choose Detailed Error.
For ASP Classic, to enable the detailed error message can be done by clicking your site in IIS -> ASP -> Debugging Properties -> Send Errors to Browser -> TRUE
If this post was useful to you, please mark it as correct answer.
Noel Abraham...
Member
6 Points
18 Posts
Server returns HTTP 500 error for a service call, but no details
Mar 30, 2012 01:19 PM|LINK
Hi,
I've installed Framework 4.5 Beta and MVC 4 Beta on a development server.
Try as I might I have not been able to get the server to return details of the error.
There is nothing in the event log of the server. The failed request tracing only mentions the error occured during processing of the request, but no other details. All variations of suggested changes to the config (http://stackoverflow.com/questions/2640526) failed to provide details of the actual error.
I eventually debugged the issue by commenting out sections of the code and repeatedly deploying.
The services deployed on the remote server still do not return details when an exception is thrown.
If anyone has deployed .Net 4.5 and MVC 4 Beta and are able to retrieve error details then I'll be very keen to hear from them.
Otherwise I believe this is a significant issue that needs to be looked into.
Thanks!
ASP.NET4.0
d4daud
Contributor
2293 Points
468 Posts
Re: Server returns HTTP 500 error for a service call, but no details
Mar 30, 2012 02:25 PM|LINK
You can get the error details by setting web.config:
<configuration> <system.webServer> <httpErrors errorMode="Detailed" /> <asp scriptErrorSentToBrowser="true"/> </system.webServer> <system.web> <customErrors mode="Off"/> <compilation debug="true"/> </system.web>ASP.NET4.0
Noel Abraham...
Member
6 Points
18 Posts
Re: Server returns HTTP 500 error for a service call, but no details
Mar 30, 2012 02:55 PM|LINK
Daud,
As I said above "All variations of suggested changes to the config (http://stackoverflow.com/questions/2640526) failed to provide details of the actual error."
Are you able to get error details back from a remote server for an Asp.Net 4.5 applciation?
ASP.NET4.0
kranthireddy...
Participant
790 Points
167 Posts
Re: Server returns HTTP 500 error for a service call, but no details
Apr 25, 2012 10:48 PM|LINK
Error 500 is a configuration error.
There might be some errors in your config file.
try replacing the old config and it might work.
Regards
ASP.NET4.0
gnoix
Member
232 Points
48 Posts
Re: Server returns HTTP 500 error for a service call, but no details
Jul 10, 2012 07:45 AM|LINK
May I know if you had the access to this server IIS.
If yes, then you can click on your site -> Error Pages -> Edit Features Setting -> choose Detailed Error.
For ASP Classic, to enable the detailed error message can be done by clicking your site in IIS -> ASP -> Debugging Properties -> Send Errors to Browser -> TRUE
ASP.NET Hosting & Windows Hosting Expert