Error like this is usually occurs in IIS after deploying a working website (local).
In my case, this error usually appears when I use a higher version of .Net Framework in IIS than the .Net Framework I use in my project website. One of the solutions that I applied was to upgrade the .Net Framework on my project website to make the same as IIS.