I have a SignalR Chat application which is deployed on a server. The chatbox which users see should be renderd by the Chat Application in an iframe, on the targeted website.
I have problems with:
Task OnDisconnected(bool stopCalled)
If the Chat Application is up and running, and the connection is made with the server (for the admin side), and I close the tab, the OnDisconnected gets called instantly with stopCalled = true;
However, from the client page, which is a separate website in IIS, on port 81, instead of 80, if I connect and close the window, then OnDisconnected is called with a delay, and stopCalled is false;
Another weird thing is that if I render the client chat window from the Chat Application (i.e. entering the iframe's URL in a new tab, which renders the page on the same domain), the OnDisconnected is called instantly. So I suppose this is happening due to the client being either :
- rendered in an iframe
- rendered on a different domain
- both
Has anyone encountered this before ? I'm not sure what other details to give, I can give more if needed.
Using ASP.NET MVC 5, signalR 2.2.0, running on IIS 10
Thanks in advance, Vlad
---- Update ----
I pulled everything out of the iframe and this is still happening.