Today I got an exception when deploying an ASP.NET MVC 4 application to our web server. Could not load file or assembly 'System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified It never happened to me before. The only change I did was small code change and package update. What really confused me was that my application doesn't use System.Web.Http pacakge. I couldn't see it anywhere in the solution, no matter in References or package.config or Web.config. After long time checking of installed packages and assemblies, I used remote access to Web server and checked the bin folder of deployed project, System.Web.Http dll file was actually there and its version was 4.0. The reason i can come up with was that some of the packages i updated had dependency on System.Web.Http. But then the problem was "why can't it be loaded by system?" Inspired by one post related to this issue on StackOverflow, I tried a solution which added assembly redirects in Web.
I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.
Stay tuned to my blog, twitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.
Stay tuned to my blog, twitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.
This article is related to
Uncategorized,Assembly Redirect,System.Web.Http
Uncategorized,Assembly Redirect,System.Web.Http
No comments:
Post a Comment