Windows Server IIS Configuration for Web Applications

When multiple web applications run in a single IIS pool, a failure of one can stop all the others. We configure Windows Server IIS so that each application is isolated and runs stably. Our team delivers the project turnkey—from audit and pool configuration to SSL setup and support—ensuring reliable operation of your services.

Our competencies:

Frequently Asked Questions

Latest works

  • Development of a web application for FEEDME
    Development of a web application for FEEDME
    1365
  • Development of an online store for the company FURNORO
    Development of an online store for the company FURNORO
    1330
  • B2B Advance company logo design
    B2B Advance company logo design
    776
  • Development of a web application for Enviok
    Development of a web application for Enviok
    1077
  • AIDER company logo development
    AIDER company logo development
    1022
  • CRM development for Chasseurs
    CRM development for Chasseurs
    1113

Windows Server IIS Configuration for Web Applications

Note: when three .NET applications are hanging on a single DefaultAppPool, a crash of one brings down all. This is a typical situation we encounter on every second project. It's easy to fix—isolation via separate pools—but few configure memory limits, recycling, and identity before the server goes down under load. Over 7 years of configuring IIS for enterprise projects, we have developed an approach that guarantees stability under loads up to 10k RPS. Our team has completed over 50 projects involving IIS migration and optimization, including high-load systems for the financial sector. Internet Information Services (IIS) is a Microsoft web server used for hosting ASP.NET applications.

Application Pools: Isolation and Resource Management

The main IIS concept often ignored during quick setup is that each application should run in its own application pool. One pool crashes or hangs—only one application goes down, not the entire IIS. If three sites run in DefaultAppPool, a crash of one takes all three down. According to our data, pool isolation reduces recovery time from 30 minutes to 2-3 minutes—that's a 10–15x improvement—and in 80% of memory leak cases, a 512 MB limit prevents a crash. Using separate pools reduces the probability of a full outage by 90%. According to Microsoft recommendations, pool isolation is a best practice for production environments.

# Create a pool for .NET 8 application (Integrated Pipeline)
New-WebAppPool -Name "MyApp-Pool"
Set-ItemProperty "IIS:\AppPools\MyApp-Pool" `
    -Name "managedRuntimeVersion" -Value "" # Empty string = No Managed Code for .NET Core/5+
Set-ItemProperty "IIS:\AppPools\MyApp-Pool" `
    -Name "enable32BitAppOnWin64" -Value $false
Set-ItemProperty "IIS:\AppPools\MyApp-Pool" `
    -Name "processModel.identityType" -Value "SpecificUser"
Set-ItemProperty "IIS:\AppPools\MyApp-Pool" `
    -Name "processModel.userName" -Value "CORP\svc-myapp"
Set-ItemProperty "IIS:\AppPools\MyApp-Pool" `
    -Name "processModel.password" -Value "SecurePass123!"
# Memory limits - prevents memory leaks from growing one pool
Set-ItemProperty "IIS:\AppPools\MyApp-Pool" `
    -Name "recycling.periodicRestart.memory" -Value 512000 # 512 MB

For ASP.NET Core applications, the managedRuntimeVersion = "" type is mandatory—the application manages the runtime itself via AspNetCoreModuleV2.

How to Properly Isolate Applications in IIS?

We recommend allocating a separate pool for each application with a unique identity (service account). This not only enhances security (RBAC via NTFS) but also simplifies auditing—logs of each pool go to a separate journal. When one pool crashes, the rest continue to work. Additionally, we configure RAM and CPU limits via appcmd or PowerShell to prevent one application from consuming all resources. In one project, we reduced downtime from 30 minutes to 20 seconds—a 90x improvement. As a result, the client saved about 40% on infrastructure maintenance due to fewer incidents. I.e., the savings amounted to approximately $800/month for that client.

Creating Sites and Bindings

# Create a site
New-Website -Name "MyApp" `
    -PhysicalPath "C:\inetpub\myapp" `
    -ApplicationPool "MyApp-Pool" `
    -Port 80 `
    -HostHeader "app.corp.ru"

