4

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

Ben Collins
  • 20,538
  • 18
  • 127
  • 187
Matthew Belk
  • 1,904
  • 2
  • 20
  • 28

4 Answers4

1

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.

Matthew Belk
  • 1,904
  • 2
  • 20
  • 28
1

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.

VivekDev
  • 20,868
  • 27
  • 132
  • 202
1

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.

user1672819
  • 41
  • 1
  • 5
0

Old thread but still relevant in VS 2019 and the top result.

For me, I created a .NET CORE WebApp (an API), then deleted it, deleted the files it left behind and recreated a .NET Framework (API) of the same name.

Started it up and spotted it was still using the same port number

https://localhost:44379

but the basic formatting was gone and 500 errors on all the .css and .js files. After editing the .csproj file and changing

<IISUrl>https://localhost:44379/</IISUrl>

to

<IISUrl>https://localhost:44380/</IISUrl>

Changing this reset something IIS Express and the css and .js files loaded and it looked fine.

Wayne Evans
  • 157
  • 13