DNN Re-Index error: There is no build provider registered for the extension '.cshtml'

383 Views Asked by At

I Upgraded DotNetNuke from version 8 to version 9.01.01 (116).

After the upgrade, I had a problem where all the users were not indexed.

The following process was followed in order to reindex the site:

  1. The site was stopped in IIS.
  2. All the files where deleted in <Site>\App_Data\Search
  3. IIS Site was started
  4. Re-index was done under site search -> settings
  5. When searching the missing users where returned.

After the above, all the DNN MVC custom modules stopped working with the following error:

DotNetNuke.Services.Exceptions.ModuleLoadException:
 There is no build provider registered for the extension '.cshtml'. You 
can register one in the <compilation><buildProviders> 
section in machine.config or web.config. Make sure is has a 
BuildProviderAppliesToAttribute attribute which includes the value 'Web'
 or 'All'. ---> System.Web.HttpException: There is no build provider 
registered for the extension '.cshtml'. You can register one in the 
<compilation><buildProviders> section in machine.config or 
web.config. Make sure is has a BuildProviderAppliesToAttribute attribute
 which includes the value 'Web' or 'All'.
   at 
System.Web.Compilation.CompilationUtil.GetBuildProviderTypeFromExtension(CompilationSection
 config, String extension, BuildProviderAppliesTo neededFor, Boolean 
failIfUnknown)
   at 
System.Web.Compilation.BuildManager.CreateBuildProvider(VirtualPath 
virtualPath, BuildProviderAppliesTo neededFor, CompilationSection 
compConfig, ICollection referencedAssemblies, Boolean failIfUnknown)
   at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath 
virtualPath)
   at 
System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath
 virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean 
allowBuildInPrecompile, Boolean throwIfNotFound, Boolean 
ensureIsUpToDate)
   at 
System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext
 context, VirtualPath virtualPath, Boolean noBuild, Boolean 
allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, 
Boolean ensureIsUpToDate)
   at 
System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath
 virtualPath, HttpContext context, Boolean allowCrossApp, Boolean 
throwIfNotFound)
   at System.Web.Compilation.BuildManager.GetCompiledType(VirtualPath 
virtualPath)
   at System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext 
viewContext, TextWriter writer)
   at 
DotNetNuke.Web.Mvc.Framework.ActionResults.DnnViewResult.ExecuteResult(ControllerContext
 context, TextWriter writer)
   at DotNetNuke.Web.Mvc.MvcHostControl.RenderModule(ModuleRequestResult
 moduleResult)
   at DotNetNuke.Web.Mvc.MvcHostControl.OnPreRender(EventArgs e)

Thank you in advance.

0

There are 0 best solutions below