Problems in Google Chrome RRS feed

  • Question

  • User-306995145 posted

    Hey, maybe someone here can help me. I am trying to use SignalR in my Angular 2 Project with WebSockets.

    I enabled the CORS and everything for my API and added the OnDisconnected method in my hub. If I start my web application with Firefox, I can connect to it without any problems and when I close the tab, it instantly calls the OnDisconnected method and I can open the application and connect again without problems. But when I use Google Chrome, I can only connect without problems the very first time after the Server restarted. After that, when I close the tab, it doesn't call the OnDisconnected method until it gets automatically called after 35 seconds. After that time, I can connect again. But when I try to connect withing these 35 seconds, I can not connect to it anymore with a 500 Error. After that, it feels like I can never connect ever again. 

    When I try to call the .stop() Method in my Frontend in Google Chrome (attached to an event which is triggered on switching my 'view') it doesn't call the OnDisconnected() method either. In Firefox this is also no problem.

    All I can see is a "No 'Access-Control-Allow-Origin' header is present on the requested resource" during "localhost/signalr/abort?..." in Google Chrome and then it will give an "Error during WebSocket handshake: Unexpected response code: 500" when it tries the ws://localhost/signalr/connect?..."

    Does anyone know what this problem could be? Thanks

    Friday, January 6, 2017 1:57 PM

All replies