Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / March 2005

Tip: Looking for answers? Try searching our database.

WS-Security

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Benjamin - 17 Feb 2005 13:49 GMT
Hi!

A short but important question.

How can a Visual Basic 6.0 client consume a WS-Security enhanced (WSE2.0)
.NET Web Service?

Can "SOAP Toolkit 3.0" be used?

Best regards,
Benjamin
Sweden
Keenan Newton - 17 Feb 2005 15:08 GMT
Nope, but you could build a .Net class, and turn it into a COM
component.  Then VB6 can use that.
Benjamin - 22 Feb 2005 07:59 GMT
Thanks Keenan and Sven!

Right now we already have VB6.0 clients that are accessing .NET Web Services,
without any Interop components.

Is there really no possibility to add extra SOAP headers on client side
using SOAP Toolkit 3.0?

Let us compare with our existing .NET clients. All web services proxies are
configured using following method.

   Public Sub ConfigureProxy(ByVal proxy As WebServicesClientProtocol)
       'WS-Security: "Authentication" & "Authorization" with UsernameToken
(no need to send password because of signing below)
       Dim token As UsernameToken = New UsernameToken(Me.txtUserName.Text,
Me.txtPassword.Text, PasswordOption.SendNone)
       proxy.RequestSoapContext.Security.Tokens.Add(token)

       'WS-Security: "Signing" with UsernameToken (keep message integrity)
       Dim derivedToken As New DerivedKeyToken(token)
       proxy.RequestSoapContext.Security.Tokens.Add(derivedToken)
       proxy.RequestSoapContext.Security.Elements.Add(New
MessageSignature(derivedToken))

       'WS-Security: "Encryption" with UsernameToken (ensure
confidentiality, not "very" secure)
       proxy.RequestSoapContext.Security.Elements.Add(New
EncryptedData(derivedToken))
   End Sub

We would like to do this also in VB6 clients, without any COM-components on
client. Only pure SOAP headers, but how to add it?
Does there not exist any code libraries on Internet that add WSE
functionality to Toolkit 3.0 in VB6. Thas would be nice.

(have have not yet any knowledge in the Toolkit as you can see)

Comment?

Best regards,
Benjamin
Sweden
Keenan Newton - 23 Feb 2005 02:06 GMT
No in fact I beleive Microsoft is looking to sunset the SOAP Toolkit
3.0 this summer.  They recommend you go to .Net.  You can't fight going
to .Net... Just accept it. :)
Benjamin - 23 Feb 2005 08:57 GMT
> No in fact I beleive Microsoft is looking to sunset the SOAP Toolkit
> 3.0 this summer.  They recommend you go to .Net.  You can't fight going
> to .Net... Just accept it. :)

This is really big/important discussion!

"going to .Net" is exactly what we want, but in a companiy running business
all around the world with thousands of end users, it is not easy to just
through a way all other development platforms, and replace with .Net. Beleive
me - that is want we should like to do. But instead the "real world" requires
that we step by step publish new services, as form of .Net web services,
enhanced with WS-Security.

If WebService and WS-Security are standards with some minimum limit of self
respect they should be consumable by clients regardless of platforms (VB6.0,
unix, amiga). That is platform independent communication!

If this is not reachable we can close down the WS-Security project.

Are there any resource on Internet that gives usable (!) best practise
adviceses in this - must be common - scenario?

Best regards,
Benjamin, Sweden
Softwaremaker - 23 Feb 2005 12:31 GMT
Benjamin,

I know exactly how you feel. I work in a large SI and I face these problems
all the time. Fortunately, most of my cases were the tail wagging the dog --
meaing that the client adopted .NET because of WSE ! :)

I have not come across any Win32 COM code libs that simulated WS-Security
headers that can be used from the SOAP Toolkit.

Have you tried to COM-interop the WSE2.0 ? I dont know if it is that simple
as it may have other dependencies. You may want to check it out. If this
doesnt work, you may have to reflect WSE2.0 to create and write those
security headers on your own using the SOAP Toolkit. I dont know how much
work that will be though. You really have to grok at the security Win32 APIs
to see how much work is needed.

Another way (which I will talk about in an upcoming article on MSDN) is to
route the messages through a .NET Proxy Server (which will use WSE2.0 and
the SOAPHttpRouter) before sending it out to the wild. This proxy server
acts like some sort of intermediary and does some SOAP Processing
(encrypting and signing). However, you do have to secure the channel from
the clients to this proxy server...may want to implement load-balancing and
queing as well. You should have more options securing this channel as it is
still on the same Local Area Network.

I dont know if this will work for you. My 0.02 worth.
Signature

Thank you.

Regards,
William T (Softwaremaker)
http://www.softwaremaker.net/blog
=========================================

> > No in fact I beleive Microsoft is looking to sunset the SOAP Toolkit
> > 3.0 this summer.  They recommend you go to .Net.  You can't fight going
[quoted text clipped - 20 lines]
> Best regards,
> Benjamin, Sweden
William Stacey [MVP] - 23 Feb 2005 14:35 GMT
I like the proxy idea William.  I am thinking what older com stuff would
work on vb6.  Maybe MSMQ request/reply from client to proxy.  Then proxy
does the WSE request/reply and sends back reply to client.  You could
probably use DCOM as well (not sure.)  Heck as long as you can figure out a
way to serialize xml on the clients, you could even use SMTP to the proxy.

Signature

William Stacey, MVP
http://mvp.support.microsoft.com

> Benjamin,
>
[quoted text clipped - 51 lines]
> > Best regards,
> > Benjamin, Sweden
Keenan Newton - 23 Feb 2005 19:26 GMT
Well i was trying to add some humor to my reply, so don't take the
"going to .Net" thing too seriously.  I understand your woes, and I
understand the "real world"  but I am sure you have searched the web,
as I have I, trying to help you find a pure COM answer, and neither of
us have obviously found something.  So this leaves you with possibly
having to have some sort of .Net code wrapped in COM, or another one of
the suggestions posted here.  The WS-Security specification is out
there so you can create you own implementationon VB6.  I can't think of
any other posibility without involving .Net somehow.  Sorry.

Keenan
Ryan Walberg [MCSD] - 09 Mar 2005 20:24 GMT
> Nope, but you could build a .Net class, and turn it into a COM
> component.  Then VB6 can use that.

Nay, I'm currently watching a VB6 client use the SOAP Toolkit 3.0 to
consume a WSE service with DIME attachments.  No custom headers needed.

Depending on what you're doing with WSE (like WS-Policy) you might need
to do a lot of manual work with the toolkit.
SA - 17 Feb 2005 17:51 GMT
Benjamin:

Keenan's advise is the way to go. I have done that for a rather large
project.

You will of course need to study COM Interop if you have not already done
so. I found that using the default COM wrapper really doesn't work well, you
need to use the Interop attributes extensively throughout your code.

Signature

Sven.

> Hi!
>
[quoted text clipped - 8 lines]
> Benjamin
> Sweden

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.