System.ServiceModel.BasicHttpsBinding
Added in .NET Framework 4.5
Example
var soapURL = "https://";
var endpoint = new System.ServiceModel.EndpointAddress(soapURL);
var endPointBinding = new System.ServiceModel.BasicHttpsBinding();
endPointBinding.MaxReceivedMessageSize = 2147000000;
endPointBinding.MaxBufferSize = 2147000000;
endPointBinding.ReaderQuotas.MaxStringContentLength = 2147000000;
endPointBinding.OpenTimeout = new System.TimeSpan(0, 3, 0);
endPointBinding.SendTimeout = new System.TimeSpan(0, 3, 0);
endPointBinding.CloseTimeout = new System.TimeSpan(0, 3, 0);
var restService = new soapClient(endPointBinding, endpoint);
using (new System.ServiceModel.OperationContextScope(restService.InnerChannel))
{
System.ServiceModel.HttpRequestMessageProperty requestMessage = new System.ServiceModel.HttpRequestMessageProperty();
requestMessage.Headers["proxy-remote-user"] = System.Environment.UserName;
System.ServiceModel.OperationContext.Current.OutgoingMessageProperties[
System.ServiceModel.HttpRequestMessageProperty.Name] = requestMessage;
restService.GetMethod();
}
Methods
© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext