2.65 to 2.7 Newtonsoft.JSON and MachineToApplication issues

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 years ago
Hi, I upgraded from 2.65 to 2.7 and am having two issues.

I initially was able to build the project locally, and on the server I changed the application root from the Deployable 2.65 to the 2.70 folder. Now when trying to load the site I receive

Could not load file or assembly 'Newtonsoft.Json, Version=4.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)

Additionally, when I try to run the site locally, I now receive the error

Error  44  It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS.  C:\sites\seiko\store.sii-thermalprinters.com\Deployable\nop_2.70\Web.config  48

Halp?
11 years ago
Fixed, to work around Newtonsoft issue I installed multiple versions of that .dll in the GAC. I assume assemblies were referencing different versions of it.

I also ran into Tax provider issues, and found on this forum someone's suggestion to completely delete all files before re-compiling, and it worked. I am not sure if I initially copied the 2.7 files over my 2.65 files, but this did fix my issues, so it may have been related to the above issue as well, as I installed the files into the GAC before hitting and fixing the Tax provider issue. So, that could be why the Newtonsoft issue as well.
11 years ago
Hi Dune

I too am getting errors after upgrading to latest release from nopCommerce repository. First I got this error, but I followed the instructions given in marcind's Answer and that error went away !

Now however I am getting the same error as you, but I have no idea what GAC is ! Can you kindly provide detailed step by step instructions ?

Thank You.
11 years ago
GAC is the Global Assembly Cache. I am not an expert on the topic, but can try to help. The GAC allows you to have more than one version of a .dll running at once, so allows Newtonsoft 4 and 4.5 to both be accessible at once, wheras .dll files in the _bin folder would only allow you to have one. There is a comman-line tool that comes with Visual Studio that allows you to add files to the GAC.

I might suggest completely wiping out your folders and starting from scratch, as this is another possible solution that would not require you to touch the GAC, as I am assuming the project itself doesn't come with various versions of this .dll, it must be legacy files calling different versions.
11 years ago
Thanks Dune, which folder am I suppose to wipe clean?

Thanks
11 years ago
Hi,

in our case we found out that the bad version of the dll was located in the ExternalAuth.Facebook plugin folder.
You should have a look there.

Best regards,
Arnaud
11 years ago
Thanks for your guide!

I have one question.

I have lot of images on "Content/Images/Thumbs/" folder. It's necessary to copy these files to 2.70 folder or Nopcommerce will create automatically thumbnails when it thinks that is necessary?

Where are product images stored? On database?

Thanks!
11 years ago
sabueXo, According to the upgrade instructions you need to back that folder up and restore those images in the new installation, so the thumbs are stored on the server, not database.
11 years ago
Hi Dune,

I have write my last post on wrog theme aggg!

I am not sure, but I think that original image is stored on database and using this picture, nopcommerce will create all neccessary thumbs.

It's correct what I telling?

This is why I am asking if it's necessary to copy thumbs folder.
11 years ago
sabueXo, I would go with what the upgrade instructions indicate, to back up and restore that folder to the upgraded set of files.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.