ImageResizer.net and S3Reader giving AWSSDK Version error - c#

I've enabled the S3Reader plugin and set my bucket. I've added the s3reader plugin .dll to the project. Now any .net page (.aspx or even images) that I visit in my browser (localhost) throws the following error message:
Could not load file or assembly 'AWSSDK, Version=1.5.15.0,
Culture=neutral, PublicKeyToken=9f476d3089b52be3' or one of its
dependencies. The located assembly's manifest definition does not
match the assembly reference. (Exception from HRESULT: 0x80131040)
i'm not sure where to go from here. my project is .net 4.5 and i'm using the latest awssdk for visual studio downloaded from the amazon site.
I've seen a couple of posts related to binding redirects but none seemed to work for me... any help on this would be greatly appreciated.

This was fixed in ImageResizer V3.3.3, released March 2 2013.
Amazon changed their private key, completely breaking the ability to support both newer and older versions of the component simultaneously.

Related

Program is referring to a different version of Newtonsoft.JSON although a different version is loaded

I was working on a project to Self host a Web API project.
There are two packages 1) Microsoft.AspNet.WebAPi.SelfHost
2) Microsoft.AspNet.WebApi. I had run into a problem where two different versions of NewtonSoft.Json had been installed by the above packages and it showed a compile-time warning as well as a run time exception. If I install Microsoft.AspNet.WebAPi.SelfHost before Microsoft.AspNet.WebApi then Newtonsoft.Json version 6.0.0.0. is installed by the former and the version 11.0.0.0 by the later which gives the error. but if I install Microsoft.AspNet.WebApi, then version 11.0.0.0 is installed and Microsoft.AspNet.WebAPi.SelfHost doesn't install Newtonsoft.Json but I still get the following error
"Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its >dependencies. The located assembly's manifest definition >does not match the assembly reference. (Exception from >HRESULT: 0x80131040)/nSystem.IO.FileLoadException"
although the following is the entry in my web.config reference
"culture="neutral" publicKeyToken="30ad4fe6b2a6aeed"
bindingRedirect oldVersion="0.0.0.0-11.0.0.0" newVersion="11.0.0.0" />"
I am really not getting why it is referring to version 6.0.0.0 when a newer version is installed. And if I need both the versions how do I refer to each without causing compiler issues.
Edit: Another thing to mention here is that it errors only after publishing the file but if I run it in release mode, no issue is occurring.
I have tried this after creating a new folder from scratch.
Edit: I have also tried checking the GAC. Newtonsoft.JSON is not available in the GAC. Can anyone tell how to check the manifest/config file of a third-party package like the Microsoft.AspNet.WebAPi.SelfHost
Edit: I also checked the solutions from the linked thread, but it didn't help.
Edit: I just now edited Microsoft.Owin from version 2.0.2 to version 4, but strangely after publishing and running it is still referring to version 2. I checked web.config and package.config, they have correct assembly redirects as well as correct package. So i guess there is some other place where it is not getting updated. Anyone can help me on this?

RazorEngine - Windows 10 Anniversary update 1607 - Could not load file or assembly System.Web.Razor

I am using RazorEngine in one of our applications and it was working fine until Windows 10 Anniversary. On machines with this update, RazorEngine stopped working and I am stuck with this error: Could not load file or assembly 'System.Web.Razor, Version=2.0.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)
Has anyone here encountered this?
Note: This question is also posted here: https://github.com/Antaris/RazorEngine/issues/450
One thing that comes to mind that may help is that if the 'System.Web.Razor' assembly was being read from the GAC rather than being copied directly to the bin folder of your application when built and for some reason the Windows 10 Anniversary update removes / updates this assembly from the GAC it could cause this issue.
Figured out the problem. There are 2 different RazorEngine.dll files included with the package, one for 4.0 and one for 4.5. They are identical in size and report the same version number. I inadvertently copied the one for 4.0 which was looking from the older System.Web.Razor DLL version.

Conflicting System.Web.Http.Cors assembly in azure mobile services

