Checked forum some days for the solution and please excuse if duplicate question was raised before.
Our development using NOP4.0, and deployed to Azure App Services with 2 instances. But the application only able to start in first instance and second instance start failed with "An error occurred while starting the application".
Added some logs on applications start, found the plugin dll is deny to access. Anyone encounter similar problem and how to fix.
2018-08-27 10:31:40,033 [1] DEBUG App Ex:System.Exception: Plugin 'Api plugin'. Access to the path 'D:\home\site\wwwroot\Plugins\bin\Nop.Plugin.Api.dll' is denied.
Access to the path 'D:\home\site\wwwroot\Plugins\bin\Nop.Plugin.Api.dll' is denied.
---> System.Exception: Plugin 'Api plugin'. Access to the path 'D:\home\site\wwwroot\Plugins\bin\Nop.Plugin.Api.dll' is denied. ---> System.UnauthorizedAccessException: Access to the path 'D:\home\site\wwwroot\Plugins\bin\Nop.Plugin.Api.dll' is denied.
Already applied fix #2795, but problem still exist.
https://github.com/nopSolutions/nopCommerce/commit/be6ad5f5af125478a2a0a49afdcfef28eaf7ee6f