6 Mayıs 2021 Perşembe

Sap WSDL Basic Auth

  private static Z_PPGEN_HMLOG_PLAKAClient MyBasicConfiguredService()
        {
            BasicHttpBinding basicHttpBinding = new BasicHttpBinding();
            basicHttpBinding.Security.Mode = BasicHttpSecurityMode.TransportCredentialOnly;//mandatory
            basicHttpBinding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Basic;//mandatory

            EndpointAddress endpoint = new EndpointAddress(Url);

            var client = new Z_PPGEN_HMLOG_PLAKAClient(basicHttpBinding, endpoint);

            client.ClientCredentials.UserName.UserName = UserName;
            client.ClientCredentials.UserName.Password = Password;

            return client;
        }

Hiç yorum yok:

Yorum Gönder

.net 6 mapget kullanımı

 app.UseEndpoints(endpoints => {     endpoints.MapGet("/", async context =>     {         var response = JsonConvert.Seriali...