Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Closed Issue: Output caching requires 'page' markers to work. [1513]

$
0
0
Porting from connect https://connectadmin/Feedback/ConnectTab.aspx?FeedbackID=759233:

Problem Description:
When deploying a precompiled MVC application, the Views folder is not required. All the views have been precompiled and the marker files left behind are unused. In webforms the marker files were used, because the system required a physical file (before routing was added). However, when implementing caching, the cache engine incorrectly puts a file dependency on the folder that contains the view. This causes an exception because that folder does not exist. This is very deep in 'internal classes' and therefore we cannot fix/change/modify. - When pre-compiling, there is no need for dependencies to be created at all (since the page cannot change) - Workaround is to create an empty 'Views' folder and proper empty folders underneath that. This makes the exception stop, because it can now put a dependency on the empty folder. I had previously reported this to developers as I helped them with some other issues regarding precompilation. It was supposedly fixed. Unsure...

Repro Steps:
Create MVC application and apply caching to a controller action.
Publish the application, with precompilation.
Deploy precompiled application, but do not deploy the Views folder (it contains nothing needed by MVC)
Run application and get exception..
Actual Results:
System.Web.HttpException (0x80070003): Directory 'C:\inetpub\wwwroot\Website\Views\Test' does not exist. Failed to start monitoring file changes.
at System.Web.FileChangesMonitor.FindDirectoryMonitor(String dir, Boolean addIfNotFound, Boolean throwOnError)
at System.Web.FileChangesMonitor.StartMonitoringPath(String alias, FileChangeEventHandler callback, FileAttributesData& fad)
at System.Web.Caching.CacheDependency.Init(Boolean isPublic, String[] filenamesArg, String[] cachekeysArg, CacheDependency dependency, DateTime utcStart)
at System.Web.Hosting.MapPathBasedVirtualPathProvider.GetCacheDependency(String virtualPath, IEnumerable virtualPathDependencies, DateTime utcStart)
at System.Web.ResponseDependencyList.CreateCacheDependency(CacheDependencyType dependencyType, CacheDependency dependency)
at System.Web.HttpResponse.CreateCacheDependencyForResponse()
at System.Web.Caching.OutputCacheModule.OnLeave(Object source, EventArgs eventArgs)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Expected Results:
No exception, caching to work and not automatically put a dependency.
Comments: This bug belongs to Core Asp.Net and was incorrectly filed here. Given that the generated marker files do say they are not to be deleted and you have a workaround for this, I'm going to mark this closed with a by design.

Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>