Sandi Horvat
Sandi Horvat

Reputation: 455

Set index Home page instead of Azures This mobile app is up and running

all my redirections in Route.Config is working fine, instead of my home default link is displaying Azure's This mobile app is up and running

http://localhost:51540/

Bellow is my RouteConfig code

 routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            routes.IgnoreRoute("");



            routes.MapRoute(
    name: "/Index",
    url: "Index/{id}",
    defaults: new { controller = "MyController", action = "Index", id = UrlParameter.Optional }
);

When I add my code without /index i get 404 on > http://localhost:51540/ and on > http://localhost:51540/Index.

  routes.MapRoute(
        name: "without /index",
        url: "{controller}/{action}/{id}",
       defaults: new { controller = "MyController", action = "Index", id = UrlParameter.Optional }
    );

Does anybody know where can I change this configurations/settings?

Regards!

Upvotes: 1

Views: 74

Answers (1)

Alex Belotserkovskiy
Alex Belotserkovskiy

Reputation: 4062

There is the .UseDefaultConfiguration() method invoked in the Startup.MobileApp.cs. The part of that is the AddMobileAppHomeController() which depends on the corresponding Microsoft.Azure.Mobile.Server.Controllers.HomeController reference. I believe it is what blocks you from the implementation of what you are doing.

Helpful post and announcement about that

Upvotes: 1

Related Questions