ConfigurationException

A

Andy

I have windows app calling WS via proxy object. There is UsernameToken
element in SOAP header of SOAP message returned by WS. When I'm calling WS,
System.Configuration.ConfigurationException is thrown. Exception's message
is
'No <passwordProvider> entry was found in the configuration file. User name
tokens cannot be authenticated'. Is any way how to sort out this problem?

Here is code fragment:

public class WSProxyClass : Microsoft.Web.Services.WebServicesClientProtocol
{ ....}

WSProxyClass WSProxy = new WSProxyClass();

UsernameToken userToken = new
UsernameToken("usr","psw",PasswordOption.SendHashed);

WSProxy.RequestSoapContext.Security.Tokens.Add(userToken);
WSProxy.RequestSoapContext.Security.Elements.Add(new Signature(userToken));

XmlNode Node = WSProxy.Method();

TIA
 

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,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top