Suddenly I got the following error when publishing to Azure Mobile Services.
"Error Found conflicts between different versions of the same dependent assembly 'System.Web.Http.Cors': 5.1.0.0, 5.2.2.0. Please change your project to use only one version. App.Hosting 2014-09-20 23:40:26"
I use Microsoft.AspNet.WebApi.Cors and WindowsAzure.MobileServices.Backend (1.0.348).
I have tried going through all references and I cant find any pointing at 5.2.2.0.
I have also tried upgrading to 5.2.2.0 however when doing so I get:
"Error Boot strapping failed: executing 'WebApiConfig.Register' caused an exception: 'Could not load file or assembly 'System.Web.Http.Cors, Version=5.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.'. App.Hosting 2014-09-20 23:06:20"
I can not understand why I get this error and it seem to have start to occur with no apparent reason.
Any pointer is appreciated.
We are in the process of updating to the newly released ASP.NET Web API 5.2 and it looks like we missed an assembly redirect for the CORS assembly.
In a couple of days you will be able to use the full ASP.NET Web API 5.2 but the upgrade has to complete first. To fix your problem now, you should be able to just remove your own CORS assembly (assuming you are only setting the origins) and then set them using the MS_CrossDomainOrigins app setting in your local web.config as described in this blog [1], for example:
<add key="MS_CrossDomainOrigins" value="http://testhost, http://sample" />
Sorry for the inconvenience!
Henrik
[1] http://azure.microsoft.com/blog/2014/07/28/azure-mobile-services-net-updates/

`Could not load file or assembly 'Microsoft.Windows.Shell` , Prism - C#

I'm trying to run PRISM (MEF) example project, but get this error:
Managed Debugging Assistant 'BindingFailure' has detected a problem in
'Prism4MefDemo.vshost.exe'.
Additional information: The assembly with display name
'Microsoft.Windows.Shell' failed to load in the 'Load' binding context
of the AppDomain with ID 1. The cause of the failure was:
System.IO.FileLoadException: Could not load file or assembly
'Microsoft.Windows.Shell, Version=3.5.41019.1, 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)
I've tried to remove and manualy add reference to Microsoft.Windows.Shell but still nothing.
The version of this DLL is 3.0.1.0, and not 3.5.41019.1 as in the Exception.
This is the line with the Excecption:
protected override DependencyObject CreateShell()
{
return this.Container.GetExportedValue<ShellWindow>();
}
How can I fix it?
Thanks.
Finally I solved this issue by installing Multilingual App Toolkit from here and Add Reference to "Microsoft.Windows.Shell.dll" from the location "C:\Program Files (x86)\Multilingual App Toolkit" or copy the dll to your private assembly folder and refer it.
When you install Microsoft.Windows.Shell.dll from Nuget, it was installing v3.0.1, But the actual expected version was v3.5.41019.1. you ll get this new version from the above path.
Thanks
So after trying everything, I looked for others files in my computer (Microsoft.Windows.Shell.dll) and found newer version, as expected by the Exception (3.5.41019.1) in MicrosoftRibbon for WPF\V3.5 folder.
It is strang,because the latest version of the NuGet package is 3.0.1.
Thanks anyway.
Adding Microsoft.Windows.Shell.dll v3.5.41019.1 to your project references, would solve the problem.
We had this problem when using the Ribbon control.
The solution was remove the ribbon: prefix from the very start of the XAML and use the default ribbon control, not the one that utilizes a namespace.

Asp.net project building error

i am getting below error while building my project
Error 4 Reference.svcmap: Could not load file or assembly 'Orchard.Framework, Version=1.5.1.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
Even i have integrated orchard.core dll and orcahrd.framework dll refrence in my project,but nothing to do with orchard anything with my project but don't know why this error is coming and what's the reason behind this.
Please help me due to this i am unable to move forward in my project.
Thanks
Check that the version of the Ochard.Framework.dll i 1.5.1.0
Latest version is 1.7.2, so it might be that the web.config file specify version 1.5.1.0 while the version you have is 1.7.2.

Categories