0

场景:多租户 Orchard 1.9.3 部署在单个实例 Azure Web 应用程序中运行,其中所有设置和媒体都存储在 Azure blob 存储中。

启用文件系统输出缓存后(因此所有缓存项目都存储在App_Data\OutputCache文件夹中,我看到条目被添加到文件夹中就好了。但似乎具有长 URL 的项目正在抛出错误并导致 500 被抛出。有时它很长URL,但有时常见的广告系列管理链接(Google Analytics 的 UTM 代码)会导致问题,因为它们也会使用额外的查询字符串选项制作长 URL。如下所示,错误是尝试查找文件时的路径无效在缓存中。

以下是一些错误(请注意错误中的链接现在可以正常工作,因为我已禁用缓存并且错误已消失)。

我注意到 1.9.x 版本中的文件系统输出缓存发生了变化……长 URL 是个问题吗?

2016-05-09 00:00:17,596 [19] Orchard.OutputCache.Filters.OutputCacheFilter - Default - An unexpected error occured while reading a cache entry
 http://www.andrewconnell.com/archive/2012/07/30/sharepoint-2010-metadata-based-navigation-in-publishing-sites-series-overview.aspx
System.ArgumentException: Invalid path
   at Orchard.Validation.PathValidation.ValidatePath(String basePath, String mappedPath) in C:\Orchard\src\Orchard\Validation\PathValidation.cs:line 29
   at Orchard.FileSystems.AppData.AppDataFolder.CombineToPhysicalPath(String[] paths) in C:\Orchard\src\Orchard\FileSystems\AppData\AppDataFolder.cs:line 95
   at Orchard.FileSystems.AppData.AppDataFolder.FileExists(String path) in C:\Orchard\src\Orchard\FileSystems\AppData\AppDataFolder.cs:line 158
   at Orchard.OutputCache.Services.FileSystemOutputCacheStorageProvider.<>c__DisplayClass12_0.<GetCacheItem>b__0()
   at Orchard.OutputCache.Services.FileSystemOutputCacheStorageProvider.Retry[T](Func`1 action)
   at Orchard.OutputCache.Services.FileSystemOutputCacheStorageProvider.GetCacheItem(String key)
   at Orchard.OutputCache.Filters.OutputCacheFilter.GetCacheItem(String key)
2016-05-09 00:00:17,628 [19] Orchard.OutputCache.Filters.OutputCacheFilter - Default - An unexpected error occured while reading a cache entry
 http://www.andrewconnell.com/archive/2012/07/30/sharepoint-2010-metadata-based-navigation-in-publishing-sites-series-overview.aspx
System.ArgumentException: Invalid path
   at Orchard.Validation.PathValidation.ValidatePath(String basePath, String mappedPath) in C:\Orchard\src\Orchard\Validation\PathValidation.cs:line 29
   at Orchard.FileSystems.AppData.AppDataFolder.CombineToPhysicalPath(String[] paths) in C:\Orchard\src\Orchard\FileSystems\AppData\AppDataFolder.cs:line 95
   at Orchard.FileSystems.AppData.AppDataFolder.FileExists(String path) in C:\Orchard\src\Orchard\FileSystems\AppData\AppDataFolder.cs:line 158
   at Orchard.OutputCache.Services.FileSystemOutputCacheStorageProvider.<>c__DisplayClass12_0.<GetCacheItem>b__0()
   at Orchard.OutputCache.Services.FileSystemOutputCacheStorageProvider.Retry[T](Func`1 action)
   at Orchard.OutputCache.Services.FileSystemOutputCacheStorageProvider.GetCacheItem(String key)
   at Orchard.OutputCache.Filters.OutputCacheFilter.GetCacheItem(String key)
2016-05-09 00:00:32,565 [30] Orchard.OutputCache.Filters.OutputCacheFilter - mscloudshow - An unexpected error occured while reading a cache entry
 http://www.microsoftcloudshow.com/blog/episode-087-catching-up-with-paul-schaeflein-on-azure-ad-improvements?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed:+MicrosoftCloudShow+(Microsoft+Cloud+Show)
System.ArgumentException: Invalid path
   at Orchard.Validation.PathValidation.ValidatePath(String basePath, String mappedPath) in C:\Orchard\src\Orchard\Validation\PathValidation.cs:line 29
   at Orchard.FileSystems.AppData.AppDataFolder.CombineToPhysicalPath(String[] paths) in C:\Orchard\src\Orchard\FileSystems\AppData\AppDataFolder.cs:line 95
   at Orchard.FileSystems.AppData.AppDataFolder.FileExists(String path) in C:\Orchard\src\Orchard\FileSystems\AppData\AppDataFolder.cs:line 158
   at Orchard.OutputCache.Services.FileSystemOutputCacheStorageProvider.<>c__DisplayClass12_0.<GetCacheItem>b__0()
   at Orchard.OutputCache.Services.FileSystemOutputCacheStorageProvider.Retry[T](Func`1 action)
   at Orchard.OutputCache.Services.FileSystemOutputCacheStorageProvider.GetCacheItem(String key)
   at Orchard.OutputCache.Filters.OutputCacheFilter.GetCacheItem(String key)
2016-05-09 00:00:32,581 [30] Orchard.OutputCache.Filters.OutputCacheFilter - mscloudshow - An unexpected error occured while reading a cache entry
 http://www.microsoftcloudshow.com/blog/episode-087-catching-up-with-paul-schaeflein-on-azure-ad-improvements?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed:+MicrosoftCloudShow+(Microsoft+Cloud+Show)
System.ArgumentException: Invalid path
   at Orchard.Validation.PathValidation.ValidatePath(String basePath, String mappedPath) in C:\Orchard\src\Orchard\Validation\PathValidation.cs:line 29
   at Orchard.FileSystems.AppData.AppDataFolder.CombineToPhysicalPath(String[] paths) in C:\Orchard\src\Orchard\FileSystems\AppData\AppDataFolder.cs:line 95
   at Orchard.FileSystems.AppData.AppDataFolder.FileExists(String path) in C:\Orchard\src\Orchard\FileSystems\AppData\AppDataFolder.cs:line 158
   at Orchard.OutputCache.Services.FileSystemOutputCacheStorageProvider.<>c__DisplayClass12_0.<GetCacheItem>b__0()
   at Orchard.OutputCache.Services.FileSystemOutputCacheStorageProvider.Retry[T](Func`1 action)
   at Orchard.OutputCache.Services.FileSystemOutputCacheStorageProvider.GetCacheItem(String key)
   at Orchard.OutputCache.Filters.OutputCacheFilter.GetCacheItem(String key)
4

0 回答 0