MVC3 - all routing works locally, but not remotely

I have a new MVC3 project with one PublicController.cs controller, which contains 4 identical methods for checking how routing works. The only difference between them is their name, and each of them indicates a different view ...

public class PublicController : Controller
{
    //
    // GET: /Public/
    public ActionResult Index()
    {
        return View();
    }

    //
    // GET: /Public/App
    public ActionResult App()
    {
        return View();
    }

    //
    // GET: /Public/Press
    public ActionResult Press()
    {
        return View();
    }

    //
    // GET: /Public/Contact
    public ActionResult Contact()
    {
        return View();
    }
}

I can get to all of them when I run on the development server by visiting these URLs ...

http://localhost:53367/Public/

or its equivalent

http://localhost:53367/Public/Index

and then

http://localhost:53367/Public/App
http://localhost:53367/Public/Press 
http://localhost:53367/Public/Contact

However, after deployment to a remote ASP.NET 4.0 server, only two work:

http://localhost:53367/Public
http://localhost:53367/Public/Index

... everyone else gives me a 404 resource that cannot be found.

- - netcetera, ( MVC , MVC2, ). " ", , . .

, ?

,

+3
1

, MVC 3 Framework - 4.x ASP.net?

0

Source: https://habr.com/ru/post/1792413/


All Articles