ThreeMammals / Ocelot

.NET API Gateway
https://www.nuget.org/packages/Ocelot
MIT License
8.38k stars 1.64k forks source link

SignalR/Websockets in IIS #1059

Closed TheSpazzyDev closed 7 months ago

TheSpazzyDev commented 4 years ago

Expected Behavior / New Feature

Per the documentation, it was expected that in order for SignalR traffic to be passed downstream, that the WebSockets feature in IIS should not be installed.

Actual Behavior / Motivation for New Feature

Without the WebSockets feature in IIS installed, the application was not able to properly make a a SignalR connection.

Steps to Reproduce the Problem

  1. Installed Ocelot into a .NET Core 2.2 project
  2. Configure Ocelot as described here - https://ocelot.readthedocs.io/en/latest/features/websockets.html
  3. Install and Configure ASP.Net Core hosting on IIS as outlined here, https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-2.2
  4. Ensure that WebSockets is NOT enabled in IIS features in Windows
  5. Configure project in IIS as Application and update ocelot.json to point downstream as defined in the documentation
  6. Receive unable to connect errors when trying to access Ocelot endpoint, using any SignalR client
  7. Install WebSockets from IIS features in Windows
  8. Perform an IIS reset
  9. Retry the connection, and it will be successful

Specifications

coolnumber9 commented 2 years ago

I can also attest that when the WebSockets Protocol support is installed in IIS, the client was able to connect to the hub via a WebSocket SignalR HTTP Transport Type.

raman-m commented 7 months ago

@TheSpazzyDev

Installed Ocelot into a .NET Core 2.2 project

Too outdated version of the framework! We support .NET 6+ as Microsoft does since November'23.

@TheSpazzyDev @coolnumber9 Guys, you need to understand that direct connections should work if the lib versions matching. Otherwise diff versions can lead to corruptions in protocol communication because of different implementations. I have no idea my your IIS setup works, but direct connection not...

As a team we have updated Websockets docs in version 20.0.1 and later

We are not DevOps team, and don't want to check your IIS environments.


Actual Behavior / Motivation for New Feature

Without the WebSockets feature in IIS installed, the application was not able to properly make a a SignalR connection.

You have to provide more details to prove that. Not simply saying "it doesn't work"