Introduction
Many Indian enterprises still host on Windows Server + IIS. ShopNest internal admin apps deploy behind IIS using the ASP.NET Core Module — not in-process IIS .NET Framework.
After this article you will
- Publish ShopNest from CLI and Visual Studio
- Configure IIS app pool and site
- Fix 500.30 and 502.5 startup errors
- Set environment variables in IIS
- Automate with Web Deploy
Prerequisites
- Article 58 — Test-Driven Development
- ShopNest solution builds and tests pass locally
Concept deep-dive
dotnet publish ShopNest.Web -c Release -o ./publish
# IIS prerequisites:
# - Hosting Bundle (ASP.NET Core Runtime + Module)
# - App Pool: No Managed Code, Integrated pipeline
<!-- web.config generated on publish -->
<aspNetCore processPath="dotnet" arguments=".ShopNest.Web.dll"
stdoutLogEnabled="true" stdoutLogFile=".logsstdout"
hostingModel="inprocess">
<environmentVariables>
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Production" />
</environmentVariables>
</aspNetCore>
502.5: app failed to start — check Event Viewer, enable stdout logs, verify Hosting Bundle installed. 500.30: startup exception — wrong connection string or missing DLL.
Hands-on — ShopNest Corporate Internal Application
- Publish Release folder to server path.
- Create IIS site pointing to publish folder.
- Install Hosting Bundle; restart IIS.
- URL Rewrite for HTTP→HTTPS.
- Web Deploy profile from Visual Studio for updates.
Common errors & best practices
- App pool .NET CLR v4 — must be No Managed Code.
- 32-bit app pool on 64-bit publish — mismatch.
- Permissions on logs folder for stdout.
Interview questions
Q: Why No Managed Code?
A: ASP.NET Core runs out-of-process/in-process via Kestrel + Module, not IIS CLR.
Q: web.config role?
A: Tells IIS how to launch dotnet and set env vars.
Summary
- Install Hosting Bundle before deploy
- App pool No Managed Code + Integrated
- stdout logs diagnose startup failures
- Web Deploy automates corporate updates
Previous: Test-Driven Development
Next: Docker and Containerization
FAQ
Multiple sites?
Separate app pools per site; shared Hosting Bundle OK.
In-process vs out-of-process?
In-process faster on Windows; out-of-process more isolation.