HttpContext.Current.User.Identity.Name [英] HttpContext.Current.User.Identity.Name

查看:95
本文介绍了HttpContext.Current.User.Identity.Name的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我有一个使用HttpContext.Current.User.Identity.Name(DOMAIN / NameUser)的Web应用程序

返回错误的用户

例如我期待dar12101 @ .....并且它返回dar09001 @ .....

Web应用程序有100个用户,只有两个错误。

这里代码:

string windowsAuthentication = HttpContext.Current.User.Identity.Name;

有人知道告诉我什么吗?

谢谢

Hello,
I have a web application that uses HttpContext.Current.User.Identity.Name (DOMAIN/NameUser)
It returns wrong user
For example I expect dar12101@..... and it returns dar09001@.....
Web application has 100 users and only two back wrong.
Here the code:
string windowsAuthentication = HttpContext.Current.User.Identity.Name;
Does anybody know tell me something?
Thanks

推荐答案

用户是否有多个登录?



我会在AD中查看并查看他们的DN究竟是什么,或者看看他们的用户名是否自上次登录以来是否有所改变。



如果它适用于98/100用户,我会倾斜对AD配置/帐户问题与现在追逐代码的对比。



干杯,
Do the users have multiple sign-ons?

I would check in AD and see what their DN actually is, or see if their user name has changed since the last them they logged in.

If it's working for 98/100 users, I would lean towards AD configuration/account problems vs. chasing code for right now.

Cheers,


感谢您的回复,

但我有一个正常运行的应用程序,以及我的appica这不能正常工作。

加上它适用于Firefox,而不适用于Internet Explorer。

我认为这可能是IIS的一个问题。
Thanks for reply,
but I have an application that works correctly, and my appication doesn't work correctly.
Plus it works in Firefox and not in Internet Explorer.
I think it can be a problem about IIS.


我试图使用另一台服务器(网络服务器):

相同的服务器版本,相同的IIS版本。

HttpContext.Current.User.Identity.Name是正确。

我找不到原因。


有人知道告诉我什么吗?
I tried to use another server (web server):
same server version, same IIS version.
HttpContext.Current.User.Identity.Name is correct.
I cannot find the reason.

Does anybody know tell me something?


这篇关于HttpContext.Current.User.Identity.Name的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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