No error found in asp.net-mvc

Every time I run a specific application, it shows No error found alt text

Does anyone know how to solve this?

I put the debugger in the page_load event in the default.aspx.cs file, but it is not called.

The following is the routing configuration:

 routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
        routes.MapRoute(
            "Default",                                              // Route name
            "{controller}/{action}/{id}",                           // parameters
            new { controller = "Home", action = "Index", id = "" }  // Parametedefaults
        );

I tried everything I could, but it does not work.

+3
source share
6 answers

Which web server do you use on VS Dev / Cassini? IIS? See if you have a default.aspx file in the root folder. You need a dummy root default.aspx for MVC to work with some web servers.

0
source

IIS 6, wild card aspnet isapi filter, URL- . , , . mvc . IIS 6 , asp.net

IIS 6 (http://blog.stevensanderson.com/2008/07/04/options-for-deploying-aspnet-mvc-to-iis-6/).

, IIS7, . .

0

, :

  • . , Controller/Action.
  • IIS, . . this.
0

Default.aspx, :

using System.Web;
using System.Web.Mvc;
using System.Web.UI;

public partial class Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, System.EventArgs e)
    {
        HttpContext.Current.RewritePath(Request.ApplicationPath, false);
        IHttpHandler httpHandler = new MvcHttpHandler();
        httpHandler.ProcessRequest(HttpContext.Current);
    }
}

iis, . : http://weblogs.asp.net/scottgu/archive/2007/03/04/tip-trick-integrating-asp-net-security-with-classic-asp-and-non-asp-net-urls.aspx

0

. :

Routes.MapRoute("Site (*)", "{action}", new {
    controller = "Site",
    action = "Default"
});

, " ", . , /Home, /Contact, /{Whatever}.

0

page_load default.aspx.cs, . :

  • default.aspx StartUp .

IIS.

0

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


All Articles