I have an issue with loading the pages from a MVC5 application.
I have this software installed and used:
My problem went away once I added a specific map route to RouteConfig.cs in the App_start folder
'routes.MapRoute("Buy lands", // string name "BuyLands/Index", // string Url new { controller = "BuyLands", Action = "Index" });
// controller name is BuyLands'
Here's what resolved my specific problem:
From Visual Studio, right click on the Website Project > Properties > Web > Select "Specific Page" > Browse > Select the Default page.
If you're using MVC 5 or higher, make sure that you remove move ".cshtml" and remove the Views directory. For example, the directory will show as Views/ControllerName/Index.cshtml. Remove Views so it shows as ControllerName/Index
your root directory is empty?(index.html,index.aspx vb.) and I think Your project web.config default document property is not set.
Directory Browse Web.config properties
<configuration>
<location path="special_directory_name_here">
<system.webServer>
<directoryBrowse enabled="true" />
</system.webServer>
</location>
</configuration>
Please configure to your project default route settings, because your default route settings, is not redirect to controller.
Change Default route settings
http://blogs.msdn.com/b/prakasht/archive/2013/08/08/change-the-default-route-in-asp-net-mvc.aspx
Default Document Property web.config
<configuration>
<system.webServer>
<defaultDocument>
<files>
<add value="index.php" />
</files>
</defaultDocument>
</system.webServer>
</configuration>
This is a quick solution for quick app testing purposes and not intended for solving the root cause - not MVC:
Errors when the ASP.NET application starts at http://localhost:port#/
Works when the url changed to http://localhost:45269/HTMLPageName.html
I finally figured it out. All I had to do was change the url in RouteConfig.cs
from
url: "{controller}/{action}/{name}/{id}"
to
url: "{controller}/{action}",