在msdn里有关于用户验证的文章,你可以找一下
解决方案 »
- 如何把一个datagridview作为数据源筛选后到另一个datagridview?
- 新手求帮改错
- C#用查询SQL数据表中时间记录?有代码高手找出错误,谢谢
- C# 怎样让DataGridView不显示最下面那个空行
- vs.net2003 asp.net web应用程序出错
- 怎么在状态条StatusBar中添加进度条控件
- 求大神解释一下(关于继承的的一个测试脚本)
- 求助,c# 中传递函数指针给c dll, malloc()
- 怎样设置combox的文本框为只读,并且第一次显示的时候文本框内有内容
- 请问各位大侠(关于通过Modem如何上传文件?)
- 制作安装程序的问题
- 请教:如何jpg文件和自己写的程序关联起来?
服务端的样例代码为:using System.Security.Permissions;/// <summary>
/// 装载业务组件[检查.NET代码安全性]
/// </summary>
[PrincipalPermission(SecurityAction.Demand,Name="CWenZheng", Role="EAPCoreDeveloper")]
public void LoadBusinessComponents()
{
//something;
}客户端的代码为:
#region 设置逻辑线程的当事人,因为服务端的某些方法只能由特定的当事人调用GenericIdentity identity=new GenericIdentity("CWenZheng");
String[] MyString = {"EAPCoreDeveloper", "User"};GenericPrincipal EAPCoreDeveloper = new GenericPrincipal(identity,MyString);AppDomain.CurrentDomain.SetThreadPrincipal(EAPCoreDeveloper);
#endregion不清楚的地方可来信至 [email protected]