100分求教一个asp.net用户认证的问题
请问以下问题怎样实现? 某公司用AD(域)管理员工电脑账号,现有一个站点, 当公司内部员工访问时,不需要再认证(因为内部员工登录电脑的时候,已通过域认证) 当非公司员工访问时,跳转到用户登录界面,需要用户输入正确的用户名和密码后才允许访问。
公司内部有内网吗?用正则匹配来源IP,不是内网转到登陆页面 web.config中 <authentication mode="Windows" /> 你可以读取客户端的IP地址(外网),当公司的内网登录后,把这个地址和登录信息保存起来 ,如果不是这个公司的IP那就跳转引用 web.config中 <authentication mode="Windows" /> 再配合ASP.NET的Form认证,去判断User.Identity.Name web.config中 身份验证<authentication mode="Windows" /> 再配置相关属性,如:Default=“Default.aspx”Login="Login.aspx" <authentication mode="Windows"/> User.Identity.Name 得到域名和用户名. LogonUser登录 就是一个判断就搞定了嘛!楼上的已经给你答案了。呵呵! 学习中,路过顶贴!!!! 学习中,路过顶贴!!!! 麻烦说详细点,别说的那么简单··· web.config中 身份验证<authentication mode="Windows" /> 再配置相关属性,如:Default=“Default.aspx”Login="Login.aspx"引用 <authentication mode="Windows"/> User.Identity.Name 得到域
相关问答:
本人目前遇到一个难题,请各位高手、大侠帮帮忙。 我单击一个按钮时要把gridview中的数据一个一个的取出并把对应参数传递给前台的js。 我试了几种后台调前台的方式都没有成功,所以请大侠们帮帮小弟。 谢谢。 不 ......
C# code: SqlConnection conn = CsDB.sqlcon(); SqlDataAdapter da = new SqlDataAdapter("select fwCoding from bjmuma_fwCoding where OrderNumber='" + Order + & ......
3个radioButton 一个Button 一个label C# code: protected void Button1_Click(object sender, EventArgs e) { string str = null; RadioButton rdo=(RadioButton)sender; ......
asp.net批量上传图片最好有源码,在线等!!!!!!! 源码很长的。 参考 C# code: HttpFileCollection files = HttpContext.Current.Request.Files; if (files.Count <= 1) { ......
代码: protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { SqlDataSource1.SelectCommand = "SELECT * from [shang_pi ......