This project is read-only.


Topics: ASP.NET Web API
Sep 13, 2012 at 9:37 PM
Edited Sep 13, 2012 at 9:39 PM

I have just discovered that it appears to be impossible to create a working Web API controller called PropertiesController - this is a bit of a problem for me.

I can find similar discussions regarding and MVC but nothing relating to Web API. The fixes suggested for the other frameworks[1] don't appear to work. I get a 404 not found error with the following stacktrace at the bottom of the returned html:

[HttpException]: File does not exist.
at System.Web.StaticFileHandler.GetFileInfo(String virtualPathWithPathInfo, String physicalPath, HttpResponse response)
at System.Web.StaticFileHandler.ProcessRequestInternal(HttpContext context, String overrideVirtualPath)
at System.Web.DefaultHttpHandler.BeginProcessRequest(HttpContext context, AsyncCallback callback, Object state)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Any suggestions?

[1]: <httpRuntime relaxedUrlToFileSystemMapping="true"/>

Sep 18, 2012 at 8:03 PM

I just tried creating a new Web API project and then renamed the ValuesController to PropertiesController and it worked fine.

What does your request URL look like?

Daniel Roth