asp.net MVC WebMatrix中的MembershipProvider在踢 [英] asp.net MVC webmatrix membershipprovider kicking in

查看:101
本文介绍了asp.net MVC WebMatrix中的MembershipProvider在踢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从MVC2迁移后 - MVC3有一些小问题...打电话Membership.GetAllUsers当我遇到这样的问题。

似乎代替System.Web.Security.SqlMembershipProvider
WebMatrix.WebData.SimpleMembershipProvider被踢。我使用WebMatrix中获得剃须刀助手与MVC3工作。尝试了一堆东西,但没有成功。

IIS7管理的配置看起来像这样

 < trustedProviders allowUntrustedProviders =false的>
            <加上TYPE =System.Web.Security.SqlMembershipProvider,System.Web程序,版本= 2.0.0.0,文化=中性公钥= b03f5f7f11d50a3a/>
            <加上TYPE =System.Web.Security.SqlRoleProvider,System.Web程序,版本= 2.0.0.0,文化=中性公钥= b03f5f7f11d50a3a/>
            <加上TYPE =System.Web.Security.WindowsTokenRoleProvider,System.Web程序,版本= 2.0.0.0,文化=中性公钥= b03f5f7f11d50a3a/>
        < / trustedProviders>


  

[引发NotSupportedException:不支持指定的方法。]
     WebMatrix.WebData.SimpleMembershipProvider.GetAllUsers(的Int32的PageIndex,的Int32的pageSize,的Int32&安培;总记录)+28
     System.Web.Security.Membership.GetAllUsers(的Int32的PageIndex,的Int32的pageSize,的Int32&安培;总记录)+45



解决方案

在ASP.NET MVC 3测试版出现了,其中一些额外的功能被启用错误的错误。有一些配置设置来禁用他们,但他们不应该不再需要。

在ASP.NET MVC 3 RC(这是本周早些时候公布),他们都应该是固定的。你要确保在你的web.config文件和项目引用您不引用任何WebMatrix的的DLL。

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

it seems that instead of System.Web.Security.SqlMembershipProvider WebMatrix.WebData.SimpleMembershipProvider is kicking in. I am using WebMatrix to get razor helpers to work with MVC3. Tried a bunch of things but without success.

IIS7 administration config looks like this

        <trustedProviders allowUntrustedProviders="false">
            <add type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
            <add type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
            <add type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
        </trustedProviders>

[NotSupportedException: Specified method is not supported.] WebMatrix.WebData.SimpleMembershipProvider.GetAllUsers(Int32 pageIndex, Int32 pageSize, Int32& totalRecords) +28 System.Web.Security.Membership.GetAllUsers(Int32 pageIndex, Int32 pageSize, Int32& totalRecords) +45

解决方案

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.

这篇关于asp.net MVC WebMatrix中的MembershipProvider在踢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