Skip to content

IIS Deployment

Deploy nopCommerce to Windows Server with IIS.

Prerequisites

  1. Windows Server 2019 or later
  2. IIS installed with required features
  3. .NET 8.0 Hosting Bundle installed
  4. SQL Server accessible

Step 1: Install IIS Features

powershell
# Run in PowerShell as Administrator
Install-WindowsFeature -Name Web-Server -IncludeManagementTools
Install-WindowsFeature -Name Web-Asp-Net45
Install-WindowsFeature -Name Web-Net-Ext45
Install-WindowsFeature -Name Web-ISAPI-Ext
Install-WindowsFeature -Name Web-ISAPI-Filter
Install-WindowsFeature -Name Web-Http-Redirect
Install-WindowsFeature -Name Web-Dyn-Compression

Step 2: Install .NET Hosting Bundle

Download from: https://dotnet.microsoft.com/download/dotnet/8.0

Restart IIS

After installing the hosting bundle, restart IIS:

iisreset

Step 3: Prepare Application Files

  1. Publish nopCommerce:
bash
dotnet publish src/Presentation/Nop.Web -c Release -o ./publish
  1. Copy to server (e.g., C:\inetpub\wwwroot\nopCommerce)

  2. Set folder permissions:

powershell
icacls "C:\inetpub\wwwroot\nopCommerce" /grant "IIS_IUSRS:(OI)(CI)M"

Step 4: Create IIS Site

  1. Open IIS Manager
  2. Right-click SitesAdd Website
  3. Configure:
    • Site name: nopCommerce
    • Physical path: C:\inetpub\wwwroot\nopCommerce
    • Binding: Host name, Port 443, SSL certificate

Step 5: Configure Application Pool

  1. Select the Application Pool
  2. Set:
    • .NET CLR Version: No Managed Code
    • Managed Pipeline Mode: Integrated
    • Start Mode: AlwaysRunning (optional)

Step 6: Configure web.config

xml
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.webServer>
    <handlers>
      <add name="aspNetCore" path="*" verb="*" 
           modules="AspNetCoreModuleV2" resourceType="Unspecified" />
    </handlers>
    <aspNetCore processPath="dotnet" 
                arguments=".\Nop.Web.dll" 
                stdoutLogEnabled="false" 
                hostingModel="InProcess" />
  </system.webServer>
</configuration>

Troubleshooting

500.19 Error

  • Check file permissions
  • Verify .NET Hosting Bundle installed

502.5 Error

  • Check stdoutLogEnabled="true" in web.config
  • Review logs in .\logs\ folder

Database Connection Failed

  • Verify SQL Server is accessible
  • Check connection string in App_Data\dataSettings.json

Released under the nopCommerce Public License.