473,398 Members | 2,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

keeping track of user in a Windows App

23
I know in ASP.NET, I can use the User.Identity to keep track of the logged in user. How can I accomplish the same task with a windows app short of passing the id to each form.

Thank you in advance!
Apr 21 '07 #1
3 1197
Try this

Imports System.Security.Principal

Dim CurIdentity As WindowsIdentity
CurIdentity = WindowsIdentity.GetCurrent()
login_name = CurIdentity.Name
Apr 21 '07 #2
LLM
23
I want to pull it from a login window and the database. Some may not be on a domain or have a user name to track. But if I log them in via a form and comparing against the database, how can I store that user ID and the fact that they are logged in?
Apr 21 '07 #3
LLM
23
Try this

Imports System.Security.Principal

Dim CurIdentity As WindowsIdentity
CurIdentity = WindowsIdentity.GetCurrent()
login_name = CurIdentity.Name

To be more explicit, I want to know if I can store their user ID in a way that I can get to it from every form? I need to store their userid every time something is written to the database on every form.

Do I have to pass it to each form or is there a way I can store it for the entire app and retrieve it from anywhere?
Apr 21 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Astra | last post by:
Hi All I've noticed on quite a few ASP sites that when they have a 'MyAccount' section they transfer the site to https and then when you have logged into your account successfully and gone back...
2
by: Colin Steadman | last post by:
Suppose you have a site structure that looks like this: |--Countries.asp | | |--Region.asp | | |--Cities.asp | | |--Population.asp
2
by: Sandman | last post by:
Just looking for suggestion on how to do this in my Web application. The goal is to keep track of what a user has and hasn't read and present him or her with new material I am currently doing...
1
by: Joshua Russell | last post by:
I'm writing some software that opens multiple instances of a single class in new threads. I need a way of keeping track of all these class instances in some kind of collection. I'm basicaly writing...
9
by: Alfred Taylor | last post by:
I'm testing the waters of n-tier development and I ran into a scenario that I'm not sure what the best solution would be. I have a Company object which contains a collection of contacts retrieved...
0
by: John | last post by:
Hi all, What methods are used to keep track of when dynamic user controls must be loaded and when not? Regards John.
2
by: metaperl | last post by:
I'm actually taking Microsoft's 2779 and just finished a lab where we kept track of our changes to the database. However, I'm not happy with the scripts interface because it does not tell me the...
2
by: De_Cisse | last post by:
Hi all, I'm working on an application in which I already make some preparations to be able to work in a frontend and backend database, even if this isn't the issue a this moment. I'm using VBA...
10
by: Karlo Lozovina | last post by:
Hi, what's the best way to keep track of user-made subclasses, and instances of those subclasses? I just need a pointer in a right direction... thanks. -- Karlo Lozovina -- Mosor
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.