ASP.NET MVC Catch All

The ignore route is defined as follows:

routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

      

Why not

routes.IgnoreRoute("{resource}.axd/{*}");

      

What is the meaning of pathInfo?

Thanks.

+2


a source to share


3 answers


Similarly: Understanding Routing in Global.asax (asp.net-mvc)



+1


a source


An exception will be thrown, the route parameter must have a name. The meaning of the * sign is explained here File Path as MVC route argument



+2


a source


To just specify the route parameter, the name or exception will be thrown. You could name it {*foo}

.

0


a source







All Articles