Reputation: 13
I deployed a MVC web application with razor view to godaddy.com. My application works fine on localhost, but after deployed, it cannot route to my home page when I typed in the domain name. I have the following route registered in my Global.axcs file.
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "HomePage", action = "Index", id = UrlParameter.Optional } // Parameter defaults
);
Godaddy's technical supports asked me to add an index.html file in the root. I did add one and comment the default route in Global. And it loads the index.html. But I really want to display my /HomePage/Index
Does anyone know why this happens, and any suggestions?
Upvotes: 1
Views: 1888
Reputation: 3770
I also faced a similar issue in the past.
One issue here might be that your server does not have MVC installed (as in my case).
Resolution : I followed the post to bin deploy the MVC assemblies together with my web application.
http://haacked.com/archive/2011/05/25/bin-deploying-asp-net-mvc-3.aspx
It worked for me.
Give it a try and I think it should work.
Upvotes: 1