Logged In User Information?
Jul 20, 2009
I'm writing software in VB .NET (2005) which uses the Windows user information as login credentials - just the username. I've found Environment.UserName which works for the username (as you would expect).However, I need more information - I need the full name of the user (as shown on the Start Menu). It seems this information is stored... somewhere, as Windows is able to use it for things like permissions on file shares.
View 1 Replies
ADVERTISEMENT
Jul 18, 2011
I'm running an application under an account that is not the account logged-on to the PC.
Within the application I need check if the logged-on user is a member of the Administrators group. Below is the code I'm using. From what I've read, WindowsIdentity.GetCurrent() should return an object associated with the logged-on user. It doesn't, it returns the same information as the call to System.Threading.Thread.CurrentPrincipal. Which is the information associated to the ID running the application, not the logged-on user.
[Code]...
View 8 Replies
Dec 5, 2010
I am using Microsoft visual basic 2010 for a asp.net site using c#.I am using the asp.net configuration for user registration. I have a comments form which I want to appear only if a user is logged in.I now there is a toolbox helper thing called Login View which does exactly what I want but as soon as I put a form inside the code won't compile because it cannot find the textbox fields.
I have the following in NewsArticle.aspx:
<asp:LoginView ID="LoginView1" runat="server">
<AnonymousTemplate>
<div class="postcomment">
[code]....
If I take the form out of asp:LoginView it works fine. Inside I get the following:
Error 2 The name 'txtTitle' does not exist in the current context NewsArticle.aspx.cs 59 53 Figmentville
Error 3 The name 'txtComment' does not exist in the current context NewsArticle.aspx.cs 59 68 Figmentville
View 1 Replies
Dec 12, 2009
(I work on VS 2005 with Access Database and C#)
I have my code as follows:
protected void Page_Load(object sender,
System.EventArgs e)
{
[Code]....
The logged-in 'UserId' and 'UserName' is getting displayed correctly, but now how do I use the string 'lmember' in my 'SELECT' statement when I need to display the related information from the table 'aspnet_Users' for the logged-in user? getting the following select statement:
SelectCommand="SELECT * FROM aspnet_Users WHERE (UserName= ????)"
View 1 Replies
Aug 15, 2011
i have a problem with my project.in one form i have 2 textboxes in one i have displayed the serial number.in the second i want display the current user logged on software.how can i display the current user logged in ????? the code for the serial number is :[code].....
View 2 Replies
May 7, 2009
I keep a Session variable when the user is logged in. So that when the user click on btnLogout it must clear all my sessions and Log the User out for GOOD!!!
It does clear my sessions but if i click the BACK button in IE right after i logged out then i am still logged in! Meaning it goes back to screen where the user was still logged into.
My code on log out
protected void btnLogout_Click
{
Session.Clear();
Session.Abandon();
[Code]....
Is there maybe an option in code i can do that will disable the user from pressing the BACK button in the Web Browzer?
View 4 Replies
Jan 18, 2012
I need to create a spreadsheet of which kit is assigned to which person, within the company.
We have desktops & laptops, for the purpose of this post, we'll say desktops are named DESKTOP then a random 3 digit number (DESKTOP001, DESKTOP002 etc.) and laptops are named LAPTOP then a random 3 digit number (LAPTOP001, LAPTOP002 etc.)
I'm presuming the best way of checking which user uses each workstation would be to check who last logged in to it. doing this for ALL computers in a certain OU (lets say DESKTOP_OU for desktops and LAPTOP_OU for laptops in this example) (either with VB Script or PowerShell I would presume) and to export it to Excel.
View 1 Replies
May 21, 2010
I want to know if its possible to retrieve from a given address (IP) the currently logged on user.
View 5 Replies
May 17, 2010
I'm trying to get the Alias of the logged in user (Active Directory/LDAP environment/Exchange) .
View 8 Replies
Feb 15, 2012
what i want is when the user inputs the username and password, his/her information will be showed in the textbox located at the mainform which shows the users information like where he live and his occupation. how to show users data in the textbox of another form when he/she logged in. im using vb.net and mssql
View 1 Replies
Apr 11, 2011
I have a windows login form, and it checks whether the user name and password match and lets you log in. If I wanted to say pull some information from a dataset later on in the program. How would i pull the data from the specific user that is logged in, rather than all the data from the database.
View 4 Replies
Sep 12, 2010
I have a client/server application running in a windows domain environment, the client application is started at log on by a scheduled task using domain admin credentials, i need to be able retrieve the username of the user who logged onto the workstation but all the methods i have tried returns the user that was used to execute the program.I have tried:
Environment.UserName
System.Security.Principal.WindowsIdentity.GetCurrent().Name
Environment.GetEnvironmentVariable("USERNAME")
All of these return the account i used to run the application, not the user who is logged on.
View 5 Replies
May 28, 2010
HTML
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles start.Click
Dim folderExists As Boolean
[Code]....
above i have a specific username in the little backup script i have created. in this section of the code, if the user selects this particular chkbox then hits "start" it backs up the above loacation to a "server" H.
how do i code it to automatically pull the username and place it where "godboubs" (aka the username) is?
View 17 Replies
Dec 14, 2010
How to retrieve the currently logged in user role name in textbox using vb.net ? iam currently using
TextBox1.Text = Roles.GetRolesForUser(User.Identity.Name)
om page load event but it is highlighted by a blue line in visual studio 2008
View 1 Replies
Jun 9, 2010
I have this code that gives me the user logged on name of a remote computer, but if i run the program in certaing computers, it returns with the error "Not Available Due Restrictions" which is set if the scope cant connect...
why it connects fine in some computers and other not..is there something i have to add to the code for it to run fine in any computer
this is the code
vb.net
Dim connection As New ConnectionOptions
connection.Username = ("ADMIN")
connection.Password = ("something")
[Code]....
View 3 Replies
Jun 8, 2010
For some reason the following code works perfectly fine if a user is logged into a machine but if no one is logged in, I receive the error message "Call was canceled by the message filter. (Exception from HRESULT: 0x80010002 (RPC_E_CALL_CANCELED))" I know it is possible somehow to create the service on the remote machine even if a user is not logged in but what must I change in my code??
[Code]...
View 18 Replies
Oct 27, 2009
I am using VB in VS 2008. I have written a program which loads data into SQL Server nightly. It is a Windows Forms application which runs well from Task Scheduler when a user is logged in. However when I try to run it when there is no user logged in, the program starts but it just sits idle.
[Code]...
View 5 Replies
Aug 3, 2009
How to get userID of current user logged in from server using asp.net vb?
View 2 Replies
May 5, 2011
I have an intranet asp.net application and when a page is loaded, i want to log the IP Address, Computer Name and the Windows Account(from active directory) currently logged into the computer from which the page is being accessed.
So far, Im able to get the IP address and computer name but the windows account, am getting NT AUTHORITYSYSTEM
View 2 Replies
Apr 26, 2010
Is there a way to include a person's logged in user name in an insert statement? Like, how could I detect which user is signed in, and then insert that username into my table in my database?
View 12 Replies
Sep 14, 2009
Can I use vb (API or the framework) to tell if the user is logged in locally or with terminal services / remote desktop.
View 2 Replies
Aug 23, 2011
If I create a scheduled task for my vb.net program, and run it under another user, and it runs when logged off, as long as the user has full rights, will the winforms application be able to call web services over the web?
View 8 Replies
Mar 28, 2009
Is it possible to be able to have a main form load, but then have a logon form load on top of it and the user cannot select anything from the main form until the have logged in.
View 4 Replies
Dec 12, 2010
I am trying to display(in a status strip label) the user name of a user that is currently logged in across multiple forms. The initial form is a log in screen that queries an SQL database for the user name,password,and user type. If the query returns a match,then a different form is displayed based on the user type. How do I retain the user name of the user that is currently logged and display it in the label?
BTW,it's a point of sale program.
View 5 Replies
May 24, 2012
I have a text box where i am entering numbers of double datatype andon the Keytdown event of the textbox some checks take pace and in certain circumstances I want to be able to stop the user from entering other information until they enter the right information in the textbox (where it says right here) . now when I say exit sub the textbox somehow loses focus . but this is not how I want it to be I want the textbox to remain with the focus so the user can change the information . How can i go about this. And the other thing is why is my txtDestPayRate1.Focus() just befor the exit sub not working?
Private Sub txtDestPayRate1_KeyDown1(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles txtDestPayRate1.KeyDown
If e.KeyCode = Keys.Enter Then
[CODE]...
View 2 Replies
Nov 9, 2010
I have computers joined to a domain. I'm writing a desktop application that ask for a username and password to authenticate user against Active Directory.Sometimes, user uses this application on the computer that is not joined to the domain.I'm using .NET 3.5, System.DirectoryServices, and System.DirectoryServices.AccountManagement. Code sample how to authenticate users:
Private Function ValidateExternalUser(ByVal username As String, ByVal password As String) As Boolean
Using context As PrincipalContext = New PrincipalContext(ContextType.Domain, "your_domain_here")
Return context.ValidateCredentials(username, password, ContextOptions.Negotiate)
[code]....
I want to know how to check if user is already logged in on domain computer, then I don't have to ask them log into the application again.
Update:If it can't be done with System.DirectoryServices.AccountManagemen, is there any way to do it?
View 3 Replies
Oct 31, 2011
I wanted to display my current logged user data in my aspx web page.But I am unable to do so. I just can't understand how to call the necessary data. I have used Grid view but I cannot find a query that will give me the details of the current logged user.
Code:
HttpContext.Current.User.Identity.Name
but it gives me an error saying "property access must assign to the property or use its value". I don't know how to tackle this.
View 1 Replies
Jan 20, 2011
I have two textbox and a button .... control on web page, ,,,
database structure...
ID Email Password
1 dd@d.com jhatri00
2 ff@f.com tyyuiioo
i want when i login using texxbox1 and textbox2 then it validate emailid and password if record find .... the it will display the emailid on the each page ........ of the logged in username ..... on everypage ...
View 1 Replies
Jan 22, 2010
I am starting design of a program that needs to run no matter if the user is logged in to the PC or not. So I will be writing it as a VB.Net Service.
As I am not overly familiar with SQL Server Express, is it possible to connect to a local SQL Server Express Instance and access the database from a VB.Net Service while the user is not logged in to the PC?
View 2 Replies
May 24, 2012
My program connects to a Mysql Database. It allow registration and login. I Need this to update the "BankACCid" column(?) in Mysql for the current logged in user.This is the code that doesn't work
MySql Connection
Dim conn As MySqlConnection
conn = New MySqlConnection()
[code]....
View 1 Replies