asp.net MVC webmatrix membershipprovider kicking in

后端 未结 3 583
庸人自扰
庸人自扰 2021-01-19 19:41

after migrating from mvc2 - mvc3 with minor issues ... I encounter the following problem when calling Membership.GetAllUsers

it seems that instead of System.Web.Secu

相关标签:
3条回答
  • 2021-01-19 20:20

    What about your web.config, specifically the system.web.membership section?

    <system.web>
        <membership>
            <providers>
                <clear/>
                <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
            </providers>
        </membership>
    <system.web>
    
    0 讨论(0)
  • 2021-01-19 20:23

    In ASP.NET MVC 3 Beta there was a bug where some additional features were enabled by mistake. There are some config settings to disable them, but they shouldn't be needed anymore.

    In ASP.NET MVC 3 RC (which was released earlier this week) they should all be fixed. You'll want to make sure that in your web.config files and project references you are not referencing any of the "WebMatrix" DLLs.

    0 讨论(0)
  • 2021-01-19 20:43

    found solution. Seems that changing the defaultProvider to another setting is the solution. I guess WebMatrix was registers using "AspNetSqlMembershipProvider" as it's name -> but's a guess unfortunately

    <membership defaultProvider="SQL">
      <providers>
        <clear />
        <add name="SQL" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="images" passwordFormat="Clear" />
      </providers>
    </membership>
    
    0 讨论(0)
提交回复
热议问题