Install IIS menggunakan .Net Core
Berikut ini adalah ✅ Checklist Minimum Instalasi IIS + Pendukung ASP.NET Core 8.0 di Windows Server 2016:
✅ A. Checklist Role & Features IIS (Minimal untuk ASP.NET Core 8.0)
Saat menggunakan Add Roles and Features di Server Manager, pastikan kamu centang yang berikut:
1. Web Server (IIS)
-
✅ Web Server
-
✅ Common HTTP Features
-
✅ Static Content
-
✅ Default Document
-
✅ HTTP Errors
-
-
✅ Application Development
-
✅ (Optional) .NET Extensibility 4.6 (boleh di-skip)
-
✅ (Optional) ASP.NET 4.6 (boleh di-skip)
-
✅ ISAPI Extensions
-
✅ ISAPI Filters
-
✅ WebSocket Protocol (jika pakai SignalR/WebSocket)
-
-
✅ Health and Diagnostics
-
✅ HTTP Logging
-
✅ Request Monitor (opsional)
-
-
✅ Performance Features
-
✅ Static Content Compression (opsional tapi direkomendasikan)
-
-
✅ Security
-
✅ Request Filtering
-
✅ Windows Authentication (jika kamu pakai auth Windows)
-
-
✅ Management Tools
-
✅ IIS Management Console
-
-
2. (Opsional) .NET Framework 4.6 Features
Tidak wajib untuk ASP.NET Core 8.0. Centang hanya jika kamu juga ingin menjalankan aplikasi .NET Framework 4.x.
✅ B. Install .NET 8 Hosting Bundle
Ini WAJIB agar ASP.NET Core 8.0 bisa dijalankan melalui IIS.
-
Download dari:
https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-aspnetcore-8.00.17-windows-hosting-bundle-installerPilih:ASP.NET Core Runtime - Hosting Bundle akan download secara otomatis -
Jalankan installer sebagai Administrator
-
Setelah selesai, restart
serverserver, di cmd jalankan perintah 'iisreset' -
Verifikasi di PowerShell:
dotnet --info
✅ C. Konfigurasi IIS (Pasca Install)
-
Buat folder publish di
C:\inetpub\wwwroot\MyApp
-
Copy hasil
dotnet publish
ke sana -
Di IIS Manager:
-
Klik kanan pada Sites > Add Website
-
Isi:
-
Site name:
MyApp
-
Physical path:
C:\inetpub\wwwroot\MyApp
-
Binding: HTTP, port 5000 atau 80
-
-
-
Pastikan:
-
Application Pool pakai:
-
.NET CLR Version
: No Managed Code -
Mode: Integrated
-
-
✅ D. Web.config Minimal untuk ASP.NET Core
Contoh web.config
di folder publish:
<configuration>
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments="MyApp.dll" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
</system.webServer>
</configuration>
✅ E. Tambahan (Opsional tapi Disarankan)
Fitur | Tujuan |
---|---|
Static Content Compression | Performa |
WebSocket Protocol | Jika pakai SignalR |
Windows Authentication | Jika pakai auth intranet |
Failed Request Tracing | Debugging |