locked
SignalR is not showing error when Newtonsoft.Json DLL reference was not added or missing RRS feed

  • Question

  • User-1391481404 posted

    I have tried invoking a server event from client side and the method doesn't seem to be working fine. The event is not getting invoked at the server side and also I didn't have any exception at that part of code (invoking code). After spending a lot of time I have found that Newtonsoft.Json DLL was missing from the project. So my question is, "Why SignalR is not throwing exception for missing DLL ?

    How can I catch such exceptions ?

    Monday, May 25, 2015 9:53 AM

All replies

  • User1711366110 posted

    After spending a lot of time I have found that Newtonsoft.Json DLL was missing from the project. So my question is, "Why SignalR is not throwing exception for missing DLL ?

        As far as I know, NewtonSoft.JSON will install automatically when you install SignalR packages .that's why It didn't show any exception initially.
    After a while you may remove that Newtonsoft.JSON or it will remove/upgrade when you install some other packages.
    For this case , you can do the following steps :

    1.Goto Visual Studio >> Tools >>  Library Package Manager >> Package Manager Console

    2. you can update your signalr Packages like below :

    PM> update-Package microsoft.aspnet.signalr

    3.To know the corresponding version of Newtonsoft.json package like below : 

    PM> Get-Package -Filter NewtonSoft.json

    3.after that you can install/update Newtonsoft.Json packages particularly like below:

    pm> uninstall-Package NewtonSoft.json
    
    pm> install-Package NewtonSoft.json
    
    pm> update-Package NewtonSoft.json
    Tuesday, May 26, 2015 1:49 AM