0

Does anyone know why I am getting thousands of calls to FileOpenOrCreate looking for random .cshtml and .vbhtml files using PerfView and the Processes / Files / Registry stacks section of a collection?

enter image description here

Mike Flynn
  • 22,342
  • 54
  • 182
  • 341

1 Answers1

0

If you spend just a little bit time on the source code (but not obvious how to locate the source files), you can see ASP.NET runtime (WebPageRoute) is trying to map request path to file system path,

https://github.com/aspnet/AspNetWebStack/blob/42991b3d2537b702736463f76a10a4fcf2ea44c9/src/System.Web.WebPages/WebPageRoute.cs#L35

In that process it utilizes a cache in MapPathBasedVirtualPathProvider,

https://referencesource.microsoft.com/#System.Web/Hosting/MapPathBasedVirtualPathProvider.cs,78

The file system access recorded by PerfView matches the behavior of building up such a cache, so there doesn't seem to be anything wrong there.

Lex Li
  • 60,503
  • 9
  • 116
  • 147
  • Why is it searching a shared drive that has thousands of images? That doesnt make sense. Why is it using full URLS and treating that as a path? I understand it matches the behavior but the folders its trying to do this on it not normal. – Mike Flynn May 20 '21 at 13:28
  • Only the developers of ASP.NET know what makes sense, so if you like, talk to them and see what they respond, https://github.com/aspnet/AspNetWebStack/issues – Lex Li May 20 '21 at 13:31