SignalR 2.0.2 and Owin 2.0.0 conflict

I am trying to get SignalR to work in an MVC5 project with separate accounts.

The MVC project has Owin 2.0.0 by default, and all components are Owin. * also 2.0.0.

So, I used NuGet to get all SignalR packages, it automatically resolved dependencies and downloaded v 2.0.2.

The project launches an error on startup with the following message:

Failed to load file or assembly 'Microsoft.Owin, Version = 2.0.1.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35'

I also tried updating Owin to 2.1.0, but that didn't help either.

Has anyone encountered the same problem and what was the solution?

+29
c # owin signalr
Jan 29 '14 at 18:40
source share
3 answers

You can update these links to the latest version I found (now it is 2.1.0):

Install-Package Microsoft.Owin -Version 2.1.0 Install-Package Microsoft.Owin.Security -Version 2.1.0 

And make sure your Web.config has these binding redirects for version 2.1.0:

 <configuration> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0" /> </dependentAssembly> </assemblyBinding> </runtime> </configuration> 

Or you can update these links to version 2.0.1:

 Install-Package Microsoft.Owin -Version 2.0.1 Install-Package Microsoft.Owin.Security -Version 2.0.1 

And make sure your Web.config has these binding redirects for version 2.0.1:

 <configuration> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-2.0.1.0" newVersion="2.0.1.0" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-2.0.1.0" newVersion="2.0.1.0" /> </dependentAssembly> </assemblyBinding> </runtime> </configuration> 
+49
Jan 30 '14 at 16:50
source share

Maybe you need binding redirects in your .config

 <configuration> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-2.0.2.0" newVersion="2.0.2.0" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-2.0.2.0" newVersion="2.0.2.0" /> </dependentAssembly> </assemblyBinding> </runtime> </configuration> 
+3
Jan 29 '14 at 18:55
source share

In my case, when I hosted my WCF service, which has the SignalR function in IIS, and when I go to my IIS manager and my application where I hosted my service, right-click the svc file and click Browse , I get this mistake. So I did the following

In my Visual Studio Tools -> Library Package Manager -> Package Manager Console

I made sure that I chose the project of my site, which hosted my WCF service, and gave below two commands one after another

 uninstall-package Microsoft.AspNet.SignalR install-package Microsoft.AspNet.SignalR 

After that, I just rebuild my decision. I went to IIS Manager and to my application, where I hosted my service by right-clicking svc and clicking Browse , I could see that my service works in IE.

+1
May 6 '14 at 21:39
source share



All Articles