1

We have deployed Sitecore 9.2 with JSS on a production environment and when accessing page, page gets loaded but in the network tab, we see none of the js file gets loaded. it throws 500 error. When we hit the js url on browser we get the message:

Could not load file or assembly 'System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies

Interestingly, reference dll is present and it is of the same version. We temporary comment this entry in web.config , then it started throwing the same error for another dll entry below it. it went on until we commented all dll reference. We are not getting this error in local JSS setup but it happens only on production environment both on CM and CD sites.

We checked that static content on IIS is checked.

Are we missing any steps ?

enter image description here enter image description here

1

This error happens because Sitecore is trying to load that assembly since it's being referenced either through the web.config or the dll itself has dependencies within it which are not loaded. If you think about what the error message says: It has a reference to an assembly and it can't load it.

In cases like this what you have to do is find where the reference is.

There are a few ways to identify where the problem is:

a) Confirm that the web.config deployed to production is properly configured to it's role. You don't want a standalone web.config getting loaded in a CD server and so on.

b) Get an out of the box Sitecore 9.2 and compare the web.config and bin files against your production folder. In this case you are looking for differences in assemblies versions and configurations to make sure that what gets deployed references the right assembly version and that this assembly does exist in the bin folder otherwise you will run into a problem like this

c) In case this is an upgraded environment, make sure web.config being deployed is not carrying previous assembly references versions(step b should tell you that)

Hope this helps

  • Thanks for your answer. We tried all the three points that you stated above. Still we are not able to resolve the issue. – NewbieHere Nov 22 at 5:36

Not the answer you're looking for? Browse other questions tagged or ask your own question.