tag:support.appharbor.com,2010-11-23:/discussions/problems/66891-you-must-add-a-reference-to-assembly-systemwebhttp-errorAppHarbor: Discussion 2016-08-11T00:42:38Ztag:support.appharbor.com,2010-11-23:Comment/350144352014-10-21T07:28:06Z2014-10-21T07:28:06ZYou must add a reference to assembly 'System.Web.Http' Error<div><p>Hi,</p>
<p>It looks like you're going to have to update the MVC reference.
The build and worker servers were upgraded with new version of MVC
last week, and since it's GAC'ed this seems to be the only way
around this one for now.</p>
<p>In projects that references MVC 4.0 you can change:</p>
<pre>
<code><Reference Include="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" /></code>
</pre>
<p>To this:</p>
<pre>
<code><Reference Include="System.Web.Mvc, Version=4.0.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" /></code>
</pre>
<p>Alternatively you can install the NuGet package that was also
released:</p>
<pre>
<code>Install-Package Microsoft.AspNet.Mvc -Version 4.0.40804.0</code>
</pre>
<p>You can read more about why these updates were introduced in
<a href=
"https://technet.microsoft.com/library/security/ms14-oct">this
security bulletin</a>. It can also be reproduced locally by
installing these updates, which is a really good idea anyway
:-)</p>
<p>It might be possible to mitigate the issue on our end soon by
removing the dll from the GAC on the build servers. Given the
severity and urgency of the vulnerabilities, the first priority was
to make sure everything was updated and secure.</p>
<p>Let me know if you hit any snags!</p>
<p>Best,<br>
Rune</p></div>runetag:support.appharbor.com,2010-11-23:Comment/350144352014-10-21T14:26:36Z2014-10-21T14:26:36ZYou must add a reference to assembly 'System.Web.Http' Error<div><p>I updated the reference to the new version but now it's
complaining that...</p>
<p>The type or namespace name 'Html' does not exist in the
namespace 'System.Web.Mvc' (are you missing an assembly
reference?)<br>
The type or namespace name 'Ajax' does not exist in the namespace
'System.Web.Mvc' (are you missing an assembly reference?)</p>
<p>Again, it's working fine locally.</p></div>raulbojaliltag:support.appharbor.com,2010-11-23:Comment/350144352014-10-22T01:42:55Z2014-10-22T01:42:55ZYou must add a reference to assembly 'System.Web.Http' Error<div><p>OK - have you updated your local machine? If you haven't it's
likely to continue working locally, and not work on the build
servers since it has updated assembly references.</p>
<p>You can likely fix this issue by explicitly setting "Copy Local"
to "true" on the assembly reference. Also see <a href=
"http://blogs.msdn.com/b/webdev/archive/2014/10/16/microsoft-asp-net-mvc-security-update-broke-my-build.aspx">
this blog post</a> which specifically addresses the issue(s) this
recent update is causing (and the issue you're seeing).</p>
<p>Best,<br>
Rune</p></div>runetag:support.appharbor.com,2010-11-23:Comment/350144352014-10-24T17:16:29Z2014-10-24T17:16:29ZYou must add a reference to assembly 'System.Web.Http' Error<div><p>Finally, I was able to solve this issue :)</p>
<p>Many thanks!</p></div>raulbojaliltag:support.appharbor.com,2010-11-23:Comment/350144352014-10-25T02:52:16Z2014-10-25T02:52:16ZYou must add a reference to assembly 'System.Web.Http' Error<div><p>Awesome glad it worked out! :-)</p></div>rune