How to create this WsHttpBinding in Net6 with equivalent security level?
- Dominant language
- C#
- Stars
- 1.8k
- Forks
- 576
- Avg merge
- 6d 9h
- Merged PRs (30d)
- 2
Description
I currently have this WsHttpBinding in .NetFramework 4.8 and I am looking for some viable equivalent option in Net6 :
```xml
```
Tried unsuccessfully using custom binding with TextMessageEncodingBindingElement and HttpsTransportBindingElement:
```c#
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!
Contributor guide
Assessment
This issue has not been assessed yet.