![](/img/trans.png)
[英]Error CS0103: The name '_context' does not exist in the current context
[英]ERROR CS0103: The name 'IsInRole' does not exist in the current context
我在我的 Web 服务项目中加入了这一行。 这应该检查当前主体是否具有查看者的角色。
代码
System.Threading.Thread.CurrentPrincipal.IsInRole("Viewer")
这会引发错误,例如 IsInRole("Viewer") is not into context。 请帮助在这里写什么。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.