title: Sitecore WFFM adding mvc forms error
body: <p>I am try to integrate MVC-web forms that is created by WFFM module.</p>
  
  <p>When inserting form via SitecoreItem => Presentation Details => Insert Form. Then try to see it in the site got below error.</p>
  
  <p>No complex form i have , just single line text.</p>
  
  <pre><code>  11440 21:26:21 ERROR Application error.
  Exception: System.Web.HttpUnhandledException
  Message: An unhandled exception occurred.
  Source: Sitecore.Mvc
     at Sitecore.Mvc.Pipelines.MvcEvents.Exception.ShowAspNetErrorMessage.ShowErrorMessage(ExceptionContext exceptionContext, ExceptionArgs args)
     at Sitecore.Mvc.Pipelines.MvcEvents.Exception.ShowAspNetErrorMessage.Process(ExceptionArgs args)
     at (Object , Object[] )
     at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
     at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
     at Sitecore.Mvc.Pipelines.PipelineService.RunPipeline[TArgs](String pipelineName, TArgs args)
     at Sitecore.Mvc.Filters.PipelineBasedRequestFilter.OnException(ExceptionContext exceptionContext)
     at System.Web.Mvc.ControllerActionInvoker.InvokeExceptionFilters(ControllerContext controllerContext, IList`1 filters, Exception exception)
     at System.Web.Mvc.Async.AsyncControllerActionInvoker.&lt;&gt;c__DisplayClass21.&lt;BeginInvokeAction&gt;b__1e(IAsyncResult asyncResult)
     at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult)
     at System.Web.Mvc.Controller.&lt;BeginExecuteCore&gt;b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState)
     at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
     at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)
     at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
     at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult)
     at System.Web.Mvc.MvcHandler.&lt;BeginProcessRequest&gt;b__5(IAsyncResult asyncResult, ProcessRequestState innerState)
     at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
     at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
     at Sitecore.Mvc.Routing.RouteHttpHandler.EndProcessRequest(IAsyncResult result)
     at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
     at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously)
  
  Nested Exception
  
  Exception: System.InvalidOperationException
  Message: Error while rendering view: '/Views/Main/XXXXXXXXXX.cshtml' (model: 'Sitecore.Mvc.Presentation.RenderingModel, Sitecore.Mvc').
  
  Source: Sitecore.Mvc
     at Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer)
     at Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Render(Renderer renderer, TextWriter writer, RenderRenderingArgs args)
     at Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Process(RenderRenderingArgs args)
     at (Object , Object[] )
     at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
     at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
     at Sitecore.Mvc.Pipelines.PipelineService.RunPipeline[TArgs](String pipelineName, TArgs args)
     at Sitecore.Mvc.Presentation.RenderingView.Render(ViewContext viewContext, TextWriter writer)
     at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)
     at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
     at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
     at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
     at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult)
     at System.Web.Mvc.Async.AsyncControllerActionInvoker.&lt;&gt;c__DisplayClass21.&lt;BeginInvokeAction&gt;b__1e(IAsyncResult asyncResult)
  
  Nested Exception
  
  Exception: System.Web.HttpUnhandledException
  Message: An unhandled exception occurred.
  Source: Sitecore.Mvc
     at Sitecore.Mvc.Pipelines.MvcEvents.Exception.ShowAspNetErrorMessage.ShowErrorMessage(ExceptionContext exceptionContext, ExceptionArgs args)
     at Sitecore.Mvc.Pipelines.MvcEvents.Exception.ShowAspNetErrorMessage.Process(ExceptionArgs args)
     at (Object , Object[] )
     at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
     at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
     at Sitecore.Mvc.Pipelines.PipelineService.RunPipeline[TArgs](String pipelineName, TArgs args)
     at Sitecore.Mvc.Filters.PipelineBasedRequestFilter.OnException(ExceptionContext exceptionContext)
     at System.Web.Mvc.ControllerActionInvoker.InvokeExceptionFilters(ControllerContext controllerContext, IList`1 filters, Exception exception)
     at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)
     at System.Web.Mvc.Controller.ExecuteCore()
     at System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext)
     at Sitecore.Mvc.Controllers.ControllerRunner.ExecuteController(Controller controller)
     at Sitecore.Mvc.Controllers.ControllerRunner.Execute()
     at Sitecore.Mvc.Presentation.ControllerRenderer.Render(TextWriter writer)
     at Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Render(Renderer renderer, TextWriter writer, RenderRenderingArgs args)
     at Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Process(RenderRenderingArgs args)
     at (Object , Object[] )
     at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
     at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
     at Sitecore.Mvc.Pipelines.PipelineService.RunPipeline[TArgs](String pipelineName, TArgs args)
     at Sitecore.Mvc.Helpers.SitecoreHelper.RenderRendering(Rendering rendering)
     at ASP._Page_Views_Main_XXXXXXXX_cshtml.Execute() in d:\XXXXXX\TrunkXXXXXX\Src\Project\XXXXXXXX - Copy\Code\Views\Main\XXXXXXXXX.cshtml:line 65
     at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
     at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
     at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
     at System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData)
     at Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer)
  
  Nested Exception
  
  Exception: System.Web.HttpCompileException
  Message: External component has thrown an exception.
  Source: System.Web
     at System.Web.Compilation.AssemblyBuilder.Compile()
     at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
     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 System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)
     at Sitecore.Forms.Mvc.Controllers.FormResult`2.ExecuteResult(ControllerContext context)
     at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
     at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
     at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
     at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult)
     at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)
  </code></pre>
  
  <ul>
  <li>Sitecore Version installed is 8.2 update-4.</li>
  <li>WFFM Version is (8.2 rev. 170518)</li>
  </ul>
  
  <p>Please if u need further details let me know. </p>