WCF WebService with UserName Authentication test on SoapUi

cziz13 picture cziz13 · Nov 13, 2012 · Viewed 14.5k times · Source

I have WCF WebService with UserName Authentication and not able to test it with Soapui.

Here you have web.config:

<behaviors>
      <serviceBehaviors>
        <behavior name="FHPBusinessLogicService.ServiceBehavior">
          <serviceCredentials type="FHPBusinessLogicService.Security.PasswordServiceCredentials, FHPBusinessLogicService">
            <userNameAuthentication userNamePasswordValidationMode="Custom" />
          </serviceCredentials>
          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="true"/>
          <serviceAuthorization principalPermissionMode="Custom" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <bindings>
      <basicHttpBinding>
        <binding name="ServiceConf" maxReceivedMessageSize="65536" >
          <readerQuotas maxStringContentLength="65536" maxArrayLength="65536" maxBytesPerRead="65536" />
          <security mode="TransportWithMessageCredential"  >
            <message clientCredentialType="UserName"  />

          </security>

        </binding>
      </basicHttpBinding>
    </bindings>

On Soapui i'm receiving: An error occurred when verifying security for the message

I'm testing it on my local machine, local iis 7 server.

Any suggestions?

Answer

Johnny picture Johnny · Nov 27, 2012

In the 'Request Properties' in SoapUI in section 'Wss-Password Type' just select option 'PasswordText'. That will do the thing