1 Replies - 182 Views - Last Post: 29 November 2018 - 01:59 AM

#1 tokei   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 78
  • Joined: 15-December 11

RouteConfig problem when setup web in IIS

Posted 28 November 2018 - 09:00 PM

Hi all,

I have a problem when setting Routeconfig with web MVC. It is the problem when I set with IIS. If I set with IIS Express , it does not a problem.

I have follow the tutorial but not success.

Here is the code :

        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            // Cannot access /Reminder . Why ?
            routes.MapRoute(
                name: "sss",
                url: "Reminder/{action}/{id}",
                defaults: new { controller = "Reminder", action = "Index", id = UrlParameter.Optional }
            );

            // Can access /ReminderX
            routes.MapRoute(
                name: "fff",
                url: "ReminderX/{action}/{id}",
                defaults: new { controller = "ReminderX", action = "Index", id = UrlParameter.Optional }
            );

            // Can access /Home
            routes.MapRoute(
                name: "Default",
                url: "Home/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
            );
        }



Problem is I cannot view the page :
http://localhost/Win...ebMVC/Reminder/

The outcome is HTTP Error 403.14 - Forbidden

Need your help.

Thanks

Is This A Good Question/Topic? 0
  • +

Replies To: RouteConfig problem when setup web in IIS

#2 andrewsw   User is offline

  • Stealth IT
  • member icon

Reputation: 6746
  • View blog
  • Posts: 27,776
  • Joined: 12-December 12

Re: RouteConfig problem when setup web in IIS

Posted 29 November 2018 - 01:59 AM

What do the relevant controllers and actions look like?
(Or are you trying to access a folder?)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1