none
WSDoAllReceiver: Request does not contain required Security header RRS feed

  • Question

  • Hi

    I'he the follow code:

    var client = new ProspectaWSClient();
    
                //client.ClientCredentials.Windows.AllowNtlm = true;
                client.ClientCredentials.UserName.UserName = "316700";
                client.ClientCredentials.UserName.Password = "P71apr";
                client.ClientCredentials.ClientCertificate.Certificate = new X509Certificate2(@"C:\Users\Developer-4\Desktop\Certificados Prospecta\BanlineaClientCert.cer");
    
                try
                {
                    //client.Open();
                    client.consultaProspecta("2058", "54000000", "1");
                }
                catch (Exception)
                {
                    throw;
                }

    And here is my App.config:

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <configSections>
        <section name="microsoft.web.services3" type="Microsoft.Web.Services3.Configuration.WebServicesConfiguration, Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      </configSections>
      <startup>
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
      </startup>
      <system.serviceModel>
        <bindings>
          <basicHttpBinding>
            <binding name="ProspectaSoapBinding" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
              <security mode="TransportCredentialOnly">
                <transport clientCredentialType="Basic" proxyCredentialType="None" realm="">
                  
                </transport>
                <message clientCredentialType="UserName" algorithmSuite="Default" />
              </security>
            </binding>
          </basicHttpBinding>
        </bindings>
        <client>
          <endpoint address="http://cifinpruebas.asobancaria.com/ws/ProspectaWebService/services/Prospecta"
            binding="basicHttpBinding" bindingConfiguration="ProspectaSoapBinding"
            contract="ServiceReferenceProspecta.ProspectaWS" name="Prospecta" />
        </client>
      </system.serviceModel>
      <microsoft.web.services3>
        <policy fileName="wse3policyCache.config" />
      </microsoft.web.services3>
    </configuration>

    And the exception message is: WSDoAllReceiver: Request does not contain required Security header

    Any of iu have this problema before ?? Iu know why happend this ?? Have any of you the solution of this ???

    Friday, January 9, 2015 5:46 PM

Answers