473,563 Members | 2,762 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Getting WIndows Login Name From ASP.NET

Ben


Hi All,
I would like to get the windows logon name for a .net intranet app.
I have tried
Page.User.Ident ity.Name(),
Request.ServerV ariables["LOGON_USER "].ToString(),
Request.ServerV ariables["REMOTE_USE R"].ToString();
They have all returned null so far.

I have windows authentication enabled in web.config.(Cod e is running on
a Dev box & not on the local machine)

Please Help !

Thanks in advance,
Ben

*** Sent via Developersdex http://www.developersdex.com ***
Oct 10 '06 #1
5 2844
Uncheck "Anonymous Access" and ensure that "Integrated " is checked in the
Directory Security tab in IIS Manager for the site.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Ben" wrote:
>

Hi All,
I would like to get the windows logon name for a .net intranet app.
I have tried
Page.User.Ident ity.Name(),
Request.ServerV ariables["LOGON_USER "].ToString(),
Request.ServerV ariables["REMOTE_USE R"].ToString();
They have all returned null so far.

I have windows authentication enabled in web.config.(Cod e is running on
a Dev box & not on the local machine)

Please Help !

Thanks in advance,
Ben

*** Sent via Developersdex http://www.developersdex.com ***
Oct 10 '06 #2
Ben

Thanks Peter ! That worked like magic. One more question - if this .net
app were to be used from intranet & internet, would disabling anonymous
access be a problem?Any other points to keep in my mind shud this
situation arise?

Thanks !
*** Sent via Developersdex http://www.developersdex.com ***
Oct 11 '06 #3
If your app is going to be visited from the internet, the visitors would not
be transmitting their windows login credentials that they get when they login
to their machine in the morning from your local internal network, so yes, it
would be a problem. You might have to offer some sort of mixed mode
authentication. Experiment and find out.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Ben" wrote:
>
Thanks Peter ! That worked like magic. One more question - if this .net
app were to be used from intranet & internet, would disabling anonymous
access be a problem?Any other points to keep in my mind shud this
situation arise?

Thanks !
*** Sent via Developersdex http://www.developersdex.com ***
Oct 11 '06 #4
The internet site that redirects has a login so I am using those
credentials instead for user validation which seems to workfine for
now.

Is there a way to get the name of the person logged in & not just the
logon name
(Ben Arthur - Full Name Vs arthurb - Logon name)

Any help is greatly appreciated.
Thanks,

Ben
Peter wrote:
If your app is going to be visited from the internet, the visitors would not
be transmitting their windows login credentials that they get when they login
to their machine in the morning from your local internal network, so yes, it
would be a problem. You might have to offer some sort of mixed mode
authentication. Experiment and find out.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Ben" wrote:

Thanks Peter ! That worked like magic. One more question - if this .net
app were to be used from intranet & internet, would disabling anonymous
access be a problem?Any other points to keep in my mind shud this
situation arise?

Thanks !
*** Sent via Developersdex http://www.developersdex.com ***
Oct 19 '06 #5
Ben


Any suggestions ? Anyone ?

*** Sent via Developersdex http://www.developersdex.com ***
Oct 20 '06 #6

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

Similar topics

1
3751
by: Toralf Lund | last post by:
Is there any way at all I can get a user's login name from within JavaScript on Unix/Linux with Mozilla browser. If not, how about the home directory? I know there are *usually* variables accessible via navigator.preferences() that contain the info, but I have found none that can *always* be expected to exist. - Toralf
2
512
by: John | last post by:
Hi How can I get the currently logged in username from windows 2000/xp? Thanks Regards
5
8120
by: Mike Turco | last post by:
(This was also posted to comp.database.ms-access before I realized this was the hep group.) Lets say that my WinXP computer has two users: Michael and Kathryn. One or the other logs into the computer and opens up an Access database (I happen to be using 2002). There is no security on the database -- just click on the shortcut and you're in....
2
11620
by: HK guy | last post by:
How to use C# to get the login name of the windows? Thank you.
4
1603
by: Dave | last post by:
Greetings, I have a web application that will be hosted on our intranet. I would like to determine, via code the user's windows login name and domain in the following format: DOMAIN\loginname Is this possible? Thanks, -Dave
8
2419
by: Mike P | last post by:
How do you get the Windows login and password of the person who is logged in? Is it possible? *** Sent via Developersdex http://www.developersdex.com ***
12
11573
by: satas | last post by:
Hello. Is there any way to find out Windows Login Name in such browsers like Firefox? I know that code below allows to do this in IE : function show_win_login() { var usern var WshNetwork=new ActiveXObject("WScript.Network") usern=WshNetwork.UserName; alert(usern)
3
2218
by: =?Utf-8?B?Sm9zZXBo?= | last post by:
In a Winform application using VB.Net is there a way to capture the user's Windows login name? Any help would be greatly appreciated, thanks.
0
7664
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...
0
7583
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...
0
7885
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7638
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5213
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...
0
3642
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...
1
2082
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1198
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
923
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...

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.