SignalR 2.0 error: Could not load file or assembly Microsoft.Owin.Security

前端 未结 9 568
失恋的感觉
失恋的感觉 2021-01-01 08:42

I\'m following this tutorial step by step

http://www.asp.net/signalr/overview/signalr-20/getting-started-with-signalr-20/tutorial-signalr-20-self-host

And I\

相关标签:
9条回答
  • 2021-01-01 08:58

    I fixed it by changing my Web.config configuration tag:

    from this:

    <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
    

    to this:

    <configuration>
    

    dont know why this works.

    0 讨论(0)
  • 2021-01-01 09:03

    In my case, I had two projects:

    • MyProj.MvcWeb (an MVC application that referenced Microsoft.Owin.Security 3.0.0)
    • MyProj.Data.Entities (a class library that referenced Microsoft.Owin.Security 2.1.0; not sure how this happened)

    Upgrading Microsoft.Owin.Security from 2.1.0 to 3.0.0 in the MyProj.Data.Entities project fixed the issue for me.

    0 讨论(0)
  • 2021-01-01 09:08

    In my case, I have this error in code first during "update database". I put "Set a as startUp a Project" in project with migration.it helped me

    0 讨论(0)
  • 2021-01-01 09:09

    Renaming app.config to web.config works for me. Or just make a copy of app.config and call it web.config

    0 讨论(0)
  • 2021-01-01 09:11

    Simple, Go to your web.config file. Change the "bindingRedirect" tag for Microsoft.Owin, Microsoft.Owin.Security.OAuth, Microsoft.Owin.Security.Cookies, Microsoft.Owin.Security to as follows:

    <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.1.0" />
    

    this could work.

    0 讨论(0)
  • 2021-01-01 09:12

    I took your idea, thanks for the research you did, and I did it like this:

    get-project PerfSurf | Update-Package Microsoft.Owin.Security
    

    It's much more simpler, and this will update manifest itself.

    Ignore this (get-project PerfSurf) part, as I use it because I have multiple test project and don't want to update them all

    0 讨论(0)
提交回复
热议问题