-
Notifications
You must be signed in to change notification settings - Fork 22
Error when connecting to Asp.net SignalR #10
Comments
Can you post your code or snippet so I could replicate it? |
I used your example code, and replace it with our vendor signalr endpoint. I also pass in session object into the connection.
|
Also, please note that if i use your example signalr endpoint, it works. I believe our vendor use asp.net signalr, not the asp.net core signalr. |
It's related to the session you are passing, you are getting
Is the endpoint cloudflare protected? What happens if you dont pass a session object, i.e connection = Connection('<signalR_endpoint>', session=None) Also correct you method definition to: async def print_all_active_devices(data):
print('\n Active devices: ', data) |
I have changed the print_all_active_devices method, and removed the session from the Connection but I still get the same error. The signal endpoint at the moment is still http not https as your example. Does it need to be https? |
I have the same problem, status code 400, only http provided. |
I am trying your library with python 3.6.5
However, when I try to connect to my vendor signalr endpoint, I got the following error:
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/signalr_aio/_connection.py", line 36, in start
self.__transport.start()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/signalr_aio/transports/_transport.py", line 47, in start
self.ws_loop.run_until_complete(self.socket(self.ws_loop))
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py", line 468, in run_until_complete
return future.result()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/signalr_aio/transports/_transport.py", line 59, in socket
loop=loop) as self.ws:
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/websockets/py35/client.py", line 2, in aenter
return await self
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/websockets/py35/client.py", line 19, in await_impl
extra_headers=protocol.extra_headers,
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/websockets/client.py", line 263, in handshake
raise InvalidStatusCode(status_code)
websockets.exceptions.InvalidStatusCode: Status code not 101: 400
Can you help me with this issue?
I have tried with this library https://github.com/TargetProcess/signalr-client-py and it is able to connect sucessfully. However, the project doesn't seem active recently, so i wanna try different available packages.
The text was updated successfully, but these errors were encountered: