We can't upgrade EPiServer.CMS from 9.10.0 to any version above 10. We always end up at the same place. After converting the database to UTC the site is unresponsive. We can't even surf to a static file, like an image or .html file. It's the same behaviour if we instead set the AppSetting episerver:DisableDateTimeKindValidation to true in web.config. Database conversion to UTC completes successfully.
Beyond converting as described here the site does not work anymore. "Database have not been converted to UTC. Convert the database by running the cmdlet 'Convert-EPiDatabaseToUtc' in the package manager console. See SDK chapter 'Storing UTC date and time in the database' for more details. You can temporarily disable this error by adding 'episerver:DisableDateTimeKindValidation' with value 'true' under the 'appSettings' section in web.config."
Summary: * The database is local db (.mdf). * We successfully converted the database by running the cmdlet 'Convert-EPiDatabaseToUtc'. * We cannot surf to any location on the site after converting to UTC, not even static files. * We get nothing in any log. * Application_Start() is never reached. * Our custom Initilization modules can be debugged and cause no errors. We have also tried removing them completely, no difference. * We have tried upgrading on an empty database created for a new Alloy site. The same problem occurs. * We tried converting the database to Sql Server and then giving the user full access. No luck there either.
THE ERROR
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
[No relevant source lines]
Source File: c:\Users\dagr8080\AppData\Local\Temp\Temporary ASP.NET Files\vs\ae2386c0\b31e4210\App_global.asax.1iodngtr.0.cs Line: 0
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
We had implemented the IValidate interface in two blocks. None of which were typed. There was no apparrent reason to use Ivalidate so I just removed it. I could also strongly type the interface to make the error go away. Then the site gave me other errors but that is another story. I could finally get site working in the new version.
BEFORE PROBLEMS SOLVED
We can't upgrade EPiServer.CMS from 9.10.0 to any version above 10. We always end up at the same place. After converting the database to UTC the site is unresponsive. We can't even surf to a static file, like an image or .html file. It's the same behaviour if we instead set the AppSetting episerver:DisableDateTimeKindValidation to true in web.config. Database conversion to UTC completes successfully.
Beyond converting as described here the site does not work anymore.
"Database have not been converted to UTC. Convert the database by running the cmdlet 'Convert-EPiDatabaseToUtc' in the package manager console. See SDK chapter 'Storing UTC date and time in the database' for more details.
You can temporarily disable this error by adding 'episerver:DisableDateTimeKindValidation' with value 'true' under the 'appSettings' section in web.config."
Summary:
* The database is local db (.mdf).
* We successfully converted the database by running the cmdlet 'Convert-EPiDatabaseToUtc'.
* We cannot surf to any location on the site after converting to UTC, not even static files.
* We get nothing in any log.
* Application_Start() is never reached.
* Our custom Initilization modules can be debugged and cause no errors. We have also tried removing them completely, no difference.
* We have tried upgrading on an empty database created for a new Alloy site. The same problem occurs.
* We tried converting the database to Sql Server and then giving the user full access. No luck there either.
THE ERROR
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
[No relevant source lines]
Source File: c:\Users\dagr8080\AppData\Local\Temp\Temporary ASP.NET Files\vs\ae2386c0\b31e4210\App_global.asax.1iodngtr.0.cs Line: 0
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
EPiServer.Validation.Internal.ValidationService.Initialize(ITypeScannerLookup typeScannerLookup, IServiceLocator serviceLocator) +303
EPiServer.Validation.Internal.<>c__DisplayClass9_0.b__0() +120 >
System.Threading.Tasks.Task.InnerInvoke() +73
System.Threading.Tasks.Task.Execute() +51
[AggregateException: One or more errors occurred.]
System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) +4126961
System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) +12257049
EPiServer.Validation.Internal.<>c__DisplayClass9_0.b__1(Object e, EventArgs args) +15 >
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +160
System.Delegate.DynamicInvokeImpl(Object[] args) +117
EPiServer.Framework.Initialization.InitializationEngine.OnInitComplete() +195
EPiServer.Framework.Initialization.InitializationEngine.ExecuteTransition(Boolean continueTransitions) +164
EPiServer.Framework.Initialization.InitializationEngine.Initialize() +40
EPiServer.Framework.Initialization.<>c.b__7_0(InitializationEngine e) +9 >
EPiServer.Framework.Initialization.InitializationModule.EngineExecute(HostType hostType, Action`1 engineAction) +334
EPiServer.Framework.Initialization.InitializationModule.FrameworkInitialization(HostType hostType) +170
EPiServer.Global..ctor() +76
StenaMetallExternalWeb.Web.EPiServerApplication..ctor() +42
ASP.global_asax..ctor() in c:\Users\dagr8080\AppData\Local\Temp\Temporary ASP.NET Files\vs\ae2386c0\b31e4210\App_global.asax.1iodngtr.0.cs:0
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +114
System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +232
System.Activator.CreateInstance(Type type, Boolean nonPublic) +83
System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) +1088
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +128
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +20
System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +60
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +260
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296
[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9985632
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254
THE PROBLEM AND SOLUTION
We had implemented the IValidate interface in two blocks. None of which were typed. There was no apparrent reason to use Ivalidate so I just removed it. I could also strongly type the interface to make the error go away. Then the site gave me other errors but that is another story. I could finally get site working in the new version.