An error occurred while starting the application

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 years ago
sk5202 wrote:
https://ibb.co/hKogdd

error:
An error occurred while starting the application.
.NET Framework 4.7.2650.0 X86 v4.0.0.0    |   Microsoft.AspNetCore.Hosting version 2.0.0-rtm-26452    |    Microsoft Windows 10.0.14393


Is still nopcomerence dev team ignoring this issue?

My web app is deployed on azure, last week it was working fine but now giving this error, I have tried restarting the app and re-deploying but none of them worked.


NopCommerce 4.10 beta?



I have downloaded and deployed nopCommerce 4.00 - Web (no source) (44 MB)
Please see the attached image link
https://ibb.co/dCGbdd
5 years ago
When I have more time I will do a deep dive to find out what happened.  I installed a perfectly working copy of Nop 4.0.  It ran flawlessly for a week and today I got this error.  The only way to resolve it was Stop the Azure Web App and restart it.  This is definitely a bug and doesnt have to do with permissions. Had permissions been an issue I would have had issues with it from the start.  It's also not a config issue.  I dont know if it was longging yet during the crash but if I find something I'll share.
5 years ago
I had very similar challenges when first installing nop 4.1 on a 2012 r2 machine. I have no experience nopCommerce, I am just starting to look into it but I will tell you what I have done to make it run. First, I had to not only install the Runtime 2.1 but also the SDK 2.1 just to install the application. Even though I had read that the SDK contained the Runtime, I did both. I also had earlier disabled TLS1.0 in the registry for PCI Compliance. My nopComm would not start after I was able to get it to install, so following the error message, I found that ASP.Net 4.5 supported TLS1.2 and not ASP>net 4. So I enable TLS1.0 and it started working fine. I understand I cannot deploy this to a production server because of the PCI compliance but I have not found an answer yet for the TLS1.2 issue. I am still working on that. I hope some of this may help you, I was ready say forget it it but I am not there yet.
5 years ago
I have two NOP 4.1 applications running on Azure. All working fine yesterday. Both down now with this error.

An error occurred while starting the application.
.NET Core 4.6.26919.02 X86 v4.0.0.0    |   Microsoft.AspNetCore.Hosting version 2.1.1-rtm-30846    |    Microsoft Windows 10.0.14393    |   Need help?

I am really fed up with NopCommerce at this stage.
5 years ago
sepocon wrote:
I have two NOP 4.1 applications running on Azure. All working fine yesterday. Both down now with this error.

An error occurred while starting the application.
.NET Core 4.6.26919.02 X86 v4.0.0.0    |   Microsoft.AspNetCore.Hosting version 2.1.1-rtm-30846    |    Microsoft Windows 10.0.14393    |   Need help?

I am really fed up with NopCommerce at this stage.


Hi,  I havent had time to dive into the issue since I've had some person issues to deal with but I have the same setup.  I have 2 Azure web apps.  Both were working perfect and then crash.  Both crash with the same error.  If I disable the app and turn it back on it works again.  No idea what is happening and the error is extremely vague and not helpful.  It runs for a period of time and then crash again.  No idea what is causing it.
5 years ago
May be related to topic in links below -

https://www.nopcommerce.com/boards/t/49851/serious-iis-application-pool-recycling-bugdesign-flaw.aspx?p=8#208053

https://github.com/nopSolutions/nopCommerce/commit/be6ad5f5af125478a2a0a49afdcfef28eaf7ee6f


Sorry, on further review, I see you are already on 4.1. I am on 4.0 getting the same problem on Azure. I was looking at going to 4.1 as problem referenced in links above was supposed to be fixed in 4.1.

I have made the changes in the commit link, currently testing on Azure Nop 4.0

Are you using any Plugins?  I am using Nop-Templates and I downloaded the most recent version for my install as well.  They made adjusts to plugin.
5 years ago
I get the error in 2 types of environments (hosted and self-hosted/vm) on both 4.0 and 4.1. The error is identical with the exception of the Microsoft.AspNetCore.Hosting version (depending on 4.0 or 4.1).

Permissions are set, etc...all the normal stuff.

Its very sporadic. Sometimes a week, 2 weeks, sometimes a month before sudden failure.  The Event viewer is clear, nop logs just show that the application restarted.  IIS logs are vague.

