IIS 8 WebSockets with Resolution

I am trying to enable WebSocket-Extension permessage-deflatein IIS 8, but so far no luck. IIS does not seem to support any extensions and is not responding with a header Sec-WebSockets-Extension.

I tried to send it manually through Response.Headers.Add("Sec-WebSockets-Extension", "permessage-deflate; client_no_context_takeover; server_no_context_takeover")and performed compression / decompression through DeflateStreammanually before sending / after receiving, but then I could not get the WebSocket receiving methods.

I also tried to implement WebSocket manually as OWIN-Middleware (using the vtortola library ), but IIS keeps closing mine InputStreamand reading data is not possible.

Has anyone successfully enabled this feature?

+4
source share
1 answer

I am afraid this is not possible through System.Web.WebSockets.

https://tools.ietf.org/html/rfc7692#section-6

Although you can specify HTTP headers for the release mode, messages must activate the RSV1 bit in order to be identified as compressed:

This document highlights the RSV1 bit of the WebSocket header for PMCEs and calls the bit bit "for each message." On a WebSocket connection that uses PMCE, this bit indicates whether the message is compressed or not.

, , , . HTTP, , , , , , , .

, API- WebSocket ASP.NET , , .

OWIN. , , , , , , IIS8 , HTTP, , , .

+3

Source: https://habr.com/ru/post/1651162/


All Articles