SignalR 2.2.2 RRS feed

  • Question

  • User1861596023 posted


    I've been using SignalR 2.2.2 for a while.  It works fine with NewtonSoft.JSON 6.0.4 but whenever I try to move JSON to the latest version it still compiles OK but at runtime fails saying it is looking for the 6.0.4 version of the DLL (which isn't there as the installer is copying the correct 10.0.2 version instead). I added a binding redirect but it seems to ignore it.


           <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />

            <bindingRedirect oldVersion="" newVersion="" />


    At runtime on start of the app it errors saying it cant find the 6.0.4 DLL.

    What am I doing wrong?



    Friday, May 26, 2017 12:18 PM

All replies

  • User1861596023 posted

    ...I should also say that trying to debug this is driving me nuts!  Cry

    Friday, May 26, 2017 12:19 PM
  • User1967761114 posted

    Hi juwi_uk,

    I reproduced your case and test succeeds ,you could modify it like the following configuration:

        <assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" />
        <bindingRedirect oldVersion="" newVersion="" />

    If you have any other questions, please feel free to contact me any time.

    Best Regards


    Monday, May 29, 2017 2:54 AM
  • User1861596023 posted

    Hi I am revisiting this one (having parked it for a while).

    I'm using the latest SignalR 2.2.2 version and JSON 10.0.3

    My application is .NET 4.6.1

    I am trying to self-host the server-side in a windows service.

    If I run the service (to debug it) as a console app, then the client connects to it fine; ie this in my main() method (sorry it's in VB :0) )

          If (Environment.UserInteractive) Then
                Dim myServ As New MyServerCode()
                Console.WriteLine("Services running in interactive mode")
                ServicesToRun = New System.ServiceProcess.ServiceBase() {New ComfortServer}
            End If

    OK, anyway all of this works fine.

    My APP manifest looks as per Even's post.

    Now instead recompile and install it as a service and the service fails to start

    Framework Version: v4.0.30319
    Description: The process was terminated due to an unhandled exception.
    Exception Info: System.IO.FileLoadException
       at Microsoft.AspNet.SignalR.DefaultDependencyResolver.RegisterDefaultServices()
       at Microsoft.AspNet.SignalR.DefaultDependencyResolver..ctor()
       at Microsoft.AspNet.SignalR.GlobalHost+<>c.<.cctor>b__13_0()
       at System.Lazy`1[[System.__Canon, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089]].CreateValue()
       at System.Lazy`1[[System.__Canon, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089]].LazyInitValue()
       at System.Lazy`1[[System.__Canon, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089]].get_Value()
       at Microsoft.AspNet.SignalR.GlobalHost.get_DependencyResolver()
       at ......

    Whilst not easy to debug,  it does start working if I downgrade JSON back to 6.0.4.

    I am left totally confused;  I don't want to run server on this version and client on later version for sure.

    Does the service not read the redirects in the manifest? 

            <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
            <bindingRedirect oldVersion="" newVersion=""/>

    I really could do with some help or pointers from the experts out there.

    Save me!!  :0)


    Sunday, June 25, 2017 9:31 AM
  • User1861596023 posted

    OMG I solved my own question minutes after I posted this.  I've been banging my head on this for hours., Doh!

    Reason it doesn't work when installed as a service.....

    ..in my WIX installer I didn't copy over the ..exe.config file that has the binding directs in it!

    arggghhhh!  :0)


    Sunday, June 25, 2017 9:37 AM