An app pool recycle recovers the site for both versions 4.0 and 4.1.  In both cases, Nop-Templates themes/plugins are used, but there is also no evidence to determine if it is 3rd party code or not.

What makes this issue hard to pin-point is there is no direct way to reproduce it...you literally have to wait (in my case - possibly weeks before another re-occurrence).  Were still in search of the root cause.
5 years ago
Well a bit of good news... given my post above, I didn't have to wait a week, just been a few days and go the error.  This time with full logging on.
NopForms is a plugin for reference to the dll below.  But the specific name of the plugin is irrelevant I believe to the problem... probably just tried to grab this dll first and would have failed the same way on the 2nd plugin.  
Obviously, given the error, this is directly related to shadow copy in 4.0.  However, I know we get this same type of crash in 4.1 where ShadowCopy was modified.  So...not convinced the patch on 4.1 is fully effective. Given others in this thread also have 4.1 and have seen this error, its enough to convince me that a 4.1 upgrade won't solve this.  But as 4.0 code base is done, will just focus on 4.1 going forward and just not use 4.0
The logs do confirm of course that the process is initiated at startup (app pool auto recycle). So knowing that a way to force this error to surface at a faster pace, I can shorten the lifecycle of the app pool (IIS default restart app pool timer).  Presently its set to 1440 minutes (recycles in the middle of the night) and 9 times out of 10 it succeeds - in this case today, it failed.  Permissions are definitely set to full on the identity behind the application pool for this area of the file system.  And of course, the site does work and recycle correctly most of the time.


Application startup exception: System.Exception: Plugin 'Nop Forms'. Access to the path 'c:\InetPub\wwwroot\FocusPoint\Plugins\bin\Nop.Plugin.Widgets.NopForms.dll' is denied.
Access to the path 'c:\InetPub\wwwroot\FocusPoint\Plugins\bin\Nop.Plugin.Widgets.NopForms.dll' is denied.
---> System.Exception: Plugin 'Nop Forms'. Access to the path 'c:\InetPub\wwwroot\FocusPoint\Plugins\bin\Nop.Plugin.Widgets.NopForms.dll' is denied. ---> System.UnauthorizedAccessException: Access to the path 'c:\InetPub\wwwroot\FocusPoint\Plugins\bin\Nop.Plugin.Widgets.NopForms.dll' is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.File.InternalDelete(String path, Boolean checkHost)
   at System.IO.File.Delete(String path)
   at Nop.Core.Plugins.PluginManager.ShadowCopyFile(FileInfo plug, DirectoryInfo shadowCopyPlugFolder) in D:\Development\FocusPoint3\Libraries\Nop.Core\Plugins\PluginManager.cs:line 259
   at Nop.Core.Plugins.PluginManager.PerformFileDeploy(FileInfo plug, ApplicationPartManager applicationPartManager, NopConfig config) in D:\Development\FocusPoint3\Libraries\Nop.Core\Plugins\PluginManager.cs:line 197
   at Nop.Core.Plugins.PluginManager.Initialize(ApplicationPartManager applicationPartManager, NopConfig config) in D:\Development\FocusPoint3\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:\Development\FocusPoint3\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:\Development\FocusPoint3\Libraries\Nop.Core\Plugins\PluginManager.cs:line 464
   at Nop.Core.Infrastructure.NopEngine.Initialize(IServiceCollection services) in D:\Development\FocusPoint3\Libraries\Nop.Core\Infrastructure\NopEngine.cs:line 154
   at Nop.Web.Framework.Infrastructure.Extensions.ServiceCollectionExtensions.ConfigureApplicationServices(IServiceCollection services, IConfigurationRoot configuration) in D:\Development\FocusPoint3\Presentation\Nop.Web.Framework\Infrastructure\Extensions\ServiceCollectionExtensions.cs:line 49
   at Nop.Web.Startup.ConfigureServices(IServiceCollection services) in D:\Development\FocusPoint3\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

So will just look at 4.1 and compare.
5 years ago
ChuckR wrote:
Well a bit of good news... given my post above, I didn't have to wait a week, just been a few days and go the error.  This time with full logging on.
NopForms is a plugin for reference to the dll below.  But the specific name of the plugin is irrelevant I believe to the problem... probably just tried to grab this dll first and would have failed the same way on the 2nd plugin.  
Obviously, given the error, this is directly related to shadow copy in 4.0.  However, I know we get this same type of crash in 4.1 where ShadowCopy was modified.  So...not convinced the patch on 4.1 is fully effective. Given others in this thread also have 4.1 and have seen this error, its enough to convince me that a 4.1 upgrade won't solve this.  But as 4.0 code base is done, will just focus on 4.1 going forward and just not use 4.0
The logs do confirm of course that the process is initiated at startup (app pool auto recycle). So knowing that a way to force this error to surface at a faster pace, I can shorten the lifecycle of the app pool (IIS default restart app pool timer).  Presently its set to 1440 minutes (recycles in the middle of the night) and 9 times out of 10 it succeeds - in this case today, it failed.  Permissions are definitely set to full on the identity behind the application pool for this area of the file system.  And of course, the site does work and recycle correctly most of the time.


Application startup exception: System.Exception: Plugin 'Nop Forms'. Access to the path 'c:\InetPub\wwwroot\FocusPoint\Plugins\bin\Nop.Plugin.Widgets.NopForms.dll' is denied.
Access to the path 'c:\InetPub\wwwroot\FocusPoint\Plugins\bin\Nop.Plugin.Widgets.NopForms.dll' is denied.
---> System.Exception: Plugin 'Nop Forms'. Access to the path 'c:\InetPub\wwwroot\FocusPoint\Plugins\bin\Nop.Plugin.Widgets.NopForms.dll' is denied. ---> System.UnauthorizedAccessException: Access to the path 'c:\InetPub\wwwroot\FocusPoint\Plugins\bin\Nop.Plugin.Widgets.NopForms.dll' is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.File.InternalDelete(String path, Boolean checkHost)
   at System.IO.File.Delete(String path)
   at Nop.Core.Plugins.PluginManager.ShadowCopyFile(FileInfo plug, DirectoryInfo shadowCopyPlugFolder) in D:\Development\FocusPoint3\Libraries\Nop.Core\Plugins\PluginManager.cs:line 259
   at Nop.Core.Plugins.PluginManager.PerformFileDeploy(FileInfo plug, ApplicationPartManager applicationPartManager, NopConfig config) in D:\Development\FocusPoint3\Libraries\Nop.Core\Plugins\PluginManager.cs:line 197
   at Nop.Core.Plugins.PluginManager.Initialize(ApplicationPartManager applicationPartManager, NopConfig config) in D:\Development\FocusPoint3\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:\Development\FocusPoint3\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:\Development\FocusPoint3\Libraries\Nop.Core\Plugins\PluginManager.cs:line 464
   at Nop.Core.Infrastructure.NopEngine.Initialize(IServiceCollection services) in D:\Development\FocusPoint3\Libraries\Nop.Core\Infrastructure\NopEngine.cs:line 154
   at Nop.Web.Framework.Infrastructure.Extensions.ServiceCollectionExtensions.ConfigureApplicationServices(IServiceCollection services, IConfigurationRoot configuration) in D:\Development\FocusPoint3\Presentation\Nop.Web.Framework\Infrastructure\Extensions\ServiceCollectionExtensions.cs:line 49
   at Nop.Web.Startup.ConfigureServices(IServiceCollection services) in D:\Development\FocusPoint3\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

So will just look at 4.1 and compare.


Hi you try solutions from this topic?
https://www.nopcommerce.com/boards/t/49851/serious-iis-application-pool-recycling-bugdesign-flaw.aspx
5 years ago
same issue in 4.10 happened 3 times in 3 weeks, store is down when this happens =$$ loss, simple restart of the app fixes it , but never know when its happening..

its happened again on Black Friday no less , can't go back to 3.8.


Dedicated server no azure, what pool should the application be set to?

Thanks



An error occurred while starting the application.

.NET Core 4.6.26919.02 X64 v4.0.0.0    |   Microsoft.AspNetCore.Hosting version 2.1.1-rtm-30846    |    Microsoft Windows 6.1.7601 S    |   Need help?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.