473,324 Members | 2,501 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,324 software developers and data experts.

user name, password validation

hi all,
I am trying to validate a user name and password using server 2000 domain
validation. so users would use their normal ID and passwords to login.
does anyone know how to do it or have any examples?

thanks a lot
Jul 21 '05 #1
1 3332
Gav
In C#:
include:

using System.Runtime.InteropServices;

namespace blah blah....
{
public class blah blah....
{
[DllImport("advapi32.dll")]
public static extern bool LogonUser(String lpszUsername, String
lpszDomain, String lpszPassword, int dwLogonType, int dwLogonProvider, ref
IntPtr phToken);

[WebMethod]
public bool Login(string sUserName, string sPassword, string
sDomain)
{
IntPtr tokenHandle = new IntPtr(0);
bool bLogonReturn= LogonUser(sUserName, sDomain, sPassword, 2,
0, ref tokenHandle);
return bLogonReturn;
}
}
}
Hope this helps
Regards
Gavin

"hkadhim" <ha******@canada.com> wrote in message
news:O5**************@TK2MSFTNGP09.phx.gbl...
hi all,
I am trying to validate a user name and password using server 2000 domain
validation. so users would use their normal ID and passwords to login.
does anyone know how to do it or have any examples?

thanks a lot

Jul 21 '05 #2

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

Similar topics

3
by: mo | last post by:
The code I've pasted below is taken directly from Microsoft's site at http://support.microsoft.com/default.aspx?scid=kb;EN-US;308157 As far as I can tell the error is raised on this line: conn...
8
by: DB2-newbie | last post by:
As a newbie to DB2 I have a strange problem on a zSeries linux box I hope someone can answer. I have created a linux user, user=mytest pw=mytest who is the instance owner and has created a...
1
by: hkadhim | last post by:
hi all, I am trying to validate a user name and password using server 2000 domain validation. so users would use their normal ID and passwords to login. does anyone know how to do it or have any...
7
by: Marc Solé | last post by:
Hello all, I have a web application that runs in a server and makes a Windows user validation to loggin. My question is, how can I get that loggin user, password and domanin to use it in my...
4
by: joesin | last post by:
I recently found a vulnerability on my website that allowed sql injection. I have been trying to write some code that would clean user data but have been running into problems. The validation still...
3
by: Dmitry | last post by:
I am trying to figure out how to pass set of credentials to System.IO Challenge is: App is running under one set of credentials, but via GUI user have a chance to enter another set. I would like...
8
by: ajos | last post by:
hi frnds, im trying to convert my servlets database configuration from ms access to mysql database.however im getting some error like no driver found exception. to verify this error ive...
14
by: Mithunshankar | last post by:
Please could some one provide me the code to validate the user name and password fields using Vb for MS access. Fields :: User name :: text box Password :: text box Login :: button The...
2
by: AAaron123 | last post by:
I think I can do this but can't seem to get it to work. Can I add a few lines to my web.config to allow username ABC to login with password QWERTYU$$ and role Administrator? I'm using...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.