Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Error When click on login in MVC4

Error When click on login in MVC4

Scheduled Pinned Locked Moved Web Development
csharpvisual-studioasp-netwpfhelp
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    NarVish
    wrote on last edited by
    #1

    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.

    L D 2 Replies Last reply
    0
    • N NarVish

      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.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      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.

      N 1 Reply Last reply
      0
      • L Lost User

        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.

        N Offline
        N Offline
        NarVish
        wrote on last edited by
        #3

        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);

        L 1 Reply Last reply
        0
        • N NarVish

          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);

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          0
          • N NarVish

            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.

            D Offline
            D Offline
            Dominic Burford
            wrote on last edited by
            #5

            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.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups