Wednesday, April 18, 2012

Windows Azure caching cshtml files?

I'm evaluating Windows Azure for an MVC application I'm working on. I ported the app a little while ago and uploading without any issues. I've come back about 4 weeks later to upload the next version and now I'm getting an exception being thrown.



Source: System.Web.WebPages
Message: Section not defined: "main".
Stack trace: at System.Web.WebPages.WebPageBase.RenderSection(String name, Boolean required) at ASP._Page_Views_Shared__Layout_cshtml.Execute() in e:\sitesroot\Views\Shared_Layout.cshtml:line 77 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.WebPages.WebPageBase.RenderSurrounding(String partialViewName, Action`1 body) at System.Web.WebPages.WebPageBase.PopContext() at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c_DisplayClass25.b_22(IAsyncResult asyncResult) at System.Web.Mvc.Controller.<>c_DisplayClass1d.b_18(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.<>c_DisplayClass4.b_3(IAsyncResult ar) at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.<>c_DisplayClass4.b_3(IAsyncResult ar) at System.Web.Mvc.MvcHandler.<>c_DisplayClass6.<>c_DisplayClassb.b_4(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.<>c_DisplayClass4.b__3(IAsyncResult ar) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)



The only reason that I can think that this would happening is that either the _layout.cshtml file is not updating or the Home/Index.cshtml file is not updating. The MVC application works correctly both running in the Windows Azure emulator or running stand alone in IIS.



I have completely deleted the role and redeployed as well as upgraded. I have not configured CDN or the Azure Cache and I can confirm files that have been added to the project since the last successful deployment are available.



Right now I'm out of ideas...





No comments:

Post a Comment