473,386 Members | 1,673 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,386 software developers and data experts.

Retreive windows Logged in UserName and Password

Hi,
I have an application in VB.NET windows application, wherein the
administrator has the option to change the authentication mode ie., whether
the application should work as a normal database authentication or the
windows based authentication mode.
If the administrator sets the application authentication mode to windows
based, then the application has to verify the windows logged in username and
password and then allow the user to use the application. I am not able to
retreive the windows logged in UserName and Password in VB.NET. In VB 6.0, I
am able to retreive the windows logged in UserName but not the password.
Can anyone help me in this.
Thanks
Sudhakara.T.P.
Jan 13 '06 #1
1 10119
Hi,

To know the user you can use System.Environment.UserName. You can´t get the
password of the user for obvious reasons, but there are APIs (not sure if
managed APIs) to try to logon a user in a domain or to get if the user is
logged in a domain. See:

http://msdn.microsoft.com/library/de...ion_portal.asp

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster:
http://www.mztools.com
"Sudhakara.T.P." <Su*********@discussions.microsoft.com> escribió en el
mensaje news:63**********************************@microsof t.com...
Hi,
I have an application in VB.NET windows application, wherein the
administrator has the option to change the authentication mode ie.,
whether
the application should work as a normal database authentication or the
windows based authentication mode.
If the administrator sets the application authentication mode to windows
based, then the application has to verify the windows logged in username
and
password and then allow the user to use the application. I am not able to
retreive the windows logged in UserName and Password in VB.NET. In VB 6.0,
I
am able to retreive the windows logged in UserName but not the password.
Can anyone help me in this.
Thanks
Sudhakara.T.P.

Jan 13 '06 #2

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

Similar topics

14
by: John Davis | last post by:
Anyone knows how to create the username/password authorization dialog in ASP? Thanks, John
8
by: Noel Volin | last post by:
Anyone who can help here is much appreciated. I am trying to programmatically log onto a website. I am using the code provided in VS for the AuthenticationManager Class example (...
1
by: thoducng | last post by:
I am writing some code to access share folder on a remote network. DirectoryInfo dicInfo = new DirectoryInfo("remoteNetwork\shareFolder"); if (dicInfo.Exists) { //application code...
1
by: kieran | last post by:
Hi, I am working with users on an intranet. I now want to open a URL so that instead of the user entering their NT login and password, it automatically enters that user's details based on that...
1
by: Scott Lezberg \(Deltek\) | last post by:
Does anyone have any sample code on how to change a username/password for an existing Windows service? Thanks Scott
2
by: jdstroud | last post by:
I have an asp.net application on our intranet, and I am trying to use windows authentication. My problem is that I would like to get the user's credentials without having the login / password...
2
by: VMI | last post by:
How can I add username/password authentication on my site? I have asp.net 2.0. If the user's not logged in, that page should be displayed when I try to go to any of the pages. Also, how can I add...
1
by: rahulya007 | last post by:
Hi, I am trying to implement single sign-on like feature in my website (running on IIS and ASP). A windows Authenticated logged in user will be directed to a welcome screen directly without asking...
0
by: =?Utf-8?B?TW9uaXF1ZQ==?= | last post by:
I just reinstalled IIS as I worked with wamp before and yet I didn't find out how to have a php and a asp server working the same time on a computer. (I had to uninstall the IIS to get wamp at...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
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...

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.