VB 6 Client (Soap Toolkit) with WS on IIS 6.0 authentication problems

L

LP

Hello,

I am really hoping someone can help me here.
I have a web service running on Win 2003 IIS 6.0, and VB6 client connecting
to it with the use of Soap Toolkit. Everything worked fine until I needed to
enable Basic Authentication.
Now according to this msdn source:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsoap/html/soapsecurity.asp

SoapClient.mssoapinit(http://username:userpwd@your-server/webservice/service.wsdl
) should do the trick, well it doesn't on IIS 6.0, I get a long error
message along the lines; "Invalid Parameter. Access denied" But I did try it
on IIS 5.0 with the same VB 6 client it does work.

Also I tried reading wsdl file from another dir on the server without
authentication, but got another error.

I know that by default IIS 6.0 is "extra" secure. Maybe it's a matter of
changing a few setting and easing security. Perhaps enable user:pwd@server
type authentication.

Thank you for your help.
 
L

LP

Ok, I finally got it to work. In case someone else is going trhough the same
porblem I will post my notes here:

1. Working Code:
'**********************************************************************
Dim soap As MSSOAPLib30.SoapClient30
Set soap = New MSSOAPLib30.SoapClient30

'Key part
soap.ClientProperty("ConnectorProgID") = "MSSOAP.WinInetConnector30"
'Key part: append username:password@ before the server address
soap.MSSoapInit http://username:pwd@server/somews/ws.asmx?wsdl, "csbll",
"Cardiostation"

soap.ConnectorProperty("AuthUser") = UID 'username
soap.ConnectorProperty("AuthPassword") = PWD 'password

returnData = soap.myWSCall(param1, param2)
'**********************************************************************
soap.ClientProperty("ConnectorProgID") = "MSSOAP.WinInetConnector30" is
crucial, that what made the whole thing work. I don't quite understand why,
if someone else does, please explain.

2. Setting on the server:
Make sure "Basic Authentication" is checked off, default domain name should
be the domain of the username in the code (in most cases local server name),
and Anonymous access is disabled.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top