2

I am trying to deploy a test ASP.NET MVC site to a site hosted on the Rackspace Cloud (essentially just the default site you get when you create a new ASP.NET MVC Web App in Visual Studio).

ASP.NET MVC does not appear to be installed so I have deployed the System.Web.Mvc.dll to the bin folder.

Now, when I access /Default.aspx I get the Home view. But if I enter /Home I get a 404 Page Not Found (I also get a 404 if I access the /Home/About URL).

I have tried adding the .aspx extension to my routes as defined in Global.asax to see if that made any difference but still got the same 404 error.

Am I right in thinking that I should be able to fix this via the Web.config file?

Thanks

1 Answer 1

3

Did you try adding "Root" to the routes and the .aspx extension?

    routes.MapRoute(
        "Default",
        "{controller}.aspx/{action}/{id}",
        new { action = "Index", id = "" }
    );

    routes.MapRoute(
        "Root",
        "",
        new { controller = "Home", action = "Index", id = "" }
    ); 
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.