Open
Description
I currently have this WsHttpBinding in .NetFramework 4.8 and I am looking for some viable equivalent option in Net6 :
<binding name="name" openTimeout="00:1:00" closeTimeout="00:1:00" receiveTimeout="02:00:00"
sendTimeout="02:00:00" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="false" allowCookies="false">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647"
maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />
<security mode="TransportWithMessageCredential">
<transport clientCredentialType="Windows" proxyCredentialType="None" realm="" />
<message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default"
establishSecurityContext="true" />
</security>
</binding>
Tried unsuccessfully using custom binding with TextMessageEncodingBindingElement and HttpsTransportBindingElement:
CustomBinding customBinding = new CustomBinding();
binding = customBinding;
TextMessageEncodingBindingElement textBindingElement = new TextMessageEncodingBindingElement();
textBindingElement.ReaderQuotas = XmlDictionaryReaderQuotas.Max;
customBinding.Elements.Add(textBindingElement);
HttpsTransportBindingElement httpsBindingElement = new HttpsTransportBindingElement
{
MaxBufferPoolSize = int.MaxValue,
AllowCookies = false,
MaxBufferSize = int.MaxValue,
MaxReceivedMessageSize = int.MaxValue,
UseDefaultWebProxy = false,
ProxyAuthenticationScheme = System.Net.AuthenticationSchemes.Negotiate,
AuthenticationScheme = System.Net.AuthenticationSchemes.Negotiate
};
customBinding.Name = "httpsCustomBinding";
customBinding.OpenTimeout = new TimeSpan(0, 1, 0);
customBinding.CloseTimeout = new TimeSpan(0, 1, 0);
customBinding.ReceiveTimeout = new TimeSpan(2, 0, 0);
customBinding.SendTimeout = new TimeSpan(2, 0, 0);
customBinding.Elements.Add(httpsBindingElement);
@mconnew Any suggestions on an equivalent workaround to make this to work in .Net6 without degrading message or transport level security? Any help is greatly appreciated.
Thank you!