Windows用户全名现在返回用户ID而不是名称 [英] Windows User FullName is now returning the user id instead of the name

查看:123
本文介绍了Windows用户全名现在返回用户ID而不是名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

生产型LS应用程序中刚出现一个涉及用户名的问题.我们处于AD环境中,该应用程序正在使用Windows身份验证.仅允许在应用程序的用户"屏幕中指定的用户.

An issue just popped up in a production LS application involving the name of a user. We are in a AD environment, and the application is using Windows authentication. Only users who are specified in the Users screen in the app are allowed.

对于我们的实体之一(请求"),我们在称为关联"的代码中填充一个字段.加载查询时:

For one of our entities ("Request"), we populate a field in code called "Associate" when a query is loaded:

Request.Associate = Application.User.FullName;

这用于返回AD中称为显示名称"的内容.三天前,在我们的生产环境中,此代码开始返回与Application.User.Name相同的代码:类似于"mydomain \ myuserid".

This used to return what in AD is called "Display Name". Three days ago, in our production environment, this code started returning the same as Application.User.Name: something like "mydomain\myuserid".

在我的VS2012开发环境中不会发生这种情况.

This doesn't happen in my VS2012 development environment.

我查看了服务器,看是否已经应用了任何服务器补丁,但事实并非如此.

I've looked over the server to see if any server patches might have been applied, but that's not it.

我知道这是一个远景,但我想我应该把它扔出去.

It's a long shot, I know, but I thought I'd throw it out there.

谢谢!

推荐答案

贝尔维格,

您是说Application.User.FullName返回VS2012中的用户ID吗?它只是发生在VS2012调试环境中吗?我使用VS2012创建一个测试LightSwitch应用程序,并监视Application.Current.User.FullName和Application.Current.User.Name 如下图.它们都返回用户名,而不是用户ID.请创建一个新的测试项目以检查是否存在相同的问题.

 
最好的问候,
Weiwei

Do you mean the Application.User.FullName returns the user id in VS2012? Does it just happened in VS2012 debug environment? I create a test LightSwitch application with VS2012 and monitor the Application.Current.User.FullName and Application.Current.User.Name as below image. Both of them return the user name, not user id. Please create a new test project to check it has the same problem.

 
Best Regards,
Weiwei


这篇关于Windows用户全名现在返回用户ID而不是名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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