Reputation: 57
Where do I add a static html file "mycoolpage.html" to a MVC4 project so it will be served when requesting "mysite.cloudapp.net/mycoolpage.html" when deployed to azure?
I've tried adding it to the project and setting up routes like
routes.IgnoreRoute("{resource}.html");
and tried returning it from a controller using the following route
routes.MapRoute(
"mycoolsite.html",
"mycoolsite.html",
new { controller = "Home", action = "Coolsite" }
);
Upvotes: 3
Views: 3697
Reputation: 11294
Have you tried: routes.IgnoreRoute("*.html")
, with the file in the root folder of your MVC site?
(From: Getting MVC to ignore route to site root)
Upvotes: 5