rocky050371
asked on
WSE1.0 to WSE3.0
I am upgrading a project from WSE 1 TO 3, I have the following code on the client
Dim proxy As New TestWS.DataServiceWse
proxy.Url = WSLocation
Dim reqCtx As SoapContext = proxy.RequestSoapContext
Dim tok As New UsernameToken(EmailAddress , Password, PasswordOption.SendHashed)
reqCtx.Security.Tokens.Add (tok)
reqCtx.Security.Elements.A dd(New Signature(tok))
Return proxy
And on the web service
Private Function Authenticater() As Boolean
Dim requestContext As SoapContext = HttpSoapContext.RequestCon text
Dim userToken As UsernameToken
If requestContext Is Nothing Then
Throw New SoapException("Only SOAP requests are accepted", _
SoapException.ClientFaultC ode)
End If
For Each userToken In requestContext.Security.To kens
If TypeOf userToken Is UsernameToken Then
If userToken.PasswordOption = PasswordOption.SendHashed Then
Return True
Exit For
Else
Throw New SoapException("The password must be hashed", SoapException.ClientFaultC ode)
End If
End If
Next
End Function
does anyone before I upgrade whether this will work with 3?
Dim proxy As New TestWS.DataServiceWse
proxy.Url = WSLocation
Dim reqCtx As SoapContext = proxy.RequestSoapContext
Dim tok As New UsernameToken(EmailAddress
reqCtx.Security.Tokens.Add
reqCtx.Security.Elements.A
Return proxy
And on the web service
Private Function Authenticater() As Boolean
Dim requestContext As SoapContext = HttpSoapContext.RequestCon
Dim userToken As UsernameToken
If requestContext Is Nothing Then
Throw New SoapException("Only SOAP requests are accepted", _
SoapException.ClientFaultC
End If
For Each userToken In requestContext.Security.To
If TypeOf userToken Is UsernameToken Then
If userToken.PasswordOption = PasswordOption.SendHashed Then
Return True
Exit For
Else
Throw New SoapException("The password must be hashed", SoapException.ClientFaultC
End If
End If
Next
End Function
does anyone before I upgrade whether this will work with 3?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER