简体   繁体   中英

WCF transportWithMessageCredential

My experience with WCF is minimal so I'm sure I'm doing something wrong. But after hours of research I'm either not asking the right questions or I'm just old fashion stuck.

I have a windows form application (VB) with a service reference to a WCF WSDL that according to the WCF test application uses transportWithMessageCredential security.

When I attempt to connect to it I get badusernameOrPass every time. I've verified the credentials with the service operator so it's unlikely they are wrong.

Dim serviceProxy As New Provider.SubmissionServiceClient

 serviceProxy.ClientCredentials.UserName.UserName = "user"
 serviceProxy.ClientCredentials.UserName.Password = "pass"

Dim rtn2 = serviceProxy.ProcessSubmissionFromString(mystring)

Yields error:

System.ServiceModel.Security.MessageSecurityException HResult=0x80131501 Message=An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail. ...

Inner Exception 1: FaultException: There was a problem authenticating your username or password. BadUserNameOrPassword**

Does this methodology not work with that type of security or am I just missing an element or way off base?

Any help or insight would be appericated.

Credentials were incorrect. After quite a bit of back and forth they provided a fully qualified username that worked right away. The shortened version (without the domain) would work on their other systems but apparently their custom validator for this WCF services needed the longer username.

Had I been more confident in my WCF and skills in general I could have saved myself several hours of work and worry on deadline project.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM