Ошибка:
"System.ServiceModel.FaultException: InvalidSecurity: ошибка в
обработка заголовка безопасности WS-Security "...
Может ли кто-нибудь помочь в этом вопросе
public void CallServiceMNB()
{
ServiceReference1.SOAPCLIENT objMNB = new ServiceReference1.SOAPCLIENT();
ServiceReference1.SOAPCLIENTinput input = new ServiceReference1.SOAPCLIENTinput();
string Username = "xxx";
string Password = "xxxx";
objMNB.ClientCredentials.UserName.UserName = Username;
objMNB.ClientCredentials.UserName.Password = Password;
input.p_FROM_DATE = "01-01-2018";
input.p_JE_CATEGORY = "xxxx";
input.p_GROUP_ID = "";
input.p_JE_SOURCE = "YYYYYY";
input.p_LEDGER_NAME = "YYYYY";
input.p_TO_DATE = "31-12-2018";
try
{
objMNB.Open();
objMNB.GetGLDetails(input);
objMNB.Close();
}
catch (Exception Ex)
{
this.richTextBox1.Text = Ex.ToString();
objMNB.Close();
}
}
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<system.serviceModel>
<bindings>
<customBinding>
<binding name="YYYYYY">
<!-- WsdlImporter encountered unrecognized policy assertions in ServiceDescription 'http://gl.ws.apps.oracle.xxdof/': -->
<!-- <wsdl:binding name='YYYYYY'> -->
<!-- <sp:SupportingTokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">..</sp:SupportingTokens> -->
<textMessageEncoding messageVersion="Soap11" />
<httpsTransport />
</binding>
</customBinding>
</bindings>
<client>
<endpoint address="https://XXXXX"
binding="customBinding" bindingConfiguration="YYYYYY"
contract="ServiceReference1.SOAPCLIENT" name="SOAPCLIENT" />
</client>
</system.serviceModel>
</configuration>