{"id":2950,"date":"2014-03-11T17:42:37","date_gmt":"2014-03-11T17:42:37","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/11\/imageresizer-azurereader2-doesnt-work-with-latest-azure-sdk-2-1-0-3-collection-of-common-programming-errors-2\/"},"modified":"2014-03-11T17:42:37","modified_gmt":"2014-03-11T17:42:37","slug":"imageresizer-azurereader2-doesnt-work-with-latest-azure-sdk-2-1-0-3-collection-of-common-programming-errors-2","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/11\/imageresizer-azurereader2-doesnt-work-with-latest-azure-sdk-2-1-0-3-collection-of-common-programming-errors-2\/","title":{"rendered":"Imageresizer.AzureReader2 doesn&#39;t work with latest Azure SDK 2.1.0.3-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/8d69da0263a53dc51dcd53dae788ef1b?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nRyan<\/p>\n<p>I have an ASP.NET MVC 5 application and I&#8217;ve upgraded to the latest SDK 2.1.0.3 and it seems as though ImageResizer has blown up. Are there any work arounds? Here is the details:<\/p>\n<pre><code>=== Pre-bind state information ===\nLOG: DisplayName = Microsoft.WindowsAzure.Storage, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35\n (Fully-specified)\nLOG: Appbase = xxx\nLOG: Initial PrivatePath = xxx\nCalling assembly : ImageResizer.Plugins.AzureReader2, Version=3.4.0.763, Culture=neutral, PublicKeyToken=null.\n===\nLOG: This bind starts in default load context.\nLOG: Using application configuration file: x\nLOG: Using host configuration file: x\nLOG: Using machine configuration file from x\nLOG: Post-policy reference: Microsoft.WindowsAzure.Storage, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35\nLOG: Attempting download of new URL file:\/\/\/C:\/Windows\/Microsoft.NET\/Framework\/v4.0.30319\/Temporary ASP.NET Files\/root\/6038b9fb\/8488b4a1\/Microsoft.WindowsAzure.Storage.DLL.\nLOG: Attempting download of new URL file:\/\/\/C:\/Windows\/Microsoft.NET\/Framework\/v4.0.30319\/Temporary ASP.NET Files\/root\/6038b9fb\/8488b4a1\/Microsoft.WindowsAzure.Storage\/Microsoft.WindowsAzure.Storage.DLL.\nLOG: Attempting download of new URL x\nWRN: Comparing the assembly name resulted in the mismatch: Revision Number\nERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.\n\n[FileLoadException: Could not load file or assembly 'Microsoft.WindowsAzure.Storage, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]\n   ImageResizer.Plugins.AzureReader2.AzureVirtualPathProvider..ctor(String blobStorageConnection) +0\n   ImageResizer.Plugins.AzureReader2.AzureReader2Plugin.Install(Config c) +379\n   ImageResizer.Configuration.PluginConfig.add_plugin_by_name(String name, NameValueCollection args) +275\n   ImageResizer.Configuration.PluginConfig.loadPluginsInternal() +402\n   ImageResizer.Configuration.PluginConfig.LoadPlugins() +102\n   ImageResizer.Configuration.Config..ctor(ResizerSection config) +546\n   ImageResizer.Configuration.Config.get_Current() +115\n   ImageResizer.InterceptModule.get_conf() +36\n   ImageResizer.InterceptModule.System.Web.IHttpModule.Init(HttpApplication context) +250\n   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +418\n   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172\n   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +336\n   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296\n\n[HttpException (0x80004005): Could not load file or assembly 'Microsoft.WindowsAzure.Storage, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]\n   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9874840\n   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101\n   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254\n<\/code><\/pre>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/aa64f5e61bb8cbcc9d10372256580364?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nChris Skardon<\/p>\n<p>If you try <code>Add-BindingRedirect<\/code> and it gets you nowhere (it didn&#8217;t add the right redirect for me) you need to add the following into your <code>Web.Config<\/code><\/p>\n<pre><code>\n    \n\n        \n\n        \n            \n            \n        \n    \n<\/code><\/pre>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/914326917646eb2e226901d7e95a3408?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nkwill<\/p>\n<p>It looks like you are missing a file from your deployment. Are you referencing Microsoft.WindowsAzure.Storage v2.1.0.0 and setting it to CopyLocal=true?<\/p>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e246b32ac5e470afb71f8221a9759da2?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nComputer Linguist<\/p>\n<p>Within the NuGet Package Manager Console, run the following command:<\/p>\n<p><code>PM&gt; Add-BindingRedirect<\/code><\/p>\n<p>This should enable you to use a different version of the Azure SDK that was used for the last version of ImageResizer. If you installed\/upgraded Microsoft.WindowsAzure.Storage via NuGet, this should (but may not) have been run automatically.<\/p>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Ryan I have an ASP.NET MVC 5 application and I&#8217;ve upgraded to the latest SDK 2.1.0.3 and it seems as though ImageResizer has blown up. Are there any work arounds? Here is the details: === Pre-bind state information === LOG: DisplayName = Microsoft.WindowsAzure.Storage, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (Fully-specified) LOG: Appbase = xxx LOG: Initial PrivatePath = [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2950","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2950","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=2950"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2950\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=2950"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=2950"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=2950"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}