I installed the site on our web server using IIS8. The URL is a link to ABC.mycompany.com. When I go to ABC.mycompany.com, I get an error:
Server error in application "/".
Resource is not found.
Description: HTTP 404. The resource you are looking for (or its dependencies) may have been deleted, its name changed or temporarily unavailable. Review the following URL and make sure it is spelled correctly.
Requested URL: /
Version Information: Microsoft.NET Framework Version: 4.0.30319; ASP.NET Version: 4.0.30319.17929
If I go to ABC.mycompany.com/Home/InstrumentList, it will show the correct page I want to start with. How can I start with this route?
In Visual Studio 2013, I have a Home / InstrumentList set as my action to start, and this works fine. I looked at a few examples where they link to the default pages and indexes, but my application does not have any of them. In addition, there are links to .aspx pages, but in my application there are no .aspx pages, just .cshtml Views and .cs Controllers. I also saw things about adding routes, but I'm not sure where to put them in global.asax.cs (in ApplicationStart? Beyond this? In another method? Only one?). I also do not know what to change to work on mine (change the index to InstrumentListing or leave it alone). So far, nothing has worked for me.
Here is one of my attempts using global.asax.cs where I tried to add a registration route method:
namespace GPC
{
public class MvcApplication : System.Web.HttpApplication
{
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
RouteConfig.RegisterRoutes(RouteTable.Routes);
WebApiConfig.Register(GlobalConfiguration.Configuration);
}
public static void RegisterRoutes(RouteCollection routes)
{
routes.MapRoute(
"Default",
"{controller}/{action}/{Filtre}",
new { controller = "Home", action = "Index", Filtre = UrlParameter.Optional });
}
}
}
, , :
http://weblog.west-wind.com/posts/2013/Aug/15/IIS-Default-Documents-vs-ASPNET-MVC-Routes
MVC
http://weblogs.asp.net/imranbaloch/editing-routes-in-mvc
, - , ABC.mycompany.com/Home/InstrumentList, , ABC.mycompany.com.