Is there a standard set of HTTP 500.xx codes? - http

I've seen servers return 500 Internal Server Error codes with extra 'detail' in a decimal-delimited sub-code, e.g. 500.19.
Is this sub-code standardised or can I freely use it? How do I prevent crashing into vendor codes, say, in IIS or ASP.NET?
Luke

Is this sub-code standardised or can I freely use it?
It is not possible to use it, quote RFC 2616:
The Status-Code element is a 3-digit integer
MSDN says for the HttpResponse.SubStatusCode:
Independent of whether tracing is configured, the code is never sent as part of the final response to the request
So, it is only used for logging and troubleshooting, not sent to the client.

There is a Microsoft standard list. See - http://support.microsoft.com/kb/943891
IIS 7.0 defines the following HTTP status codes that indicate a more specific cause of a 500 error:
500.0 - Module or ISAPI error occurred.
500.11 - Application is shutting down on the web server.
500.12 - Application is busy restarting on the web server.
500.13 - Web server is too busy.
500.15 - Direct requests for Global.asax are not allowed.
500.19 - Configuration data is invalid.
500.21 - Module not recognized.
500.22 - An ASP.NET httpModules configuration does not apply in Managed Pipeline mode.
500.23 - An ASP.NET httpHandlers configuration does not apply in Managed Pipeline mode.
500.24 - An ASP.NET impersonation configuration does not apply in Managed Pipeline mode.
500.50 - A rewrite error occurred during RQ_BEGIN_REQUEST notification handling. A configuration or inbound rule execution error occurred.
Note Here is where the distributed rules configuration is read for both inbound and outbound rules.
500.51 - A rewrite error occurred during GL_PRE_BEGIN_REQUEST notification handling. A global configuration or global rule execution error occurred.
Note Here is where the global rules configuration is read.
500.52 - A rewrite error occurred during RQ_SEND_RESPONSE notification handling. An outbound rule execution occurred.
500.53 - A rewrite error occurred during RQ_RELEASE_REQUEST_STATE notification handling. An outbound rule execution error occurred. The rule is configured to be executed before the output user cache gets updated.
500.100 - Internal ASP error.

Related

Random 500 errors on IIS

I have been working on an application that provides some web services to a client. The MVC application is built on .Net 4.5 framework. Everything worked fine until we looked at the response statistics our client had generated, where we could see we weren’t responding 100%. The statistics showed response drop to 90%-95% every other day.
Inspecting the logs
The first thing I did was to check our application log where I couldn’t find any exceptions logged. We log all (unhandled) exceptions in our application, which would normally lead to an error HTTP status code, so finding no such exception made me think that the request has not reached the application at all. The next step was to check the IIS access logs and there I could not find any 500 errors. I was under the impression that something is going on with the network which is causing 500's.
Upon further investigation, I realized those are being generated by IIS server. I found this by setting up Failed Request Tracing on IIS and after a while I found following error logged:
ModuleName - ManagedPipelineHandler Notification -
EXECUTE_REQUEST_HANDLER HttpStatus - 500 HttpReason - Error Retrieving
Data HttpSubStatus - 0 ErrorCode -The operation completed
successfully. (0x0)
I've looked at various stackoverflow posts but nothing really helped me. I guess it is because of no of requests we make per minute around 200 requests per minute). But I get response for 90-95% requests.
Attached detailed error log here
I figured out what the error is. .Net servers don't receive these requests in the first place, these are getting lost in the network. There is an oracle gateway which is buggy and killing few requests.

Does a 500 Internal Server Error always mean web-server error?