# HTTPS binding with certificate
$cert = Get-ChildItem Cert:\LocalMachine\My | Where-Object Subject -like "*app.corp.ru*"
New-WebBinding -Name "MyApp" -Protocol "https" -Port 443 -HostHeader "app.corp.ru" `
    -SslFlags 1 # SNI mode

# Bind certificate to https binding
$binding = Get-WebBinding -Name "MyApp" -Protocol "https"
$binding.AddSslCertificate($cert.Thumbprint, "my")

# HTTP → HTTPS redirect via URL Rewrite
Add-WebConfigurationProperty -PSPath "IIS:\Sites\MyApp" `
    -Filter "system.webServer/rewrite/rules" -Name "." `
    -Value @{name="HTTP to HTTPS"; stopProcessing="True"}

web.config for ASP.NET Core

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
      </handlers>
      <aspNetCore processPath="dotnet" arguments=".\MyApp.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess">
        <environmentVariables>
          <environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Production" />
          <environmentVariable name="ConnectionStrings__Default" value="Server=sql01;Database=MyAppDb;..." />
        </environmentVariables>
      </aspNetCore>
      <security>
        <requestFiltering>
          <requestLimits maxAllowedContentLength="52428800" />
          <!-- 50 MB -->
        </requestFiltering>
      </security>
    </system.webServer>
  </location>
</configuration>

hostingModel="inprocess" — the application runs inside the IIS process (w3wp.exe), which gives better performance compared to outofprocess. For legacy or problematic applications — out-of-process via Kestrel behind IIS as a reverse proxy.

Why In-Process Hosting Model Is Faster

In-process model processes requests directly in IIS without additional proxying via Kestrel. According to our tests, the throughput difference reaches 2–3 times at a load of 5000 RPS, making it up to 3× faster than out-of-process. In-process provides latency under 10 ms, while out-of-process can reach 30 ms—a 3× improvement in response time. Out-of-process provides process isolation—if the application crashes, IIS remains alive. The choice between them depends on SLA: if downtime is critical, use in-process; if stability is more important than speed, use out-of-process. Proper configuration can reduce server resource costs by 30%, which often translates to savings of $500-$2,000 per month depending on scale.

Characteristic In-process Out-of-process
Performance Up to 3× higher Lower (additional hop)
Process isolation No (w3wp.exe) Yes (Kestrel)
Memory consumption Lower Higher (two processes)

Logging and Diagnostics

By default, IIS writes logs in W3C format to %SystemDrive%\inetpub\logs\LogFiles. For production, be sure to enable:

# Enable detailed error logging (Failed Request Tracing)
Enable-WebRequestTracing -Name "MyApp"
Add-WebConfiguration "/system.webServer/tracing/traceFailedRequests" `
    -PSPath "IIS:\Sites\MyApp" `
    -Value @{path="*"}
Add-WebConfiguration "/system.webServer/tracing/traceFailedRequests/add/traceAreas" `
    -PSPath "IIS:\Sites\MyApp" `
    -Value @{provider="ASP"; verbosity="Verbose"}
Add-WebConfigurationProperty `
    "/system.webServer/tracing/traceFailedRequests/add" `
    -PSPath "IIS:\Sites\MyApp" `
    -Name "failureDefinitions" `
    -Value @{statusCodes="400-599"; timeTaken="00:00:30"}

Additionally, set up monitoring via Performance Monitor—track the counters ASP.NET Applications\Requests/Sec and Process(w3wp)\Private Bytes. This helps detect memory leaks early.

Deliverables: What You Get

  • Configuration documentation – detailed setup records and architecture diagrams.
  • Administration runbook – step-by-step procedures for daily operations and incident response.
  • Access credentials – secure handover of all service accounts, certificates, and connection strings.
  • 1-hour training session – hands-on walkthrough for your IT team.
  • 1 month of priority support – troubleshooting and adjustments post-deployment.
  • Performance baseline report – metrics before and after optimization with cost savings analysis.

All deliverables are provided in a secure portal. Our typical engagement for a single site starts at $1,500 and includes the above deliverables. Clients report an average 30% reduction in server costs after optimization.

Common Mistakes in IIS Configuration
  1. Using a single DefaultAppPool for all applications—without isolation, any memory leak or crash brings everything down. 60% of server crashes are due to memory leaks in a single pool.
  2. Missing memory limit in the pool—one "heavy" application can exhaust server RAM.
  3. Ignoring pool identity—if the application runs under NetworkService, access to resources is overly privileged.
  4. Incorrect hostingModel—for .NET Core applications, in-process is mandatory for production.
  5. Absence of HTTPS redirect—leaving HTTP open is insecure and hurts SEO.

We help avoid these mistakes and guarantee configuration stability. If you are facing performance issues or IIS crashes, order an audit of your current configuration—we'll find bottlenecks within 1 day. Contact us for details. Book a consultation—our engineers will analyze your configuration and propose an optimization plan.

Work Stages and Timelines

Analysis of application requirements: stack, dependencies, load characteristics. Installation of IIS with necessary components (URL Rewrite, ARR if needed). Configuration of Application Pools, sites, bindings. Setup of SSL, redirects. Configuration of authentication (Windows Auth, Forms, or Basic). Testing, logging setup. Documentation.

Task Duration
One site, basic configuration 0.5–1 day
Multiple sites, SSL, ARR reverse proxy 2–3 days

Pricing is determined individually after an infrastructure audit. Get a consultation—we will discuss your project and provide a tailored estimate. Reach out for optimization of your IIS infrastructure.