How to publish nopCommerce 4.10 to Win Server 2016?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 years ago
I've downloaded the NopCommerce 4.10 source code, rebuilt with VS Studio Community 2017, everything is fine. I can start and run the website on my local machine. Perfect.

Then I installed a brand new Win Server 2016 (Evaluation copy), installed the .Net Core 2.13 Web Hosting Bundle, and configured an IIS Server. IIS Server started and I can saw that default iisstart image in http://localhost. Great.

Now I select Nop.Web in Solution Explorer, right click, "Publish", choose file system (I shared the WinServer2016  wwwroot folder to my dev PC as "O:\" drive), and go, files start to copy. After a while, it says "Web App was published successfully file://O:/". Excellent!

But when I tried to browse the website, it gave me this:



Any idea what I did wrong here? I didn't make any change to the source code. It is supposed to be "Drop-N-Run", correct?
5 years ago
Hello,

please set stdoutLogEnabled="true"  at web config.

After stop/start and go log folder at application root path.

There you can find exact error.

Hope you will understand.
5 years ago
Thanks! I changed the stdoutLogEnabled="true", also see that stdoutLogFile=".\Logs\stdout", verified file directory "C:\inetpub\wwwroot\Logs\stdout" exists, and empty.

Then I stop and restarted the IIS Server, hit the http://localhost again. Went back to check the directory, it is still empty...

Strange
5 years ago
Hello,

Did you provide read and write permission to whole application folder?
5 years ago
Stupid stupid me. Yes that was it. Grant "Write" permission now I got the log file.

Let's see what's inside the log file:

Application startup exception: System.Exception: Plugin 'Must be assigned to customer role'. Access to the path 'C:\inetpub\wwwroot\Plugins\bin\Nop.Plugin.DiscountRules.CustomerRoles.dll' is denied.
Access to the path 'C:\inetpub\wwwroot\Plugins\bin\Nop.Plugin.DiscountRules.CustomerRoles.dll' is denied.
---> System.Exception: Plugin 'Must be assigned to customer role'. Access to the path 'C:\inetpub\wwwroot\Plugins\bin\Nop.Plugin.DiscountRules.CustomerRoles.dll' is denied. ---> System.UnauthorizedAccessException: Access to the path 'C:\inetpub\wwwroot\Plugins\bin\Nop.Plugin.DiscountRules.CustomerRoles.dll' is denied.
   at System.IO.FileSystem.CopyFile(String sourceFullPath, String destFullPath, Boolean overwrite)
   at System.IO.File.Copy(String sourceFileName, String destFileName, Boolean overwrite)
   at Nop.Core.Plugins.PluginManager.ShadowCopyFile(String pluginFilePath, String shadowCopyPlugFolder) in C:\Projects\NopCommerce_410\Libraries\Nop.Core\Plugins\PluginManager.cs:line 307
   at Nop.Core.Plugins.PluginManager.PerformFileDeploy(String plug, ApplicationPartManager applicationPartManager, NopConfig config, String shadowCopyPath) in C:\Projects\NopCommerce_410\Libraries\Nop.Core\Plugins\PluginManager.cs:line 214
   at Nop.Core.Plugins.PluginManager.Initialize(ApplicationPartManager applicationPartManager, NopConfig config) in C:\Projects\NopCommerce_410\Libraries\Nop.Core\Plugins\PluginManager.cs:line 479
   --- End of inner exception stack trace ---
   at Nop.Core.Plugins.PluginManager.Initialize(ApplicationPartManager applicationPartManager, NopConfig config) in C:\Projects\NopCommerce_410\Libraries\Nop.Core\Plugins\PluginManager.cs:line 515
   --- End of inner exception stack trace ---
   at Nop.Core.Plugins.PluginManager.Initialize(ApplicationPartManager applicationPartManager, NopConfig config) in C:\Projects\NopCommerce_410\Libraries\Nop.Core\Plugins\PluginManager.cs:line 526
   at Nop.Web.Framework.Infrastructure.Extensions.ServiceCollectionExtensions.ConfigureApplicationServices(IServiceCollection services, IConfiguration configuration) in C:\Projects\NopCommerce_410\Presentation\Nop.Web.Framework\Infrastructure\Extensions\ServiceCollectionExtensions.cs:line 58
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.ConfigureServices(IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureApplicationServices()
   at Microsoft.AspNetCore.Hosting.Internal.WebHost.Initialize()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
crit: Microsoft.AspNetCore.Hosting.Internal.WebHost[6]
      Application startup exception


It seems that it's a permission issue, IIS_IUSERS doesn't have permission to the published folder?

Take a look at the folder -> Property -> Security, the "Read&Excecute" is kind-of checked, it's more like grey-out.



Or should I also grant "Full Control" "Write" permission to it?

Really appreciate your advice!
5 years ago
Hello,

You should give Grant read/write(full control) permission to wwwroot folder.

Stop/start once.
5 years ago
There we go! Now the nopCommerce installation page come up!

Thank you so much for the help! Really appreciate it!
5 years ago
Hello,

Enjoy with 4.1 and your welcome..!!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.