473,664 Members | 3,028 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

who is logged in?

Hi all
I would like to know who is logged in so the code will run differently
e.g.
if username="user1 " then
end if

how can I tell who is logged in?

TIA
Guy
Dec 26 '06 #1
4 1262
What authentication are you using?

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
"Guy Cohen" <no*****@please .comwrote in message
news:OX******** ******@TK2MSFTN GP02.phx.gbl...
Hi all
I would like to know who is logged in so the code will run differently
e.g.
if username="user1 " then
end if

how can I tell who is logged in?

TIA
Guy


Dec 26 '06 #2
OHM
Response.Write( System.Security .Principal.Wind owsIdentity.Get Current.Name)

--

Best Regards - OHM

http://TrainingOn.net
--------------------------------------------------
"Eliyahu Goldin" <RE************ **************@ mMvVpPsS.orgwro te in
message news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
What authentication are you using?

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
"Guy Cohen" <no*****@please .comwrote in message
news:OX******** ******@TK2MSFTN GP02.phx.gbl...
>Hi all
I would like to know who is logged in so the code will run differently
e.g.
if username="user1 " then
end if

how can I tell who is logged in?

TIA
Guy



Dec 26 '06 #3
I forgot to mention - I am using the login control of course.....
But the info is needed in a page without the login control.

Guy
"Eliyahu Goldin" <RE************ **************@ mMvVpPsS.orgwro te in
message news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
What authentication are you using?

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
"Guy Cohen" <no*****@please .comwrote in message
news:OX******** ******@TK2MSFTN GP02.phx.gbl...
>Hi all
I would like to know who is logged in so the code will run differently
e.g.
if username="user1 " then
end if

how can I tell who is logged in?

TIA
Guy



Dec 26 '06 #4
Guy Cohen wrote:
I forgot to mention - I am using the login control of course.....
But the info is needed in a page without the login control.
Page.User.Ident ity.Name

--

Riki
Dec 26 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
4013
by: mallyonline | last post by:
I last posted to this group about 6 months ago and was very pleased by the excellent response I got and the great help offered to me. I am back this time with another request for your expert help on a bit of ASP code I use on my windows server 2003 with IIS6 machine. I would like the code below to display in different colours depending on the status of the page. I am looking to make the not logged in code appear red and the logged in...
7
6160
by: Tim.D | last post by:
Folks, I did run into a small problem afterall. Running my first SP I am seeing a number of errors in the windows 2k server event viewer. Following is a paste: -- 2004-03-03-15.06.49.967001 Instance:DB2 Node:000 PID:2444(db2syscs.exe) TID:1696 Appid:*LOCAL.DB2.0115C3193403 data management sqldEndNoLogList Probe:1 Database:dbname
8
3235
by: Mike Thomas | last post by:
I have two clients now who want to have an Access 2000 & 2002 application running on NT Server 2000 do some file updating at night when nobody is in the office. I have used Windows scheduler to schedule the apps to start at 4:00 am, but at that time of night, nobody is logged on to the server. Is it possible to get Access to run on a server when nobody is logged on? Many thaks Mike Thomas
8
1853
by: Vince Varallo | last post by:
Hello All, I would like to display all logged on users on a web page. I store each user's name in a session varible, but I don't seem to be able to loop through a sessions collection to view all sessions. Has anyone else figured this out? Thanks in advance, Vince
6
4596
by: John Dalberg | last post by:
I want to automate the process of logging into an intranet. I want to pull out the username of the Windows user logged into the machine running the browser and use the username in my app. How can I get the logged in username? Do I have to disable the anonymous access in IIS? I rather not because the site is running under a certain domain user which has access to certain folder and network shares and the site needs thsi access for reading...
11
4647
by: Alan Silver | last post by:
Hello, I am just planning a new ASP.NET site, and wondered about the best way to handle the following common scenario... The site has the option that registered users can log in and will have access to extra features. The log in form is a simple username/password affair that will appear in the margin of every page if they aren't yet logged in. If they are logged in, their user name will be shown, along with a button to log out.
40
2963
by: Jeff | last post by:
I have a system on a network and want to determine if anyone is currently connected to the back-end files. An interesting twist is that I have noticed that some users can be connected (have the front end open at the first form) and even though this links to the back-end files, there are no ldb files created. This is so I know when it is safe to compact the back-end files without going round to make sure everyone is logged off. User...
4
10116
by: Jarod_24 | last post by:
How do a windows-service detect whether a user is logged or not on a computer? So far i've found nothing in the windows api or any code examples that will allow me to figure this out. The solution i have today is to use Diagnostics.Process.GetProcesses and then iterate through the array i get and look for explorer.exe Explorer.exe is not loaded when a user is logged out of a computer. I found this on winlogon states:...
5
1957
by: jefftyzzer | last post by:
Friends, Three questions for you: 1. Are CREATE INDEX statements against DGTTs logged? 2. While running the SP recently, it died with a "transaction log filled" (SQL0964C) message while it was UPDATEing a NOT LOGGED DGTT. This is baffling and seems
2
2552
by: Keith G Hicks | last post by:
asp.net 2.0 I have set my web.config as follows: <forms timeout="30"/(I know that's the default but I may chang it so the line's in there) I also have a few cookies I'm setting on my login page to hold the UserName, UserID and the value of another field in my db so that as the user is navigating around the site I can test for certain things. All that seems to be fine. I've set the cookies to expire in 30 minutes also to coordinate...
0
8437
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8348
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8636
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7375
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6187
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5660
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4185
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2003
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1759
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.