I was playing with the security settings following a few tutorials along and now my application is locked up on me no matter what I do.
As a final resort I have created a new project and started importing files from the broken version across to see if I can isolate where the error is occurring.
So far I have imported the models, the initialiser and the context file. I have then configured start up to seed the database and I keep getting an error on:
public static void Initialize(Eva804Context context) { context.Database.EnsureCreated(); if (context.Location.Any())
context.Database.EnsureCreated
If I tell it to continue past this error I am getting the error message
The entity type 'IdentityUserLogin<string>' requires a primary key to be defined.
Which is less than helpful as I cant find any reference to IdenityUserLogin in the project anywhere even using find to search. I have been chasing this for a couple of days now and am getting a little feed up with it.
Got an updated error now. Still getting debug at same point.
:( Oops. 500 Internal Server Error System.IO.FileNotFoundException Could not load the specified file. at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingEvent(AssemblyName assemblyName) at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingResolvingEvent(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName) System.Reflection.TargetInvocationException Exception has been thrown by the target of an invocation. at System.RuntimeMethodHandle.InvokeMethod(object target, Object[] arguments, Signature sig, bool constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Microsoft.AspNetCore.Hosting.Internal.ConfigureBuilder.Invoke(object instance, IApplicationBuilder builder) at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication() Show raw exception details System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load the specified file. at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingEvent(AssemblyName assemblyName) at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingResolvingEvent(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Microsoft.AspNetCore.Hosting.Internal.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder) at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
Hoping someone else has solved this issue previously?