Using Windows Authentication in Web Service

Zvi

Member
Joined
Sep 30, 2006
Messages
16
Programming Experience
Beginner
scenario:

1. I have a windows application (VB.NET) that will be used by workers who are all on a network. Each user of course, has his own username and password that he uses to log into windows on the network.

2. I have a MySql database Online that has a users table and a data table. The user table only has 3 fields, user_id, user_name, user_password.

3. I made a Web Service that will be in charge of getting data from the Online database to the users application, as well as sending new data TO the database from the users application and updating the database. (The Web Service works already. It connects to the database and displays the data in the application, but it doesn't use any authentication yet. It just displays ALL the data and users)

4. I don't want the users to have to use user names or passwords to log into the application.


Now the questions:

1. I need the Web Service to be able to detect the users WINDOWS LOGIN NAME and PASSWORD (Is this the meaning of Windows Authentication...?) and check to see if the user exists in the database. (If not, it will create a new user with his user name and password from his network login)

2. I need the webservice to know which user has opened the application so it will send him ONLY HIS data. (Of course, if I will know how to do question 1, this will be easy)

So my basic question is... What does Windows Authentication in the web.config file mean? Does this mean that the Web Service is able to read the Windows Username and Password of whom ever is calling the Web Service, and do stuff with it? (Like saving it for a new user)? If not, is there any way to do what I need in question 1, or will I HAVE to make a "registration" page and they will have to "register" themselves the first time they use the application? (I'd rather not).

Thanks!
 
Back
Top