Home > Web Front-end > H5 Tutorial > Sorting out error codes in web projects

Sorting out error codes in web projects

php中世界最好的语言
Release: 2018-06-04 13:34:23
Original
2584 people have browsed it

This time I will bring you the sorting of error codes in Web projects. What are the precautions for error codes in Web projects. The following is a practical case, let's take a look.
Summary
When a user attempts to access content on a server that is running Internet Information Services (IIS) through HTTP or File Transfer Protocol (FTP), IIS Returns a numeric code indicating the status of this request. This status code is recorded in the IIS log and may also be displayed in a web browser or FTP client. Status codes can indicate whether a specific request was successful and can also reveal the exact reason why the request failed.
More information
Log file location
By default, IIS places its log files in %WINDIR/ System32/Logfiles folder. Each World Wide Web (WWW) site and FTP site has a separate directory under this directory. By default, log files are created in these directories every day and named with the date (for example, exYYMMDD.log).
HTTP
1xx-Information Tips
These status codes indicate a temporary response. The client should be prepared to receive one or more 1xx responses before receiving a regular response.
100-Continue.
101-Switch protocol.
2xx-Success
This type of status code indicates that the server successfully accepted the client request.
200-OK. The client request was successful.
201-Created.
202-Accepted.
203-Non-authoritative information.
204-No content.
205-Reset content.
206-Part of the content.
3xx-Redirect
The client browser must take additional actions to fulfill the request. For example, the browser may have to request a different page on the server, or repeat the request through a proxy server.
301-Object has been permanently moved, that is, permanently redirected.
302-The object has been temporarily moved.
304-Unmodified.
307-Temporary redirection.
4xx-Client Error
An error occurred and there seems to be a problem with the client. For example, the client requests a page that does not exist, and the client does not provide valid authentication information. 400 - Bad request.
401-Access Denied. IIS defines many different 401 errors, which indicate more specific error causes. These specific error codes show up in the browser, but not in the IIS logs:
401.1 - Login failed.
401.2-Server configuration caused login failure.
401.3-Authorization not obtained due to ACL restrictions on resources.
401.4 - Filter authorization failed.
401.5-ISAPI/CGI application authorization failed.
401.7 – Access is denied by the URL authorization policy on the web server. This error code is specific to IIS6.0.
403-Access Forbidden: IIS defines a number of different 403 errors, which indicate more specific error causes:
403.1-Execution access is forbidden.
403.2-Read access is prohibited.
403.3-Write access is prohibited.
403.4-Require SSL.
403.5-Requires SSL128.
403.6-IP address rejected.
403.7 - Client certificate required.
403.8-Site access denied.
403.9-Too many users.
403.10-Invalid configuration.
403.11-Password change.
403.12-Access to the mapping table is denied.
403.13-The client certificate was revoked.
403.14-Directory listing denied.
403.15-Client access permission exceeded.
403.16 - The client certificate is not trusted or invalid.
403.17-The client certificate has expired or is not yet valid.
403.18 - The requested URL cannot be executed in the current application pool. This error code is specific to IIS6.0.
403.19 - CGI cannot be executed for clients in this application pool. This error code is specific to IIS6.0.
403.20-Passport login failed. This error code is specific to IIS6.0.
404-Not found.
404.0-(None) – File or directory not found.
404.1 - The web site cannot be accessed on the requested port.
404.2-Web service extension locking policy blocks this request.
404.3-MIME mapping policy blocks this request.
405-The HTTP verb used to access this page is not allowed (method not allowed)
406-The client browser does not accept the MIME of the requested page type.
407 - Proxy authentication required.
412-Precondition failed.
413 – The request entity is too large.
414-The request URI is too long.
415 – Unsupported media type.
416 – The requested range cannot be satisfied.
417 – Execution failed.
423 – Locking error.
5xx-Server Error
The server cannot complete the request because it encountered an error.
500-Internal server error.
500.12 - The application is busy restarting on the web server.
500.13-The web server is too busy.
500.15-Direct request to Global.asa is not allowed.
500.16 – Incorrect UNC authorization credentials. This error code is specific to IIS6.0.
500.18–URL authorization store cannot be opened. This error code is specific to IIS6.0.
500.100-Internal ASP error.
501 - Header value specifies an unimplemented configuration.
502-The web server received an invalid response while acting as a gateway or proxy server.
502.1-CGI application timed out.
502.2-CGI application error. application.
503-Service is unavailable. This error code is specific to IIS6.0.
504-Gateway timeout.
505-HTTP version is not supported.
FTP
1xx - Positive initial reply
These status codes indicate that an operation has started successfully, but the client expects to Get another reply before proceeding with a new command.
110Restart mark reply.
120 Service is ready and will start in nnn minutes.
125 The data connection has been opened and the transmission is starting.
150 The file status is normal and the data connection is ready to be opened.
2xx-Positive completion reply
An operation has been completed successfully. Clients can execute new commands. 200 command OK.
202 The command was not executed. There are too many commands on the site.
211 system status, or system help reply.
212 Directory status.
213File status.
214Help message.
215NAME system type, where NAME is the official system name listed in the AssignedNumbers document.
220 The service is ready and can execute the new user's request.
221 Service closes the control connection. If appropriate, log out.
225 Data connection open, no transfer in progress.
226Close the data connection. The requested file operation was successful (for example, transferring the file or discarding the file).
227 Enter passive mode (h1, h2, h3, h4, p1, p2).
230 The user has logged in, continue.
250 The requested file operation is correct and completed.
257 "PATHNAME" has been created.
3xx - Positive Intermediate Reply
The command was successful, but the server needs more information from the client to complete processing the request. 331 The username is correct and a password is required.
332An account login is required.
350 The requested file operation is waiting for further information.
4xx-Transient Negative Completion Reply
The command was unsuccessful, but the error is temporary. If the client retries the command, it may succeed. 421 Service Unavailable, closing the control connection. This response will be sent to any command if the service determines that it must shut down.
425 Unable to open data connection.
426Connectionclosed;transferaborted.
450 The requested file operation was not performed. The file is unavailable (for example, the file is busy).
451 The requested operation terminated abnormally: A local error is being processed.
452 The requested operation was not performed. There is not enough system storage space.
5xx-Permanent negative completion reply
The command was unsuccessful and the error is permanent. If the client retries the command, the same error will appear again. 500Syntax error, the command cannot be recognized. This may include errors such as the command line being too long.
501 There is a syntax error in the parameter.
502 The command was not executed.
503 Wrong command sequence.
504 The command with this parameter was not executed.
530 Not logged in.
532An account is required to store files.
550 The requested operation was not performed. The file is not available (e.g., file not found, no access rights).
551 The requested operation terminated abnormally: Unknown page type.
552 The requested file operation terminated abnormally: Storage allocation exceeded (for the current directory or dataset).
553 The requested operation was not performed. Filename not allowed.
Common FTP status codes and their causes
150-FTP uses two ports: 21 for sending commands and 20 for sending data. Status code 150 means that the server is preparing to open a new connection on port 20 to send some data.
226 - Command opens a data connection on port 20 to perform operations such as transferring files. The operation completed successfully and the data connection was closed.
230-This status code is displayed after the client sends the correct password. It means the user has logged in successfully.
331-This status code is displayed after the client sends the user name. This status code will be displayed regardless of whether the username provided is a valid account on the system.
426 - A command opened a data connection to perform an operation, but the operation was canceled and the data connection was closed.
530 - This status code indicates that the user cannot log in because the username and password combination is invalid. If you are logging in with a user account, you may have typed the wrong username or password, or you may have selected to allow only anonymous access. If you log in using an anonymous account, IIS may be configured to deny anonymous access.
550-The command was not executed because the specified file is not available. For example, the file you want to GET does not exist, or you are trying to PUT the file to a directory that you do not have write permissions for. ​​​​​

I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the php Chinese website!

Recommended reading:

JQuery $() usage summary

REM relative unit usage case sharing

The above is the detailed content of Sorting out error codes in web projects. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template