Base solution for your next web application
Open Closed

Disable SignalR #8478


User avatar
0
palmtreefrb created

Seems that siyeza's question 8300 "how to turn it off?" has not been answered.

I also would like instructions on how to "disable" all implementations of SignalR.


5 Answer(s)
  • User Avatar
    0
    musa.demir created

    Hi @palmtreefrb It is not yet implemented. If what you want is disabling chat, you can do it with removing Chat Feature from tenant. That will disable chat and it's SignalR. But if you want to disable all SignalR codes, you need to implement it yourself. You can delete all codes or add settings for it then check if that setting is enabled.

  • User Avatar
    0
    palmtreefrb created

    Can you publish here all projects/classes/methods etc that I would need to work on to implement disabling SignalR. I have removed the tenant chat, as you can see below it is still executing something every 10-15 seconds.

  • User Avatar
    0
    maliming created
    Support Team

    hi

    You can unconnect signalr in ChatSignalrService.

    https://github.com/aspnetzero/aspnet-zero-core/blob/5701e3ddeef48ed342eddb662a8617450daf8940/angular/src/app/shared/layout/chat/chat-signalr.service.ts#L139

  • User Avatar
    0
    musa.demir created

    If your app is MVC

    [YourAppName].Web.Mvc\Areas\App\Views\Layout\_Layout.cshtml 130 78:

    -<script src="@(ApplicationPath)view-resources/Areas/App/Views/_Bundles/signalr.bundle.min.js" asp-append-version="true"></script>
    

    [YourAppName].Web.Web.Mvc\Areas\App\Views\Layout\_Layout.cshtml 145 67:

    -<script src="@(ApplicationPath)Common/Scripts/Chat/chat.signalr.js" asp-append-version="true"></script>
    
  • User Avatar
    0
    palmtreefrb created

    Got it, thanks...