本文介绍了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>

解决方案

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在踢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-09 03:26