Upgrading WSE 1.0 to WSE 3.0



Guys, I have the following code in an app using WSE 1.0 I would like to move
to WSE 3.0 and VS 2K5 as we are in the early stages of development of the
application and makes more sense to upgrade now rather than later. I'm
having difficulties understanding the new WSE 3.0 model and am finding it
difficult to see how to upgrade. The area that I would like some help with
is as follows:

Public Function GetProxy() As OnCoverWS.DataServ1Wse
Dim proxy As New OnCoverWS.DataServ1Wse
proxy.Url = ConnectionString
Dim reqCtx As SoapContext = proxy.RequestSoapContext
Dim tok As New UsernameToken(UserName, Password, PasswordOption.SendHashed)
reqCtx.Security.Tokens.Add(tok)
reqCtx.Security.Elements.Add(New Signature(tok))
Return proxy
End Function
This function takes a username and password and passes it to the webservice
where I implment IPassword and call the username & paswword from the
database to compare the two. In the above code I am unable to find the
RequestSoapContext or its new equivalent I also have problems with the
userTokenName section as well.

Dim requestContext As SoapContext = HttpSoapContext.RequestContext
Dim userToken As UsernameToken
Dim returnValue As String
'check the context of the soap meesage
If requestContext Is Nothing Then
Throw New SoapException("Non-Soap Message", SoapException.ClientFaultCode)
End If
'find user in header
For Each userToken In requestContext.Security.Tokens
If TypeOf userToken Is UsernameToken Then
If userToken.PasswordOption = PasswordOption.SendHashed Then
Return True
Exit For
Else
'throw any errors to the caller
Throw New SoapException("Password must be hashed",
SoapException.ClientFaultCode)
End If
End If
Next

This function is in the webservice and is called each time a function of the
webservice is called to ensure that the user is a valid user. I need to know
how I would go about changing this or should I be doing it different in
WSE3.0?

A little help would be appreicated thanks.

Duncan


.



Relevant Pages

  • Re: Usernametoken cant beused inweb services that are invoked bywebcl
    ... you still use the built-in username token manager which can only handle windows accounts - you have to register your own in web.config ... Dim aa As String Dim bb As String ... SoapException("Missing security token", SoapException.ClientFaultCode) ... apEnvelope envelope) at ...
    (microsoft.public.dotnet.security)
  • Re: WSE 3.O Web Service with ASP.Net Client using VB.Net
    ... <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"</a>;> ... ''' Constructs an instance of this security token manager. ... Dim principal As GenericPrincipal = New ... There is a logon page which takes a Username and Password, ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Return Value?
    ... Public Class UserDetails ... Public FirstName As String ... Public Function Login(ByVal UserName As String, ... Dim sqlCmd As SqlCommand ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Need help with a DAO to ADO conversion
    ... Dim conBackend As ADODB.Connection ... where the compatibility version of the back-end database is set. ... If IPDBVersion < TMSDBVersion Then Call Upgrade ... Dim strDDL As String ...
    (microsoft.public.access.formscoding)
  • Re: Modifying AD User attribute
    ... Would you haapened to have a script to do the following: ... username in AD with username in the spreadsheet, ... Dim objRootDSE, strDNSDomain, strNetBIOSDomain ... ' Determine DNS domain name from RootDSE object. ...
    (microsoft.public.windows.server.scripting)