Upgrade from 3.2 to 4.0 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
hello, well this has been long overdue but I decided to upgrade one of our sites from 3.2 and everything worked like a charm until the upgrade from 3.9 to 4.0..

Followed the instructions to install .NetCore from this link provided here https://www.microsoft.com/net/download/windows

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

With stdout logging enabled I get this:

Application startup exception: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.RuntimeAssembly.get_DefinedTypes()
   at AutoMapper.ServiceCollectionExtensions.<>c.<AddAutoMapperClasses>b__11_1(Assembly a)
   at System.Linq.Enumerable.<SelectManyIterator>d__17`2.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at AutoMapper.ServiceCollectionExtensions.AddAutoMapperClasses(IServiceCollection services, Action`1 additionalInitAction, IEnumerable`1 assembliesToScan)
   at AutoMapper.ServiceCollectionExtensions.AddAutoMapper(IServiceCollection services)
   at Nop.Core.Infrastructure.NopEngine.AddAutoMapper(IServiceCollection services, ITypeFinder typeFinder)
   at Nop.Core.Infrastructure.NopEngine.ConfigureServices(IServiceCollection services, IConfigurationRoot configuration)
   at Nop.Web.Framework.Infrastructure.Extensions.ServiceCollectionExtensions.ConfigureApplicationServices(IServiceCollection services, IConfigurationRoot configuration)
   at Nop.Web.Startup.ConfigureServices(IServiceCollection services)
--- End of stack trace from previous location where exception was thrown ---


Any help would be appreciated.

The host is running Server 2016 DataCenter all patches and upgrades applied, MSSQL Express. VS 2015, .NET framework 4.6.1, .NETCore 2.1
5 years ago
Hi,

This is a known issue with nopCommerce 4.00

Please check this https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/index?view=aspnetcore-2.1&tabs=aspnetcore2x#install-the-net-core-hosting-bundle

and make sure you install latest runtime from this https://www.microsoft.com/net/download/all

Also, make sure you have provided enough permissions to IIS_USER for the website directory. Hope this would help.

Thank you,
Atul
5 years ago
hello,

I think you have to look at following urls.

https://www.nopcommerce.com/boards/t/49550/an-error-occurred-while-starting-the-application.aspx

https://www.nopcommerce.com/boards/t/49975/an-error-occurred-while-starting-the-application.aspx

https://www.nopcommerce.com/boards/t/51790/an-error-occurred-while-starting-the-application.aspx

https://www.nopcommerce.com/boards/t/51485/an-error-occurred-while-starting-the-application-nopcommerce-v40.aspx

https://stackoverflow.com/questions/35663759/asp-net-5-an-error-occurred-while-starting-the-application

there are lots of post regarding this error.

hope you could find root of your problem.
5 years ago
hello sk5202 and nopAdvanced. Thank you for your response. 4.0 seems to be away off from being in production.nopAdvanced I have all uninstalled and reinstalled from the same link you provided and no luck.I have also researched all the links sk5202 has provided and I feel going back to 3.9 is best and wait for the smoke to dissipate.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.