We have a custom implementation of IFileProvider that returned null for any call to GetDirectoryContents. We don't normally deal with contents of a directory, but when WebOptimizer ran into a file it couldn't find it called provider.GetAllFiles("/") which eventually lead to a NRE. It took a bit for me to track down what was going on. Our IFileProvider now properly returns NotFoundDirectoryContents.Singleton (and is also converted to enable nullable reference types), but this change could help someone in the future from running into the same problem.
We have a custom implementation of
IFileProvider
that returnednull
for any call toGetDirectoryContents
. We don't normally deal with contents of a directory, but when WebOptimizer ran into a file it couldn't find it calledprovider.GetAllFiles("/")
which eventually lead to a NRE. It took a bit for me to track down what was going on. Our IFileProvider now properly returnsNotFoundDirectoryContents.Singleton
(and is also converted to enable nullable reference types), but this change could help someone in the future from running into the same problem.