认证 – asp.net mvc 3:Page.User.IsInRole(“xy”)返回null

认证 – asp.net mvc 3:Page.User.IsInRole(“xy”)返回null

我迁移了一个mvc 2应用程序到版本3. 不幸的是,在我的部分登录文件中,用户登录时会抛出异常.Request.IsAuthenticated返回true,但Page.User返回null! 而且当然 Page.User.IsInRole( “XY”) 抛出异常: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException

联系我们

联系我们

0577-28828765

在线咨询: QQ交谈

邮箱: xwei067@foxmail.com

工作时间:周一至周五,9:00-17:30,节假日休息

返回顶部