Tried upgrading again from 9.3.2 to 9.6.1 following all the steps suggested. However, i am facing a very peculiar issue.
After the upgrade, the site works. On restarting IIS, I get the DNN error.
Now, I go and remove one dll randomly from the Bin folder and restart IIS. The site comes up properly. Now, again when I restart IIS, I get the DNN error.
Now, I go and put back the removed dll into the bin folder and restart IIS. The site again comes up properly. Now, when I do an IIS reset again, I get the DNN error.
So, in nutshell, whenever a dll in the bin folder is disturbed and the site started, it works (i.e. when DNN must be rebuilding the cache owing to change in bin folder). Once it is working and an IIS reset is done, it gives the DNN error. So, it appears that after IIS Reset it is a must for the Bin folder to be rebuilt for site to work!!
Am not able to figure out why this is happening. Please guide.