3
有没有什么方法可以保护c#中的Web方法,比如Spring Security Annotations?C# - 寻找像Spring Security一样的WebService安全性
类似:
public interface MyWebService {
@Secured("ROLE_USER")
public void delete(int cid);
}
感谢
有没有什么方法可以保护c#中的Web方法,比如Spring Security Annotations?C# - 寻找像Spring Security一样的WebService安全性
类似:
public interface MyWebService {
@Secured("ROLE_USER")
public void delete(int cid);
}
感谢
是。查看WCF的authorization。具体来说,用于控制安全的.Net模拟与PrincipalPermissionAttribute。为此,您需要确保当前的上下文与身份相关联,例如,在连接到您的服务并使用这些凭据设置会话的用户帐户之前,需要使用用户名/密码组合。