当前位置: 动力学知识库 > 问答 > 编程问答 >

Django websockets on Azure App service

问题描述:

Do I have any option running django using websockets on azure app service.

I've used Django-Channels and succeed on my local computer using redis (asgi_redis.RedisChannelLayer). But when the app is deployed on azure I got Error 404 on my ws connection. In the log there is a wrong url coming from FastCgi Handler.

Here is my error in console:

WebSocket connection to 'ws://mySite.azurewebsites.net/chat/a/' failed: Error during WebSocket handshake: Unexpected response code: 404

Any suggestion or hint?

Thanks,

Kristian

网友答案:

I ended up using Pusher (now they have a free version) following this post: How to use Pusher with Django?

If you are using Azure there is a service for pusher which allow you to host your Pusher in Azure and use your credits for paying and still have access to pusher website for monitoring.

BR, Kristian

分享给朋友:
您可能感兴趣的文章:
随机阅读: