Error When click on login in MVC4
-
Hi, I've installed VS 2013 Professional Edition and created a project as shown below 1. File->New Project 2. Templates->Visual C#->Web->Visual Studio 2012 3. Selected ASP.Net MVC4 Web Application and clicked on OK button A new project got created. I haven't done any code changes. Run the application using internet Explorer. Its working fine and when I clicked on Login link, below exception was thrown. Please let me know if I missed anything. Exception:
An exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll but was not handled in user code
Exception occurred in Filters->InitializeSimpleMembershipAttribute.cs method: OnActionExecuting Line: LazyInitializer.EnsureInitialized(ref _initializer, ref _isInitialized, ref _initializerLock); Thanks in advance. -
Hi, I've installed VS 2013 Professional Edition and created a project as shown below 1. File->New Project 2. Templates->Visual C#->Web->Visual Studio 2012 3. Selected ASP.Net MVC4 Web Application and clicked on OK button A new project got created. I haven't done any code changes. Run the application using internet Explorer. Its working fine and when I clicked on Login link, below exception was thrown. Please let me know if I missed anything. Exception:
An exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll but was not handled in user code
Exception occurred in Filters->InitializeSimpleMembershipAttribute.cs method: OnActionExecuting Line: LazyInitializer.EnsureInitialized(ref _initializer, ref _isInitialized, ref _initializerLock); Thanks in advance. -
It probably means that you have not added the required implementation code for some method that will be called by the framework. Check the MVC documentation, and also look at the place where the exception occurred.
I haven't done any code changes. I just want to go through the built-in functionality which is ready to use. Exception occurred in Filters->InitializeSimpleMembershipAttribute.cs method: OnActionExecuting Line: LazyInitializer.EnsureInitialized(ref _initializer, ref _isInitialized, ref _initializerLock);
-
I haven't done any code changes. I just want to go through the built-in functionality which is ready to use. Exception occurred in Filters->InitializeSimpleMembershipAttribute.cs method: OnActionExecuting Line: LazyInitializer.EnsureInitialized(ref _initializer, ref _isInitialized, ref _initializerLock);
NarVish wrote:
I just want to go through the built-in functionality which is ready to use.
Well something is obviously missing, hence the exception. You will need to examine the code more closely to identify the problem. Alternatively you can add an exception handler to help you.
-
Hi, I've installed VS 2013 Professional Edition and created a project as shown below 1. File->New Project 2. Templates->Visual C#->Web->Visual Studio 2012 3. Selected ASP.Net MVC4 Web Application and clicked on OK button A new project got created. I haven't done any code changes. Run the application using internet Explorer. Its working fine and when I clicked on Login link, below exception was thrown. Please let me know if I missed anything. Exception:
An exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll but was not handled in user code
Exception occurred in Filters->InitializeSimpleMembershipAttribute.cs method: OnActionExecuting Line: LazyInitializer.EnsureInitialized(ref _initializer, ref _isInitialized, ref _initializerLock); Thanks in advance.Step through the code and see where the exception is being thrown. You can then view the full details such as the stacktrace and innerexception which should give you sufficient information to resolve your error.