IIS status code reflects the request processing result, 2xx indicates success, such as 200 (OK), 201 (Created), 204 (No Content); 3xx indicates redirection, such as 301 (Moved Permanently), 302 (Moved Temporarily), 304 (Not Modified), 307 (Temporary Redirect); 4xx indicates client error, such as 400 (Bad Request), 401 (Unauthorized), 403 (Forbidden), 404 (Not Found), 405 (Method Not Allowed), 410 (Gone); 5xx indicates server error, such as 500 (Internal Server Error), 501 (Not Implemented), 502 (Bad Gateway), 503 (Service Unavailable), 504 (Gateway Timeout); you can view it through the sc-status field in the IIS log, or you can use the log analysis tool to further troubleshoot problems.
IIS (Internet Information Services) uses various status codes to indicate the server's response to client requests. These status codes are part of the HTTP standard, and IIS returns them when processing requests to help developers and administrators understand whether the request is successful, whether further operations are required, or what problems arise.

Here are some common sc-status (HTTP status) codes and their meanings, suitable for IIS logs and responses:
2xx series: Request successful
These status codes indicate that the client's request has been successfully received, understood and processed by the server.

200 OK
The most common success status code indicates that the request has been successfully completed. For example, when accessing an existing web page, it usually returns 200.-
201 Created
Indicates that the request was successful and a new resource was created, usually used after a POST request. 204 No Content
The request is successful, but no content is returned in the response, and is often used in API requests.
3xx series: redirection
This type of status code means that the client needs to take further actions to complete the request.
301 Moved Permanently
Indicates that the requested resource has been permanently moved to the new location and the browser or client should update the bookmark.302 Found (Moved Temporarily)
The resource is temporarily moved to another URI, but will be changed back in the future.304 Not Modified
Used for caching mechanism, indicating that the content cached by the client is still valid and does not need to be re-downloaded.307 Temporary Redirect
Similar to 302, but it requires that the original HTTP method (such as POST) be maintained when redirecting the request.
4xx series: Client error
This type of status code indicates that the client may have sent an incorrect request.
400 Bad Request
Indicates that the server cannot understand the client's request, usually due to a malformed request.401 Unauthorized
Requests require user authentication, which is commonly found in protected resources.403 Forbidden
The server understands the request, but refuses to execute. For example, access directories or files without permissions.404 Not Found
The requested resource does not exist. This is one of the most common and easiest to identify errors.405 Method Not Allowed
Request methods (such as POST, GET) are not allowed, for example, sending POST requests to pages that only GET is allowed.410 Gone
The requested resource has been permanently deleted and the server knows this.
5xx series: Internal server error
These status codes indicate that an error occurred during the server processing the request.
500 Internal Server Error
The most common server error indicates that IIS encountered an unexpected situation while processing the request.501 Not Implemented
The server does not support requested features, such as certain HTTP methods.502 Bad Gateway
This error occurs when IIS acts as a reverse proxy if the backend server returns an invalid response.503 Service Unavailable
Indicates that the server is temporarily unable to process the request, usually due to overload or maintenance.504 Gateway Timeout
Returns when the proxy server waits for the backend server to respond to a timeout.
How to view status codes in IIS?
If you are viewing an IIS log file (such as W3C log format), the status code usually appears in the sc-status
field. For example:
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status ... 2025-04-05 10:12:34 192.168.1.10 GET /index.html - 80 - 192.168.1.20 Mozilla/5.0 200
You can also analyze these status codes by customizing the error page or using log analysis tools such as LogParser, ELK, Splunk.
Basically that's it. Different status codes reflect different problems. During troubleshooting, you can combine sc-substatus and sc-win32-status to further locate.
The above is the detailed content of What are the different sc-status codes in IIS?. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

To limit the size of client requests, the maxAllowedContentLength parameter can be modified in web.config, such as setting it to 104857600 (100MB), and synchronizing the maxRequestLength of ASP.NET at the same time; to reasonably set the connection timeout time, it can be modified through the IIS manager or appcmd.exe command, with the default of 120 seconds, and the API scenario is recommended to set it to 30-90 seconds; if the request queue is full, you can increase MaxClientConn and QueueLength, optimize application performance, and enable load balancing to relieve stress.

HighCPUusageinIISworkerprocessesistypicallycausedbyinefficientcode,poorconfiguration,orunexpectedtrafficpatterns.Todiagnosetheissue,firstidentifythespecificw3wp.exeprocessusinghighCPUviaTaskManagerorResourceMonitoranddetermineitsassociatedapplication

Strengthening IIS security requires five steps: 1. Disable unnecessary functions and services, such as WebDAV, FTP, etc.; 2. Close the default website and test pages, delete or prohibit access to useless script directories; 3. Configure request filtering rules to prevent illegal extensions, directory traversal and super long URLs, and use URLs to rewrite and hide the real path; 4. Enable HTTPS and force jumps, and set security response headers such as HSTS, X-Content-Type-Options; 5. Regularly update system patches, enable logging and use tools to analyze abnormal access behavior. Through these measures, we can effectively prevent common attack methods such as SQL injection, XSS, directory traversal, and improve the overall security of the server.

VirtualdirectoriesandapplicationsinIISdifferinindependenceandconfiguration.1.Virtualdirectoriesactasaliasestoexternalcontent,sharingtheparentsite’sapplicationpoolandconfiguration,idealfororganizingstaticfileswithoutduplication.2.Applicationsrunindepe

ToenableandcustomizedirectorybrowsinginIIS,firstinstallandenabletheDirectoryBrowsingfeatureviaServerManagerandIISManager;next,customizetheappearanceusingheaderandfooterHTMLsnippets;thenconfiguredefaultdocumentstopreventunintendeddirectorylistings;fin

Yes,youcanuseARRwithIISasareverseproxybyfollowingthesesteps:firstinstallARRandURLRewriteviaWebPlatformInstallerormanually;nextenableproxyfunctionalityinIISManagerunderARRsettings;thenconfigurereverseproxyrulestospecifywhichrequeststoforwardtobackends

When configuring dynamic compression in IIS, selecting content types reasonably can improve performance. First enable the dynamic compression module, install and configure web.config or IIS manager through the server manager. Secondly, set appropriate content types, such as HTML, CSS, JavaScript, and JSON, text content is suitable for compression, while pictures and videos are not suitable. Finally, pay attention to the impact of client compatibility and performance, monitor CPU load, client support status and small file compression effects, and adjust the configuration based on actual traffic to obtain the best benefits.

To solve the IIS application pool authentication account permission problem, first, you need to confirm the identity account used by the application pool. The default is IISAppPool{AppPoolName}, which can be viewed or modified through the IIS manager; secondly, make sure that the account has corresponding permissions to the website physical path (such as D:\MyWebSite). The operation steps are: Right-click the folder → Properties → Security → Edit → Add the corresponding account and set the read, write and other permissions; common errors such as 401.3 is due to lack of read permission, 500.19 may be due to insufficient permissions for web.config file, and failure to upload may be due to lack of write permissions; pay attention to whether the inheritance permissions are effective, the UNC path needs to be configured with a username and password, and it may be necessary to modify it after the username and password.
