System.Web.HttpCompileException when overriding RenderMvcController.Index
Hi,
Suddenly I get an System.Web.HttpCompileException when I overide RenderMvcController.Index and tries to return the model. It worked fine yesterday and i haven't done any changes to the code...
I get "An exception of type 'System.Web.HttpCompileException' occurred in System.Web.dll"
In the browser I get this error: "system.web.http.apicontroller' is defined in an assembly that is not referenced. You must add a reference to the assambly System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35."
I managed to solve it by reinstalling Visual Studio. But if it's caused by a Windows Security update it's likely to come back. I will add Umbracos fix also. Thanks again!
System.Web.HttpCompileException when overriding RenderMvcController.Index
Hi,
Suddenly I get an System.Web.HttpCompileException when I overide RenderMvcController.Index and tries to return the model. It worked fine yesterday and i haven't done any changes to the code...
The code looks like this:
I get "An exception of type 'System.Web.HttpCompileException' occurred in System.Web.dll"
In the browser I get this error:
"system.web.http.apicontroller' is defined in an assembly that is not referenced. You must add a reference to the assambly System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35."
But I alredy have a reference to this assambly...
Please help me, this is driving me crasy.
Probably related to a windows update breaking stuff in the .net framework. I've seen a lot of posts today on twitter concerning the problem.
Luckily umbraco HQ added a blogpost on how to solve the problem : http://umbraco.com/follow-us/blog-archive/2014/10/16/getting-a-systemwebhttpapicontroller-error
Dave
Thanks Dave!
I managed to solve it by reinstalling Visual Studio. But if it's caused by a Windows Security update it's likely to come back. I will add Umbracos fix also. Thanks again!
/Linus
is working on a reply...