升级到.net 4.0成员资格问题 - GetUser错误

时间:2017-03-21 08:56:56

标签: .net vb.net

我遇到的问题是GetUsersystem.web.security移到system.web.applicationstring之前的问题。

我做了所有可以找到的更改,但我仍然遇到了问题

  

“不支持指定的方法”

当我致电GetUser("username")

我的配置文件如下                                                                                   

<membership defaultProvider="ClientAuthenticationMembershipProvider">
  <providers>
    <remove name="AspNetSqlMembershipProvider"/>
      <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="conname" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="3" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" passwordStrengthRegularExpression=""/>
      <add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri=""/>
  </providers>
</membership>
  <roleManager enabled="true" defaultProvider="ClientRoleProvider">
  <providers>
    <remove name="AspNetSqlRoleProvider"/>
    <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" applicationName="/" connectionStringName="conname"/>
    <add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400"/>
  </providers>
</roleManager>

</system.web>

<system.web> <compilation debug="false" strict="false" explicit = "true" targetFramework="4.0"> <assemblies> <remove assembly="System.Web.ApplicationServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> <add assembly="System.Web.ApplicationServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> </assemblies> </compilation>

感激地收到任何其他建议

0 个答案:

没有答案