Could not load file or assembly System.Web.Http, Version=5.2.2.0

后端 未结 8 950
孤街浪徒
孤街浪徒 2020-12-29 22:31

I\'ve just uploaded a Asp.Net Web Api 2.2 project to production server and I got the error stated in the title.

In my Web.config I already have this:



        
8条回答
  •  南笙
    南笙 (楼主)
    2020-12-29 22:43

    Another way to do this, which do not require a New build or update/reinstall With Nuget is to do the following in config.web:

    For the dll you have issues With, do the following:

    <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="5.2.2.0">
    

    I had an issue today, and this little tweak solved it...

提交回复
热议问题