Deploy nopCommerce Asp.Net Core 2.2 in GoDaddy

Recently I was working on nopCommerce and wants to deploy in GoDaddy Plesk hosting for one of my clients. NopCommerce developed on Asp.Net Core 2.2, but GoDaddy supports only Asp.Net Core 2.0. In this article we will discuss how to deploy Asp.Net Core 2.2 application (nopCommerce here) in GoDaddy.

Asp.Net Core supports two types of deployment modes, Framework-Dependent and Self-Contained. Through Self-Contained deployment mode, we no need to install Asp.Net Core run time to run the Asp.Net Core application in server; instead Asp.Net Core runtime dll’s will be created as part of publish.

To deploy nopCommerce Asp.Net Core 2.2 application, follow below steps.

  1. Edit Nop.Web. csproj project file. Add <PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest> element to .csproj file under PropertyGroup like below.
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>           <PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>
…..
</PropertyGroup>

        Save Nop.Web.csproj file and reload the solution again.

  1. Right click on Nop.Web project and select publish. Select Deployment Mode as “Self-Contained” and Target Runtime as “win-x64”.

  1. Now publish the files to local folder. Asp.Net Core run-time dll’s also will be created by Publish option.
  2. Edit Web.config file in the publish folder. Change asp.NetCore element in the web.config file to below.
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
<aspNetCore processPath="dotnet" arguments=".\Nop.Web.dll" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" />    

Here Nop.Web.dll is the nopCommerce application dll. 

  1. Copy the published files to GoDaddy Plesk hosting though FTP or through File Manager.
  2. Provide Read/Write permissions to required folders.

By following the above steps, we can run any Asp.Net Core run-time applications in GoDaddy even though Godaddy supports only Asp.Net Core 2.0 run-time.

Add comment