Search code examples
sitecoreglass-mappersitecore-mvc

Glass.Mapper.Sc.Mvc.config is not available in App_Config folder


In my MVC project i have installed Glass.Mapper.Sc successfully but not able to see Glass.Mapper.Sc.Mvc.config file App_start folder is showing following files:

  • GlassMapperSc.cs
  • GlassMapperScCustom.cs

Please anyone help me to figure out what i'm doing wrong..?


Solution

  • Amitavin,

    The Glass.Mapper.Sc.Mvc.config file will actually live in \APP_config\Include\ as it is a Sitecore Patch config file. The two files in App_Start will configured Glass in your preferred IoC container.

    Please note that Glass is actually moving away from this approach in its latest version in favor of using a Sitecore Pipeline. See this blog for more detail -> http://glass.lu/en/Blog/WebActivatorRemoval.aspx