MVC framework provide support to static files e.g. images, css, js. Its just .html files are not configured by default.

In order us to include static files in application we need to tell MVC application to allow Html file.


routes.IgnoreRoute("StaticHtmls/{*path}");

After you include this in Route configuration files. You should be able to access all .html files in 'StaticHtmls' folder directly.

e.g.

  • http://YourSite/StaticHtmls/YourHtmlFile.html
  • http://YourSite/StaticHtmls/YourHtmlFile.cshtml

.