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