ExecuteCore() method in base controller is not firing in the MVC 4 RC

Generally we use BaseController in MVC which is inherited by all other controllers. In BaseController, We write  common code which can be used in the all pages e.g. setting the language in the current thread for multilingual site.

One of my friend migrated his code from MVC3 to MVC4 RC and found that the code written in the ExecuteCore() method of BaseController does not work. After debugging he found that ExecuteCore() method is not executing.

After searching on the net, we found the solution.

To make it work again. following code needs to be added in the BaseController class.

 protected override bool DisableAsyncSupport
        {
            get
            {
                return true;
            }
        }

 

 

This entry was posted in MVC and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s