why global.asax missing a method ?

I am using ASP.NET MVC. But  I am missing  methods  RegisterRoutes and registerGlobalFilters  in global.asax.

I contains only the following method. Why ? Should I have to add those method manually ?

// Note: For instructions on enabling IIS6 or IIS7 classic mode, 
    // visit http://go.microsoft.com/?LinkId=9394801

    public class MvcApplication : System.Web.HttpApplication
    {
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();

            WebApiConfig.Register(GlobalConfiguration.Configuration);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
            AuthConfig.RegisterAuth();
        }
    }

Open in new window

Varshini SAsked:
Who is Participating?
 
Snarf0001Connect With a Mentor Commented:
Well, if you wanted to, you could just move the individual functions RegisterRoutes, RegisterBundles etc out of their individual classes and back into global.asax and call them directly.

But would be work for no real, point, they're better structured and encapsulated in the app_start.
I would just use them from there.
0
 
Snarf0001Commented:
Don't recall what version of MVC it was (3 maybe), but those methods were moved by default into their own classes in App_Start.  They should be in there.
0
 
Snarf0001Commented:
Should note as well, doesn't really matter.  If you're more comfortable having them in there, move them back, the default templates just started putting them in their own classes and in a different folder.
0
 
Varshini SAuthor Commented:
Snarf0001: You are correct. It is MVC 3. It is in App_start folder. But I did not get you  about move them back to own classes. How ?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.