i generated new .net web application using .net 5 , web api 5 preview template. after adding entity framework, , creating basic proof of concept, works fine locally. once deploy on appharbor (via bitbucket), 404 error when accessing controller (i.e. /api/values)
here dummy controller:
[route("api/[controller]")] public class valuescontroller : controller { // get: api/values [httpget] public ienumerable<string> get() { return new string[] { "value1", "value2" }; } // api/values/5 [httpget("{id}")] public string get(int id) { return "value"; } }
when publish asp.net 5 application through dnu publish, structure similar following one:

you need deploy folder structure hosting provider. assuming have iis, .net 4.5.1 , application pool 4.0, should work fine when point application pool wwwroot folder in above structure.
have @ "how azure web apps hosts asp.net 5 application" blog post more info how asp.net 5 being hosted under iis.
Comments
Post a Comment