Catalog / IIS Cheat Sheet
IIS Cheat Sheet
A comprehensive cheat sheet for Internet Information Services (IIS), covering essential configuration, management, and troubleshooting techniques.
Core IIS Concepts
Key Components
Application Pools |
Isolate web applications for better security and reliability. Each pool runs in its own worker process. |
Web Sites |
Host websites with unique bindings (IP address, port, hostname). |
Virtual Directories |
Map physical directories to URL paths within a website. |
Handlers |
Process specific file types (e.g., .aspx, .php). |
Modules |
Extend IIS functionality (e.g., authentication, logging). |
Bindings |
Associate a website with an IP address, port, and hostname. Supports HTTP and HTTPS. |
IIS Architecture Overview
IIS architecture consists of the following layers:
|
Important Configuration Files
|
Main configuration file located in |
|
Application-specific configuration file, placed in the root directory of a web application. |
|
Framework-level configuration, typically located in |
Management and Configuration
IIS Manager
The IIS Manager is a GUI tool for managing IIS. Common tasks include:
|
PowerShell Cmdlets
|
Lists all websites. |
|
Creates a new website. |
|
Stops a website. |
|
Gets the state of all application pools. |
|
Restarts an application pool. |
|
Import the WebAdministration module to use IIS-specific cmdlets. |
Command-Line Tools
|
Lists all websites. |
|
Creates a new website. |
|
Stops a website. |
|
Lists all application pools. |
|
Recycles an application pool. |
Security and Authentication
Authentication Methods
Anonymous Authentication |
Allows access to the website without requiring users to provide credentials. Uses the |
Basic Authentication |
Sends usernames and passwords in plain text (Base64 encoded). Should only be used over HTTPS. |
Windows Authentication |
Uses Windows credentials (NTLM or Kerberos) for authentication. |
Forms Authentication |
Uses a custom login form and stores authentication information in cookies or sessions. |
ASP.NET Impersonation |
Allows the application to run under the identity of the authenticated user. |
SSL/TLS Configuration
To configure SSL/TLS:
|
Authorization Rules
Allow Rules |
Grant access to specific users, groups, or IP addresses. |
Deny Rules |
Restrict access to specific users, groups, or IP addresses. |
URL Authorization |
Configure authorization rules for specific URLs or directories within a website. |
Troubleshooting
Common Error Codes
401.1 |
Authentication failed due to invalid credentials. |
403.14 |
Directory browsing is disabled. Enable it or specify a default document. |
404 |
Resource not found. Check the URL and physical path. |
500 |
Internal server error. Check the application event logs for details. |
503 |
Service unavailable. The application pool may be stopped or overloaded. |
Logging and Monitoring
IIS logs detailed information about requests, errors, and performance. Check the following logs:
|
Troubleshooting Steps
|