Hi,

I am sending username and pwd in usernametoken in SendHashed format,
While in web service, i am getting Nothing in that UsernameToken's
Password.

If send it as SendPlainText, then in my web service, i get a hashed pwd.
Why this is So?

How to get Hashed pwd stored in UsernamToken in web service?

My web service code is,


Try
If IsNothing(ctxt) Then
Throw New ApplicationException("Only SOAP requests are
permitted."
End If

flg = False

For Each tkn In RequestSoapContext.Current.Security.Tokens
If TypeOf tkn Is UsernameToken Then
Dim user As UsernameToken = CType(tkn, UsernameToken)
Dim pwd As String =
FormsAuthentication.HashPasswordForStoringInConfig File("Admin1", "SHA1")
If user.Password = pwd Then
flg = True
Return "Hello " & user.Username
End If
End If
Next

If flg = False Then
Return "Hello Liar"
End If

Catch ex As SoapException
Throw ex
Catch ex As Exception
Throw ex
End Try



*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***