我分3个步骤升级了umbraco版本:
- 本布拉科从 7.2.8 升级到 7.3.0
- 本布拉科从 7.3.0 升级到 7.3.8
- 本布拉科从 7.3.8 升级到 7.4.3
在我的解决方案中,ImageResizer.Plugins.AzureReader2在升级前工作,但在升级后它已停止工作。
如果我在我的 web.config 中注释掉下面的连接字符串,它将停止抛出错误:
<resizer>
<plugins>
<add name="DiskCache" />
<add name="MvcRoutingShim" />
<add name="AzureReader2" connectionString="" endpoint="" prefix="~/azure/" />
</plugins>
<sizelimits imageWidth="0" imageHeight="0" totalWidth="8000" totalHeight="8000" totalBehavior="throwexception" />
<diskCache dir="~/imagecache" autoClean="true" />
<clientcache minutes="10080" />
</resizer>
错误描述 :
Value cannot be null.
Parameter name: assemblyFile
[ArgumentNullException: Value cannot be null.
Parameter name: assemblyFile]
System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark) +14309512
System.Reflection.Assembly.LoadFrom(String assemblyFile) +54
Microsoft.WindowsAzure.AzureApplicationSettings.GetServiceRuntimeAssembly() +201
Microsoft.WindowsAzure.AzureApplicationSettings..ctor() +93
Microsoft.WindowsAzure.CloudConfigurationManager.get_AppSettings() +152
Microsoft.WindowsAzure.CloudConfigurationManager.GetSetting(String name) +26
ImageResizer.Plugins.AzureReader2.AzureVirtualPathProvider..ctor(String blobStorageConnection) +50
ImageResizer.Plugins.AzureReader2.AzureReader2Plugin.Install(Config c) +285
ImageResizer.Configuration.PluginConfig.loadPluginsInternal() +265
ImageResizer.Configuration.PluginConfig.LoadPlugins() +56
ImageResizer.Configuration.Config.get_Current() +129
ImageResizer.InterceptModule.System.Web.IHttpModule.Init(HttpApplication context) +415
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +618
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +402
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +343
[HttpException (0x80004005): Value cannot be null.
Parameter name: assemblyFile]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +579
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +112
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +712
诊断页输出https://gist.github.com/anonymous/12889621aabca8401170ce7d2d82b38f
这很可能与Microsoft.WindowsAzure.ServiceRuntime Assembly: 2.7.0.0 File: 2.7.1198.742 Info: 2.7.1198.742 (rd_art_stable.151102-1219)
您的各种 Microsoft.WindowsAzure.* dll 彼此不兼容。尝试从同一 SDK 获取它们。
ImageResizer 与大多数 Azure SDK 版本向前兼容,因此您需要确定哪个版本使 Umbraco 和 ImageProcessor 满意(或删除 ImageProcessor 的 Azure 适配器)。