-
Notifications
You must be signed in to change notification settings - Fork 562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Client wsHttpBinding to CustomBindings in .Net 5.0 #4483
Comments
We do support WSHttpBinding, but not every feature available through that binding is supported. The binding config for your server side isn't using any of those features so should work without a problem. You should be able to use: var binding = new WSHttpBinding(SecurityMode.Transport);
binding.MaxReceivedMessageSize = 104857600 };
binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.None; |
@mconnew Thanks for replying! I was unable to find much about this issue on google. Any idea what to do now? |
@mconnew It seems my endpoints that does not use custom bindings does work with your suggestion. My client looks like this when configured for the behavior: var client = new ServiceClient(binding, address);
client.Endpoint.EndpointBehaviors.Add(new CustomMessageLayer()); |
That code to add a behavior should work. We support adding behaviors to the client. |
@mconnew I was unable to get custom endpoint behavior working and decided to replace the 2 wcf calls i had that used it. |
I'm in the middle of migrating a .Net framework client application to .Net 5.0.
I want to make a .Net 5.0 WCF client that works with our production .Net framework WCF service (wsHttpBinding)
It appears that wsHttpBindings are not supported since .Net Core, however i have found similar issues (#31) claiming to be able replace them with customHttpBindings but i have been unable to get it working.
When i attempt connecting with my current setup i get the error:
An error occurred while sending the request.
with the inner exception:Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
My current attempt at a binding on a .Net 5.0 client:
Binding on our production WCF service:
So my question is, how do i make a binding that works with the wsHttpBinding in .Net 5.0?
The text was updated successfully, but these errors were encountered: