SimpleMembershipProvider not working

前端 未结 5 1197
悲哀的现实
悲哀的现实 2020-12-04 22:37

I started a new internet project with VS2012 and am trying to just restructure my project a bit and I can\'t seem to keep the SimpleMemberhsipProvider working. Basically, a

5条回答
  •  盖世英雄少女心
    2020-12-04 23:26

    First way

    Check the sphair's answer out (in current thread).

    Second way

    Add following assemblies to the web.config:

    
      
        
          
          
        
      
    
    

    Update

    The WebMatrix.WebData assembly contains a start up method to initialize Membership/Role providers and enable RoleManager (PreApplicationStartCode.Start). But ASP.NET couldn't find that to run in your case. By adding these two lines of code, we force ASP.NET to search these assemblies for PreApplicationStartMethodAttribute(s).

提交回复
热议问题