Wednesday, July 31, 2013

MVC -Performance Improvement-Removed unused ViewEngine-WebFormViewEngine Or RazorViewEngine

Nicely explained..

Just to tell long story short...

Sometimes we referenced View that may not exist in such case MVC framework throws error and specify that it tried to search view in different possible location but they do not exist,

So View engine will try to search View\Home\index.chtml for source file but if the file don't exists it throws exception listing possible extension and location seach

so on.

If we're using only RazorViewEngine then we can get rid of rest of ViewEngine just by adding below lines of code in Global.asax

 ViewEngines.Engines.Add(new RazorViewEngine());
Post a Comment