Setting the timeout on BinaryHttpDomainClient #457
-
Hi All, I've just updated our large WPF solution from v4.51 to v5.4 and all is working well so far. In the release notes for v5.4 it states "The WCF based WebDomainClientFactory will not receive any new changes and is now marked as obsolete. It is recommeded to switch to OpenRiaServices.Client.DomainClients.BinaryHttpDomainClientFactory instead.". I have done this switch but I now get an exception in the following bit of client side code we use in some instances to set a SendTimeout.
Now, I've switched to using BinaryHttpDomainClientFactory, how can this be achieved? Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Have a look at the httpclient documentation it also includes hints about additional timeouts being exposed by the SocketsHttpClientHandler https://learn.microsoft.com/en-us/dotnet/api/system.net.http.socketshttphandler?view=net-7.0#properties Setup the client handler with your settings and pass it to the constructor (either directly or by using it in a func). If you need something super advanced you can criteria you own httphandler which chooses between different client handlers based on url. |
Beta Was this translation helpful? Give feedback.
Have a look at the httpclient documentation it also includes hints about additional timeouts being exposed by the SocketsHttpClientHandler https://learn.microsoft.com/en-us/dotnet/api/system.net.http.socketshttphandler?view=net-7.0#properties
Setup the client handler with your settings and pass it to the constructor (either directly or by using it in a func).
If you need something super advanced you can criteria you own httphandler which chooses between different client handlers based on url.