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

Test username and password

jnc
Hey everyone,

I have written an app which needs to install and uninstall windows services
periodically. I have provided an interface in which the user can enter the
user account the service should run under and also the password.

What I would like to be able to do is test the password is correct before
applying it to the windows service. Is there any easy way to do this,a
pointer to a code example in vb.net or c# would be great.

Thanks for you help.

Jim

Jul 21 '05 #1
4 1663
Jnc.

Any reason that you don't use the windows "principal" feature (by instance
the InRole) from dotNet

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

I hope this helps,

Cor
Jul 21 '05 #2
jnc


"Cor Ligthert" wrote:
Jnc.

Any reason that you don't use the windows "principal" feature (by instance
the InRole) from dotNet

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

I hope this helps,

Cor
Not sure how this helps me to test the password?

Jul 21 '05 #3
You can use the Win32 API function CredUIConfirmCredentials for this. This
link shows you how:
http://msdn.microsoft.com/library/de...redentials.asp

HTH, Jakob.

--
http://www.dotninjas.dk
"jnc" wrote:


"Cor Ligthert" wrote:
Jnc.

Any reason that you don't use the windows "principal" feature (by instance
the InRole) from dotNet

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

I hope this helps,

Cor
Not sure how this helps me to test the password?

Jul 21 '05 #4

Not sure how this helps me to test the password?


You don't need that, because the user is already loged in with that.

Cor
Jul 21 '05 #5

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

Similar topics

8
by: Reply Via Newsgroup | last post by:
Folks, I am using Apache 1.3.x with PHP 4.3.x and MySQL v4. Short question: Before I put my web form available on the internet, how can I test it from mis-use in such that special characters...
5
by: Joeri KUMBRUCK | last post by:
Hello, I'm trying to create an ASP page where users can type in a username and password, and these credential should be checked with active directory. If username and password are correct, the...
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...
3
by: jab3 | last post by:
Hello. I"m new to this group, and to JavaScript in general, so please forgive me if I breach local etiquette. I'm trying to implement some client-side 'dynamic' validation on a form. I'm having...
15
by: Eugene Anthony | last post by:
Is this method of validation for password and username considered to be secured. In my previous post I was given a solution that uses command object and the values are parsed by parameters. But the...
0
by: Stevns | last post by:
Hi Folks, Im trying to make a little hack that helps users logon to different servers on several domains. Now i need to test the password age of a user on a server. I got the usr/pwd/svr...
11
by: Kevin O'Brien | last post by:
Hello, I am creating a sign on screen for my application in which I want to store the username and password in a database table. I was thinking of putting a combo box connected to the database...
5
by: libra786 | last post by:
I have created a blog and have added a login box which prompts the user for login and id before posting- The username and password have been stored in the database, however when i enter the username...
0
by: roamnet | last post by:
hi i created database file with .mdf extention ,sql server as a source and use grid view to display data there're no problem in data retrieve and display,but i want to edit it or insert new...
7
by: Dhiru1009 | last post by:
Hi guys, I need help with validating the user to see if the username exists in database table or not. Here is my code. default.php <form name="form1" action="authenticate.php">
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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...
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
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...

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.