I created a very small project with ASP.NET vnext with a simple MVC controller and a simple Api controller.
Everything works on the local host. If I turn around on the azure site, only part of the MVC works
Here is my project.json
{ "webroot": "wwwroot", "version": "1.0.0-*", "exclude": [ "wwwroot" ], "packExclude": [ "node_modules", "bower_components", "**.kproj", "**.user", "**.vspscc" ], "dependencies": { "Microsoft.AspNet.Server.IIS": "1.0.0-beta2", "Microsoft.AspNet.Mvc": "6.0.0-beta2" }, "frameworks" : { "aspnet50" : { }, "aspnetcore50" : { } } }
Startup.cs
using Microsoft.AspNet.Builder; using Microsoft.Framework.DependencyInjection; namespace Project.Web6 { public class Startup { public void ConfigureServices(IServiceCollection services) { services.AddMvc(); } public void Configure(IApplicationBuilder app) {
MVC controller
public class HomeController : Controller {
API controller
[Route("api/[controller]")] public class MessagesController : Controller {
The MVC controller is working fine, but if I go to http://myproject.azurewebsites.net/api/Messages , it will return 404
Swell source share