We're developing a new Commerce solution and we have test/prod environments running as web apps in Azure with automated deployment.
I configured the solution for Azure using this documentation, and initially it worked fine - but when I made a new deploy to test today, we got this exception on startup:
[NullReferenceException: Object reference not set to an instance of an object.]
EPiServer.Web.Hosting.VirtualPathRegistrationHandler.CreateVirtualPathProviderInstance(ProviderSettings providerSettings) +59
EPiServer.Web.Hosting.VirtualPathRegistrationHandler.RegisterVirtualPathProvidersFromSettings(ProviderSettingsCollection settings) +172
EPiServer.Web.Hosting.VirtualPathRegistrationHandler.RegisterVirtualPathProviders(InitializationEngine context, ProviderSettingsCollection settings) +40
EPiServer.Framework.Initialization.Internal.VirtualPathProviderInitialization.RegisterVirtualPathProviders(InitializationEngine context) +179
EPiServer.Framework.Initialization.Internal.ModuleNode.Execute(Action a, String key) +54
EPiServer.Framework.Initialization.Internal.ModuleNode.Initialize(InitializationEngine context) +122
[InitializationException: Initialize action failed for Initialize on class EPiServer.Framework.Initialization.Internal.VirtualPathProviderInitialization, EPiServer.Framework.AspNet, Version=188.8.131.52, Culture=neutral, PublicKeyToken=8fe83dea738b45b7]
EPiServer.Framework.Initialization.InitializationEngine.ExecuteTransition(Boolean continueTransitions) +198
EPiServer.Framework.Initialization.InitializationModule.EngineExecute(HostType hostType, Action`1 engineAction) +876
EPiServer.Framework.Initialization.InitializationModule.FrameworkInitialization(HostType hostType) +225
It's been about a month since last time I deployed to this environment, and the codebase has changed a lot (and we've also installed new versions of EPiServer Nuget packages), so it's hard to say what change has caused this (if any). It works fine locally. Would very much appreciate it if anyone could give us a nudge in the right direction here. Versions are: EPiServer.CMS v.11.3.2, EPiServer Commerce v.11.6.1
It seems like you have a wrong configuration in episerverframework.config, the type for any VirtualPathNonUnifiedProvider should be
Thanks Quan, that solved it.
When was this changed? As mentioned, this configuration worked in December (and came with the default installation - we haven't changed it).
It was changed in CMS 11 :), more information can be found here: https://world.episerver.com/blogs/Johan-Bjornfot/Dates1/2017/11/cms-11-and--net-standard-compliance/
basically APIs which dependencies on AspNet were moved to separate packages (with .AspNet suffix)
I see - turns out the configuration had been updated correctly by an upgrade of EPiServer, but with the automated deploy it was reverted by a config transform of the episerver.framework section. Anyway, thanks for the quick reply, I spent most of yesterday struggeling with this.