dalcam
dalcam

Reputation: 1077

ASP.NET MVC site occasionally rendering in random RESX language - Possible DI Issue?

I have an ASP.NET 4.8 MVC app that has numerous languages. These are RESX files which are defined in their own class library. That class library is then being injected into the MVC app using LightInject as the Dependancy Injection library.

I am having trouble with some users reporting that our site is displaying them in a different language randomly, which leads me to believe I haven't configured the lifetime of the Language Class library correctly. However looking at the documentation of LightInject, the default scope appears to be the correct one: https://www.lightinject.net/#lifetime (and more on their scopes here: https://www.lightinject.net/#scope)

In all cases of the issue - the users browser language and OS language was different to the one being shown on the website. (Ie Someone in the US with browser language set to English and OS set to United States English, took a screenshot and the page was rendering in Dutch!)

Seeing its so random Im finding it very hard to replicate and resolve so if anyone has had a similar issue I would love to know how you solved it - or even what Scope you are using for your resx classes if you don't have the same issue!

Thank you in advance :)

Upvotes: 0

Views: 57

Answers (0)

Related Questions