How can I enable gzip compression on WCF websocket duplex nethttpsbinding -


i enable gzip compression following binding.

here have in config file currently.

  <nethttpsbinding>     <binding name="mutualcertificatebinding" maxreceivedmessagesize="9223372036854775807" receivetimeout="00:20:00" sendtimeout="00:20:00" transfermode="streamed" messageencoding="binary">       <security mode="transport">         <transport clientcredentialtype="certificate" />       </security>       <websocketsettings transportusage="always" />     </binding>   </nethttpsbinding> 

according msdn tcp, http, , https in wcf capable of compression of 4.5, i'm on 4.5.2.

keep in mind i'm using wcf contract callback contract duplex required.

i'm happy replace binding custom binding control both sides , both .net i've been unable figure out how create custom binding supports websockets.

any appreciated, thanks.

okay kept trying tons of different things , here came , it's working. :)

    <binding name="gzipmutualcertificatebinding" receivetimeout="00:20:00" sendtimeout="00:20:00">       <binarymessageencoding compressionformat="gzip" />       <httpstransport maxreceivedmessagesize="9223372036854775807" requireclientcertificate="true" transfermode="streamed">         <websocketsettings transportusage="always" />       </httpstransport>     </binding> 

this found trial , error, please let me know if see looks out of place. thanks.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -