How to recover Friendly URL in ASP.Net

1

I had problems with AJAX in my project (I did not take it directly), to fix it I had to modify this line settings.AutoRedirectMode = RedirectMode.Permanent; within my ~/App_Start/RouteConfig.cs .

Replace it with the following line, according to an answer from StackOverflow settings.AutoRedirectMode = RedirectMode.Off;

Now the ajax is going well, the project takes me, but I lost my Frendy Users URL's.

So now all my pages are displayed again as a page. aspx

I do not want them to have termination .aspx

How can I continue to keep FrendlyUsers URL's on asp.net, with this RoutConfig:

    public static class RouteConfig
{
    public static void RegisterRoutes(RouteCollection routes)
    {
        var settings = new FriendlyUrlSettings();
        //settings.AutoRedirectMode = RedirectMode.Permanent;
        routes.EnableFriendlyUrls(settings);
        settings.AutoRedirectMode = RedirectMode.Off;
    }
}
    
asked by Oren Diaz 14.05.2018 в 05:14
source

0 answers