views:

277

answers:

1

We have OSB services that are currently secured with a username and a password. I get a 401 unauthorized when attempting to generate a service proxy using svcutil. I know you need to set up a svcutil.exe.config file but I cannot find any examples except for one that passes a certificate.

Dows anyone know how to send a username and password using svcutil?

+1  A: 

I don't think you can do that.

What you can do in this case is either connect to that address in a browser and just download and save the WSDL file to your local disk and call svcutil.exe on that local copy - or ask the publisher of that webservice to either give you an URL which doesn't require authentication, or to simply send you the relevant WSDL and possibly XSD files so you can create a client side proxy for that service.

marc_s
I'm validating what you are saying here: http://msdn.microsoft.com/en-us/library/ms733775.aspxNote: You cannot use configuration to set the user name and password. The configuration shown here must be augmented using code to set the user name and password.
webwires