ASP.NET MVC blank page | SoloLearn: Learn to code for FREE!


ASP.NET MVC blank page

I have a webpage configured with all the necessary controllers,models,views and a database. However whenever i run the page, all i get is a blank page.I tend to imagine the problem is on my routeConfig.cs but i can;t figure it out. Here it is using System.Web.Mvc; using System.Web.Routing; namespace TOURS { public class RouteConfig { public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( name: "Default", url: "", defaults: new { controller = "Home", action = "index", id = UrlParameter.Optional } ); } } }

8/23/2018 8:41:06 PM


4 Answers

New Answer


Hi. Why value of “url” parameter in method MapRoute is empty? Try to set it’s value to "{controller}/{action}/{id}"


the index.html is called within the home controller


could you please show me home controller and index.html?


ive been looking at it and i realised on the public ActionResult Index() { return file("~/Client/index.html","text/html"); } i had not defined the path correctly.