Lakin Lu
Lakin Lu

Reputation: 4996

Failed connection handshake error when using AspNetCore.SignalR in ABP under IIS

My Environment

Sample Code for AspNetCore.SignalR

Abp for AspNetCore.SignalR

The issue is, when I publish it to the server (same as my above server), and run it, it throws a error - AspNetCore.SignalR.HubConnectionContext - Failed connection handshake.

I have research it, but didn't get any solution. could you please help to look at it what the issue is?

I have push my project into github: https://github.com/lcyhjx/AbpExample, you can pull and run it (Just run AbpExample.Web.Host). It works fine in Visual Studio, but failed in IIS.

The error detail:

enter image description here

Upvotes: 9

Views: 11419

Answers (2)

Slesa
Slesa

Reputation: 245

The same here, but a bit different: I ran the server in Rider and everything worked. I put it in another directory and I've got handshake errors. Removing the handshake timeout and it works everywhere.

Upvotes: 0

Lakin Lu
Lakin Lu

Reputation: 4996

I have addressed the issue. It's a code issue, in my code I have set

HandshakeTimeout = TimeSpan.MaxValue;

If I comment above code, then all works fine in both VS and IIS.

Upvotes: 6

Related Questions