0

I'm using a Webservice on which im using SOAP Headers. I need to validate the SOAP Header userName and Password from the DataBase. Is it possible to achieve it??

The way im currently working is

if (AuthenticateUser.UserName == "smilu1" && AuthenticateUser.Password == "smilupass")
{ /*mycode*/  }

In this you can see I have hard coded the UserName and Password. I don't want to work like this. Instead I need to access it from the DataBase so that I will have full control on it.

Is this possible to do??

smilu
  • 859
  • 7
  • 30
  • 53

1 Answers1

1

Create a DB and put in a table a UID (PK), the login and the password.

Get the password from the DB for the login mentionned.

If no row was returnerd = user not found

if there is a row, check the password with the "AuthenticateUser.Password".

After success, you should stock the password as a hash in the DB.

Your problem here is not the SOAP HEADER but the DB.

(Sorry i'm not english)

kinaesthesia
  • 703
  • 6
  • 27