• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue Configuration to host ASP.NET Core 3.1 website on Plesk (Windows / IIS)

wst

New Pleskian
Hi,

I'm having troubles migrating an existing asp.net core 3.1 website with SQL Server database to a Windows server with Plesk. (sqlexpress and iis are enabled).


Microsoft .NET Core 3.1.11 - Windows Server Hosting bundle is installed.
Microsoft .NET Core Runtime - 3.1.11 (x64 && x86) are installed.

I created a new website in Plesk for my domain.

I've added the database in SQL Server and registered the database in Plesk ( How to register an existing database in Plesk )

In IIS I've set the application pool to No Managed Code.

in my httpdocs/logs folder I see my regular logging that the site seems to be started:

Code:
2021-01-19 12:45:12.187 +00:00 [INF] Application started. Press Ctrl+C to shut down.
2021-01-19 12:45:12.187 +00:00 [INF] Hosting environment: Production
2021-01-19 12:45:12.187 +00:00 [INF] Content root path: C:\Inetpub\vhosts\xxx.be\httpdocs
2021-01-19 12:45:12.212 +00:00 [INF] Request starting HTTP/1.1 GET http://xxx.be/ 
2021-01-19 12:45:12.225 +00:00 [INF] Request finished in 16.5602ms 307

I've enabled stdoutLogEnabled="true", files are created but stay empty (0KB).


I publish in VS2019 with:
Release, netcoreapp3.1, Framework-Dependent, win-x64

my webconfig has:

Code:
      <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
      </handlers>
      <aspNetCore processPath=".\xxx.exe" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" hostingModel="InProcess" />
  </system.webServer>
  <system.web>
    <compilation tempDirectory="C:\Inetpub\vhosts\xxx.be\tmp" />
  </system.web>

If I set the "App_Offline.html" file in the httpdocs directory I see the html, but I don't see my asp.net core app.

"This site can't be reached" ERR_CONNECTION_RESET in chrome


Any suggestions? is this a mismatch of InProcess vs. Framework-Dependent publishing, or something else?

I could also not find clear guided documentation on Plesk related to this.
 
Check in Plesk under Dedicated IIS Application Pool if the checkbox for "Enable 32 bit application" makes any difference.

Another thing you can try, publish with target runtime: "portable".

What error message do you get when browsing to this site?
 
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
AspNetCoreModuleV2=>AspNetCoreModule Did u try this?
 
Back
Top