在Web应用程序获取计算机用户名 [英] Get the computer user name in a web application

查看:629
本文介绍了在Web应用程序获取计算机用户名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用窗体身份验证的Web应用程序。用户名是使用他们的计算机用户的那些一样的,因此他们希望Web应用程序,以便能够检测用户名,这样应用程序可以自动登录它的用户。

I have a web application where forms authentication is used. The user names are the same that the ones used by the users in their computers, so they want the web app to be able to detect that user name so the app can log it the user automatically.

如何能不能做到?我的意思是,如果我设置验证方式为形我还是从IIS获得这些证书?

How can it be done? I mean, if I set the authentication mode to "Form" do I still get those credentials from IIS?

我知道这几个比这更好的方式来完成,但我感兴趣的是这种特别的方式。因为它是在少数用户的Intranet上的小Web App不值得大建筑的变化。如果这是可能的,快乐的日子,否则将不得不等待。

I know this can be done in several better ways than this, but I am interested in this particular way. As it is a small web app in an intranet with a few users doesn't worth it a big architectural change. If it's possible, happy days, otherwise it will have to wait.

干杯。

推荐答案

Windows验证不能与窗体身份验证共存,但它可以以匿名身份验证并存。

Windows auth cannot coexists with Forms auth, but it can coexists with Anonymous auth.

此处了解详情:<一href=\"http://stackoverflow.com/questions/7310636/windows-authentication-is-not-challenging-browsers-out-of-the-domain\">Windows认证不具有挑战性的浏览器出来的域的

这篇关于在Web应用程序获取计算机用户名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