问题描述
我正在尝试使用'MsgBox(User.Identity.Name)'来显示MessageBox中的当前Windows用户。出现的MessageBox显示App_Web_1gu0lxe5作为标题,消息为空。换句话说,我无法在输出中获得当前Windows用户。
我使用的是Windows 8.1 Enterprise,64位操作系统,Microsoft Visual Studio 2012 ,Visual Basic是编程语言,我正在尝试开发Web应用程序。
当我在运行Windows 7 Enterprise,Service的机器上运行相同的代码时打包1,64位操作系统代码产生所需的结果。
任何想法可能导致问题的原因是什么?
I am trying to use 'MsgBox(User.Identity.Name)' to show the Current Windows User in a MessageBox. The MessageBox that appears shows "App_Web_1gu0lxe5" as the Title and Message is Empty. In other words I am not able to get the Current Windows User in the Output.
I am using Windows 8.1 Enterprise, 64-bit Operating System, Microsoft Visual Studio 2012, Visual Basic is the Programming Language and I am trying to develop a Web Application.
When I am running the same code on a Machine running "Windows 7 Enterprise, Service Pack 1, 64-bit Operating System" the code produces the desired result.
Any Idea what could be the cause of the Problem?
推荐答案
这篇关于无法在ASP .NET中使用“User.Identity.Name”获取Windows用户名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!