Today the problem occur again on my site (using Azure app). Here is the stdout log :
Application startup exception: System.Exception: Plugin 'Seven Spikes Core'. Could not load file or assembly 'SevenSpikes.Nop.Plugins.Core.dll' or one of its dependencies. Access is denied.
Could not load file or assembly 'SevenSpikes.Nop.Plugins.Core.dll' or one of its dependencies. Access is denied.
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
---> System.Exception: Plugin 'Seven Spikes Core'. Could not load file or assembly 'SevenSpikes.Nop.Plugins.Core.dll' or one of its dependencies. Access is denied. ---> System.IO.FileLoadException: Could not load file or assembly 'SevenSpikes.Nop.Plugins.Core.dll' or one of its dependencies. Access is denied. ---> System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
--- End of inner exception stack trace ---
at System.Reflection.AssemblyName.nGetFileInformation(String s)
at System.Reflection.AssemblyName.GetAssemblyName(String assemblyFile)
at Nop.Core.Plugins.PluginManager.PerformFileDeploy(FileInfo plug, ApplicationPartManager applicationPartManager, NopConfig config) in D:\projects\Main_Repository\shop\shop_heykorean\Libraries\Nop.Core\Plugins\PluginManager.cs:line 201
at Nop.Core.Plugins.PluginManager.Initialize(ApplicationPartManager applicationPartManager, NopConfig config) in D:\projects\Main_Repository\shop\shop_heykorean\Libraries\Nop.Core\Plugins\PluginManager.cs:line 417
--- End of inner exception stack trace ---
at Nop.Core.Plugins.PluginManager.Initialize(ApplicationPartManager applicationPartManager, NopConfig config) in D:\projects\Main_Repository\shop\shop_heykorean\Libraries\Nop.Core\Plugins\PluginManager.cs:line 453
--- End of inner exception stack trace ---
at Nop.Core.Plugins.PluginManager.Initialize(ApplicationPartManager applicationPartManager, NopConfig config) in D:\projects\Main_Repository\shop\shop_heykorean\Libraries\Nop.Core\Plugins\PluginManager.cs:line 464
at Nop.Core.Infrastructure.NopEngine.Initialize(IServiceCollection services) in D:\projects\Main_Repository\shop\shop_heykorean\Libraries\Nop.Core\Infrastructure\NopEngine.cs:line 154
at Nop.Web.Framework.Infrastructure.Extensions.ServiceCollectionExtensions.ConfigureApplicationServices(IServiceCollection services, IConfigurationRoot configuration) in D:\projects\Main_Repository\shop\shop_heykorean\Presentation\Nop.Web.Framework\Infrastructure\Extensions\ServiceCollectionExtensions.cs:line 49
at Nop.Web.Startup.ConfigureServices(IServiceCollection services) in D:\projects\Main_Repository\shop\shop_heykorean\Presentation\Nop.Web\Startup.cs:line 44
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.ConfigureServices(IServiceCollection services)
at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureApplicationServices()
at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
crit: Microsoft.AspNetCore.Hosting.Internal.WebHost[6]
Application startup exception
System.Exception: Plugin 'Seven Spikes Core'. Could not load file or assembly 'SevenSpikes.Nop.Plugins.Core.dll' or one of its dependencies. Access is denied.
Could not load file or assembly 'SevenSpikes.Nop.Plugins.Core.dll' or one of its dependencies. Access is denied.
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
---> System.Exception: Plugin 'Seven Spikes Core'. Could not load file or assembly 'SevenSpikes.Nop.Plugins.Core.dll' or one of its dependencies. Access is denied. ---> System.IO.FileLoadException: Could not load file or assembly 'SevenSpikes.Nop.Plugins.Core.dll' or one of its dependencies. Access is denied. ---> System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
--- End of inner exception stack trace ---
at System.Reflection.AssemblyName.nGetFileInformation(String s)
at System.Reflection.AssemblyName.GetAssemblyName(String assemblyFile)
at Nop.Core.Plugins.PluginManager.PerformFileDeploy(FileInfo plug, ApplicationPartManager applicationPartManager, NopConfig config) in D:\projects\Main_Repository\shop\shop_heykorean\Libraries\Nop.Core\Plugins\PluginManager.cs:line 201
at Nop.Core.Plugins.PluginManager.Initialize(ApplicationPartManager applicationPartManager, NopConfig config) in D:\projects\Main_Repository\shop\shop_heykorean\Libraries\Nop.Core\Plugins\PluginManager.cs:line 417
--- End of inner exception stack trace ---
at Nop.Core.Plugins.PluginManager.Initialize(ApplicationPartManager applicationPartManager, NopConfig config) in D:\projects\Main_Repository\shop\shop_heykorean\Libraries\Nop.Core\Plugins\PluginManager.cs:line 453
--- End of inner exception stack trace ---
at Nop.Core.Plugins.PluginManager.Initialize(ApplicationPartManager applicationPartManager, NopConfig config) in D:\projects\Main_Repository\shop\shop_heykorean\Libraries\Nop.Core\Plugins\PluginManager.cs:line 464
at Nop.Core.Infrastructure.NopEngine.Initialize(IServiceCollection services) in D:\projects\Main_Repository\shop\shop_heykorean\Libraries\Nop.Core\Infrastructure\NopEngine.cs:line 154
at Nop.Web.Framework.Infrastructure.Extensions.ServiceCollectionExtensions.ConfigureApplicationServices(IServiceCollection services, IConfigurationRoot configuration) in D:\projects\Main_Repository\shop\shop_heykorean\Presentation\Nop.Web.Framework\Infrastructure\Extensions\ServiceCollectionExtensions.cs:line 49
at Nop.Web.Startup.ConfigureServices(IServiceCollection services) in D:\projects\Main_Repository\shop\shop_heykorean\Presentation\Nop.Web\Startup.cs:line 44
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.ConfigureServices(IServiceCollection services)
at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureApplicationServices()
at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
Hosting environment: Production
critContent root path: D:\home\site\wwwroot
: Microsoft.AspNetCore.Hosting.Internal.WebHost[11]
Hosting startup assembly exception
System.InvalidOperationException: Startup assembly Microsoft.AspNetCore.AzureAppServices.HostingStartup failed to execute. See the inner exception for more details. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.AspNetCore.AzureAppServices.HostingStartup' or one of its dependencies. The system cannot find the file specified.
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
at Microsoft.AspNetCore.Hosting.WebHostBuilder.BuildCommonServices(AggregateException& hostingStartupErrors)
--- End of inner exception stack trace ---
Hello Andrei,
could you please look at this and suggest me some temporary solution for now ? Can I copy the plugin dll files manually to /Plugins/bin and disable shadow copy in PluginManager ?