user-identification

Environment.UserName returning application pool name instead of username

断了今生、忘了曾经 提交于 2020-01-22 19:26:40
问题 The following line Environment.UserName In debug mode in visual studio returns the identity of the user like I need. Then when I set up my site in IIS and run the code the same line returns the name of the application pool which the site uses. How can I get it to still return the user name ? 回答1: Try something like this: if (System.Web.HttpContext.Current.User.Identity.IsAuthenticated) { string username = System.Web.HttpContext.Current.User.Identity.Name; } Important note: You need to

Environment.UserName returning application pool name instead of username

僤鯓⒐⒋嵵緔 提交于 2020-01-22 19:26:33
问题 The following line Environment.UserName In debug mode in visual studio returns the identity of the user like I need. Then when I set up my site in IIS and run the code the same line returns the name of the application pool which the site uses. How can I get it to still return the user name ? 回答1: Try something like this: if (System.Web.HttpContext.Current.User.Identity.IsAuthenticated) { string username = System.Web.HttpContext.Current.User.Identity.Name; } Important note: You need to

Get identity of logged in Visual Studio user from extension

我们两清 提交于 2020-01-03 04:24:09
问题 I'm developing a visual studio 2015 extension and I'm looking to get the identity of the user who's logged into the IDE (different to the user logged in to windows, or running devenv). I can't figure out where (or if) I can get that information. It doesn't appear to be in the DTE object anywhere and googling around hasn't helped. 回答1: Just the username string username = System.Environment.UserName; or string adName = System.Environment.UserDomainName; Full UserPrinciple System

How can I determine a user_id based on an email address in App Engine?

梦想与她 提交于 2019-12-17 15:36:42
问题 The newest App Engine SDK (1.2.1) has an API call to compute an ID for a user account based on his email address. (The ID remains the same even if the user changes his address later.) See this question about unique, opaque user IDs for information. However, I have a problem with this API call. user_id() works for logged-in users (i.e. from users.get_current_user) , but it returns None for objects created by the users.User() constructor.** What gives? For example, using the excellent App

Passing Windows User Id as parameter to SQLDataSource gives databinding exception

女生的网名这么多〃 提交于 2019-12-13 21:32:59
问题 First question is, Am I on the right path?.ıs there a better way to pass it as parameter? If I am on the right path, please show me how can I solve the below error. The following solution does not help me with this problem: HTTPContext.Current.User.Identity.Name not working inside a control? My code: <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MyDbConn %>" SelectCommand="SELECT id, Bookname, RequestType, Requestor, RequestDate FROM Requests

Get identity of logged in Visual Studio user from extension

╄→гoц情女王★ 提交于 2019-12-07 07:37:39
I'm developing a visual studio 2015 extension and I'm looking to get the identity of the user who's logged into the IDE (different to the user logged in to windows, or running devenv). I can't figure out where (or if) I can get that information. It doesn't appear to be in the DTE object anywhere and googling around hasn't helped. Just the username string username = System.Environment.UserName; or string adName = System.Environment.UserDomainName; Full UserPrinciple System.DirectoryServices.AccountManagement.UserPrincipal.Current Most the normal .net methods for getting users from system or

Should I use ObjectID or uid(implemented by myself) to identify user?

冷暖自知 提交于 2019-12-02 12:32:40
问题 I am new to mongodb and database. Implement a function to make uid and use the local ObjectId . Which is better? 回答1: You should leave ObjectID generation to the clients/drivers. This makes sure that generated IDs are unique among many things, such as time, server and process. Using the standard ObjectID also means that methods implemented by drivers (such as getTimestamp()) work. However, if you are thinking of using your own type of ID for the _id field (ie, not the standard ObjectID type),

Should I use ObjectID or uid(implemented by myself) to identify user?

微笑、不失礼 提交于 2019-12-02 04:54:01
I am new to mongodb and database. Implement a function to make uid and use the local ObjectId . Which is better? You should leave ObjectID generation to the clients/drivers. This makes sure that generated IDs are unique among many things, such as time, server and process. Using the standard ObjectID also means that methods implemented by drivers (such as getTimestamp()) work. However, if you are thinking of using your own type of ID for the _id field (ie, not the standard ObjectID type), then that makes a viable choice. For example, if you want to store information about a twitter user, then

Why does iOS get a new identifierForVendor when app updates?

二次信任 提交于 2019-11-28 18:26:05
Every time my app is updated from the App Store some small number of the users get a new identifierForVendor for some reason. My users don't sign up or login. They are all anonymous so I need to separate them through their vendor IDs. I've considered that there could've been insufficient space on some devices, resulting in the app being deleted and reinstalled, but that's not the case since in the last update a friend of mine had over 2GB of empty space. I know that the identifierForVendor is changed for a user who deletes and reinstalls the app. But that's not the case here, as the app is

Prevent users from starting multiple accounts?

六月ゝ 毕业季﹏ 提交于 2019-11-28 15:35:52
I know that in the end it, can't be done. But, what are the options to: a) limit the options for persons to create multiple accounts, b) increase the chance of detecting multiple accounts / person for a blog-like web service? (people can sign up for their own blog) Update: I think the 'limit the options' has been answered nicely. (there is no reliable method, but we can raise the bar) However, I would still like to know what other options there are to detect multiple accounts? I'm assuming you're talking about a free service? I can't think of any ways that don't either have serious drawbacks