0
我正在尝试使用来自NuGet的最新ImageResizer软件包来更新我们的解决方案。ImageResizer引发“未将对象引用设置为对象的实例”。更新后
更新后,我得到了下面的空例外。所以我试着恢复我的解决方案并再次更新软件包。同样的问题。 我也试过在ImageResizer中使用内置的诊断页面,但是这也有同样的问题。 NuGet更新期间没有问题。
堆栈跟踪:
[NullReferenceException: Object reference not set to an instance of an object.]
ImageResizer.Configuration.PluginConfig.ParseName(String typeName) +8
ImageResizer.Configuration.PluginConfig.FindPluginType(String searchNameString) +99
ImageResizer.Configuration.PluginConfig.add_plugin_by_name(String name, NameValueCollection args) +16
ImageResizer.Configuration.PluginConfig.loadPluginsInternal() +214
ImageResizer.Configuration.PluginConfig.LoadPlugins() +93
ImageResizer.Configuration.Config..ctor(ResizerSection config) +393
ImageResizer.Configuration.Config.get_Current() +109
ImageResizer.InterceptModule.System.Web.IHttpModule.Init(HttpApplication context) +276
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +536
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +336
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296
调整器设置在web.config中:
<resizer>
<plugins>
<add name="AzureReader2" prefix="~/cloud/" connectionString="DefaultEndpointsProtocol=https;AccountName=XXX;AccountKey=XXX" endpoint="https://XXX.windows.net/" />
<add logging="true" />
<add name="DiskCache" />
</plugins>
<clientcache minutes="60" />
<diskcache enabled="true" dir="~/App_Data/DiskCache" AutoClean="true" hashModifiedDate="true" subfolders="32" cacheAccessTimeout="15000" asyncWrites="false" asyncBufferSize="10485760" />
<cleanupStrategy startupDelay="00:05" minDelay="00:00:20" maxDelay="00:05" optimalWorkSegmentLength="00:00:04" targetItemsPerFolder="400" maximumItemsPerFolder="1000" avoidRemovalIfCreatedWithin="24:00" avoidRemovalIfUsedWithin="4.00:00" prohibitRemovalIfUsedWithin="00:05" prohibitRemovalIfCreatedWithin="00:10" />
</resizer>