Why is IIS Express returning HTTP 500 errors loadi

2019-02-25 10:51发布

I am trying to develop an ASP.NET MVC5 solution using IIS Express for local debugging. Frequently, Chrome will report HTTP500 errors trying to load certain JS and CSS files (some using the built in bundling and minification feature of MVC, some on their own).

WTH is going on with this and how do I stop it?

Thanks, Matthew

3条回答
Summer. ? 凉城
2楼-- · 2019-02-25 11:15

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.

查看更多
趁早两清
3楼-- · 2019-02-25 11:28

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.

查看更多
\"骚年 ilove
4楼-- · 2019-02-25 11:30

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.

查看更多
登录 后发表回答