是否存在Context.User.Identity.Name为空的情况? [英] Is there any scenario that Context.User.Identity.Name is empty ?
问题描述
生产环境中是否存在Context.User.Identity.Name为空或空字符串的情况?
I有一个应用程序使用Windows身份验证和LDAP来为我的应用程序验证用户。
由于某种原因,我面临的问题是生产中的AuthenticateUser方法userId的字符串参数,即Context.User.Identity.Name返回空字符串。
上述情况有时只发生在制作中。
现在我的问题是是否有可能Context.User.Identity.Name = string.Empty?
Is there any scenario where Context.User.Identity.Name is a null or empty string while in production environment ?
I have an application which uses an windows authentication and LDAP to authenticate users for my application.
The issue I am facing is in production for some reason the AuthenticateUser Method which take a string parameter of userId i.e. Context.User.Identity.Name is returning empty string.
the above scenario is only occurring sometimes in Production.
Now my question is " Is it possible that the Context.User.Identity.Name = string.Empty?"
推荐答案
请参考下面的内容,可能有用
http://ashomtwit.espace-technologies.com/ 39098955-Request_IsAuthenticated_is_true_but_Context_User_Identit y_Name_is_empty.html [ ^ ] < br $> b $ b
https://social.msdn.microsoft.com/forums/silverlight/en-US/90aace93-629f-497c-bd3d-27f9b27999aa/httpcontextcurrentuseridentityname-is-empty [ ^ ]
http://stackoverflow.com/questions/1571036/httpcontext-current-user-identity-name-is-empty [ ^ ]
Please refer below , may be useful
http://ashomtwit.espace-technologies.com/39098955-Request_IsAuthenticated_is_true_but_Context_User_Identity_Name_is_empty.html[^]
https://social.msdn.microsoft.com/forums/silverlight/en-US/90aace93-629f-497c-bd3d-27f9b27999aa/httpcontextcurrentuseridentityname-is-empty[^]
http://stackoverflow.com/questions/1571036/httpcontext-current-user-identity-name-is-empty[^]
尝试检查如下;
Try to check it as follows;
if (partner != null && partner.Length > 0)
{}
这篇关于是否存在Context.User.Identity.Name为空的情况?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!