[英]Role Provider couldn't be found in the System.web.security?
I want to inherit the abstract class RoleProvider.我想继承抽象类RoleProvider。 However, I am getting errors saying that RoleProvider doesn't exist in the Web.Security namespace.
但是,我收到错误消息,指出 Web.Security 命名空间中不存在 RoleProvider。 This is what I am following - https://msdn.microsoft.com/en-us/library/system.web.security.roleprovider(v=vs.110).aspx
这就是我所关注的 - https://msdn.microsoft.com/en-us/library/system.web.security.roleprovider(v=vs.110).aspx
This is my class -这是我的课——
using System;
using System.Collections.Generic;
using System.Linq;
namespace blogging.Infrastructure
{
public class RoleProvider: System.Web.Security.RoleProvider
{
}
}
检查您的项目中是否有对 System.Web.ApplicationServices.dll 的引用。
Just change your class name.只需更改您的班级名称。
See this example :请参阅此示例:
public class AccountRoleProvider: System.Web.Security.RoleProvider
{
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.