I have always experienced a 500 Internal Server Error to be a web-server error, subsequently logging it as a error.
However, I've been informed that a 500 Internal Server Error can be a application error as well. In this case, it does not seem to log to the web-server when this happens.
Are there cases where it is justified that a 500 Internal Server Error will not report the issue to the web-server error log?
www.w3.org reports:
Internal Error 500
The server encountered an unexpected condition which prevented it from fulfilling the request.
According to the spec, HTTP 5xx status codes are defined as server-side errors. Any client-side problem resulting in an HTTP 5xx error is an incorrect use of HTTP status codes. Client-side issues that prevent requests from being fulfilled should result in HTTP 4xx status codes.
6.6 Server Error 5xx
The 5xx (Server Error) class of status code indicates that the server is aware that it has erred or is incapable of performing the requested method. ...
-- https://www.rfc-editor.org/rfc/rfc7231#section-6.6
6.5 Client Error 4xx
The 4xx (Client Error) class of status code indicates that the client seems to have erred. ...
-- https://www.rfc-editor.org/rfc/rfc7231#section-6.5
If you see the 500 error on a website which is running Microsoft IIS, you may get a more specific error message:
500.0 Module or ISAPI error occurred.
500.11 Application is shutting down on the web server.
500.12 Application is busy restarting on the web server.
500.13 Web server is too busy.
500.15 Direct requests for Global.asax are not allowed.
500.19 Configuration data is invalid.
500.21 Module not recognized.
500.22 An ASP.NET httpModules configuration does not apply in Managed Pipeline mode.
500.23 An ASP.NET httpHandlers configuration does not apply in Managed Pipeline mode.
500.24 An ASP.NET impersonation configuration does not apply in Managed Pipeline mode.
500.50 A rewrite error occurred during RQ_BEGIN_REQUEST notification handling. A configuration or inbound rule execution error occurred.
500.51 A rewrite error occurred during GL_PRE_BEGIN_REQUEST notification handling. A global configuration or global rule execution error occurred.
500.52 A rewrite error occurred during RQ_SEND_RESPONSE notification handling. An outbound rule execution occurred.
500.53 A rewrite error occurred during RQ_RELEASE_REQUEST_STATE notification handling. An outbound rule execution error occurred. The rule is configured to be executed before the output user cache gets updated.
500.100 Internal ASP error.
For Apache webserver you can check its log file /var/log/apache2/error.log
For IIS you can find log files in %SystemDrive%\inetpub\logs\LogFiles or %SystemDrive%\Windows\System32\LogFiles\HTTPERR

Unknown Error on Remote Server

I have a web api running on a remote server that I connect to over VPN in order to deploy updates.
I installed the Rewrite Module for IIS 7 and made a rule to rewrite http to https for all requests.
Suddenly I am getting this error when I attempt to acquire an authorization token (OAuth):
{
"error":"server_error",
"error_description":"Exception has been thrown by the target of an invocation."
}
And this message for any api endpoint:
I cannot for the life of me figure out what's going on. How can I get a more useful error message from asp.net or iis? I cannot do remote debugging and the server does not have visual studio installed.
I have undone all the modifications I made and its still broken.
This is usually a sign that IIS is having problems even starting the application. I'd remove everything from the web.config file and add each line in one by one until you get back to this error message. If it is an application error (i.e., something in your code) you would get a 500. Since you aren't getting a 500, it is a lower level than your application and the next lower level is IIS parsing your web.config file before serving requests.

500 Internal Server Error - Any Upload via Wordpress Admin Panel

I am running a Wordpress website on Windows Server 2012 on VPS. I am receiving 500 Internal Server Error when I try to upload anything such as theme, media, plugin via adming panel of wordpress site. I am wondering why is this happenning.
What I could find so far is:
Most likely causes:
IIS received the request; however, an internal error occurred during the processing of the request. The root cause of this error depends on which module handles the request and what was happening in the worker process when this error occurred.
IIS was not able to access the web.config file for the Web site or application. This can occur if the NTFS permissions are set incorrectly.
IIS was not able to process configuration for the Web site or application.
The authenticated user does not have permission to use this DLL.
The request is mapped to a managed handler but the .NET Extensibility Feature is not installed.
Things you can try:
Ensure that the NTFS permissions for the web.config file are correct and allow access to the Web server's machine account.
Check the event logs to see if any additional information was logged.
Verify the permissions for the DLL.
Install the .NET Extensibility feature if the request is mapped to a managed handler.
Create a tracing rule to track failed requests for this HTTP status code. For more information about creating a tracing rule for failed requests, click here.
Detailed Error Information:
Module FastCgiModule
Notification ExecuteRequestHandler
Handler PHP-php
Error Code 0x80004005
Requested URL
Physical Path
Logon Method Anonymous
Logon User Anonymous
More Information:
This error means that there was a problem while processing the request. The request was received by the Web server, but during processing a fatal error occurred, causing the 500 error.
View more information »
Microsoft Knowledge Base Articles:
294807
Ok, I have found the solution after a day of research. In my case the error was the PHP Support. I changed the PHP support in Plesk from Fast CGI to CGI then boom. It worked. Hope it will help you some how.

IIS ASP.NET 1.1 Application - Server Error Page - Abstraction from User

Currently our application gets the following error page.
Server Error in '/' Application
This even in case of a custom errors set to RemoteOnly.
What is the HTTP Error Code of this error? This because, we can add it under Custom Errors on InetMgr and set it to a Custom Error Page.
Server errors get raised as 500's usually (Internal Server Error).

Resources