我如何找出我的asp.net应用程序运行的用户? [英] how do i find out what user my asp.net application running as ?
本文介绍了我如何找出我的asp.net应用程序运行的用户?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
早上好,先生,
请回复我。
解决方案
< blockquote>
你可以使用 Page.User.IsInRole
功能。
查看以下链接。
HttpContext.Current.User.IsinRole返回false [ ^ ]
RolePrincipal.IsInRole Method [ ^ ]
ASP.NET成员资格,表单身份验证,页面.User.IsInRole(u ser) [ ^ ]
如何编写一个检查的asp.net(c#)程序管理员或用户当前是否已登录? [ ^ ]
基于用户的重定向角色? [ ^ ]
希望它有所帮助。
问题不明确。对于环境用户,您可以使用Environment.UserName并检查这是否是您想要的。
good morning sir ,
please replied to me.
解决方案
Hi,
you can make use ofPage.User.IsInRole
function.
check below links for that.
HttpContext.Current.User.IsinRole returns false[^]
RolePrincipal.IsInRole Method[^]
ASP.NET Membership, Forms Authentication, Page.User.IsInRole("user")[^]
How to write a asp.net (c#) program that checks the Admin or User are currently logged in?[^]
redirect user based on Roles?[^]
Hope it helps.
Question is not clear. For environment user you can useEnvironment.UserNameand check if that is what you want.
这篇关于我如何找出我的asp.net应用程序运行的用户?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文