Web service not working after upgrade from MVC4

Topics: ASP.NET Web API
May 30, 2012 at 9:10 PM

I updated to the NuGet packages from the May 30 nightly build, updated the GAC, and built the code successfully.

However, my self-hosted web service -- which was working perfectly under MVC4 beta -- now is not responding to requests. I get a 504 error which is either Receive Failure or Gateway Timeout.

I don't even know where to begin to try to figure this out. I suspect that the new aspnetwebstack requires a different setup for a selfhosted web service, but I don't know what changes I'd need to make.

Any guidance?

May 30, 2012 at 10:00 PM

It turns out that one assembly from the nightly builds was missing from the GAC; and important one -- once I did this command the web service started working:

gacutil /i packages\Microsoft.AspNet.WebApi.SelfHost.4.0.20530.0\lib\net40\System.Web.Http.SelfHost.dll

I was using this page as a guide, and have posted a comment about the extra GAC'd assembly there:


All's well now (except for some JSON and XML getting serialized and deserialized differently than before).

May 31, 2012 at 4:06 AM

Glad you found the problem!