Why is IIS Express returning HTTP 500 errors loading javascript and CSS?

旧巷老猫 提交于 2019-12-01 21:33:24

What helped worked is as follows. I am using Visual Studio 2015.

  1. Close the visual studio solution. In fact I closed the visual studio itself
  2. In the solution folder(the folder which contains the .sln file along with the project folders), you should find a .vs folder. I had deleted that folder.
  3. Restarted the visual studio and loaded the solution.

Things are working fine now.

The reason I guess is, the config folder inside of .vs folder has the applicationhost.config file. That is having some setting issues.

Turns out this was related to ninject object lifecycles and my EF db context being open twice at the same time. Totally unrelated to IIS.

In my case, I got to remove the attribute of debug="true" in web.config compilation node.

From

<compilation debug="true" targetFramework="4.7.2" />

To

<compilation targetFramework="4.7.2" />

Then it works fine.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!