I'm creating an intranet website and using the ASP.NET MVC template with Windows Authentication. After compiling and logging in with my credentials, the CSS hasn't loaded.
I'm using Windows 10, Visual Studio 2015. Everything works fine in Internet Explorer 11. I've not written one line of code in this brand new project but Edge doesn't load the CSS. Moreover, it seems like the problem only appears with activated windows authentication as a login method. I've created some new projects with no login method and with the custom user account method and it all works fine in Edge. Why is it not working with windows authentication in Edge?
So basically what happens is I see the raw site without the styles. I opened the developer tools and saw that the bootstrap.css and the Site.css file weren't loaded. I tried to open the path in Edge and I got a 500.0 Internal Server Error. Again Internet Explorer does his job.
See this picture to see the website and debugger Home page with debugger
Here is the internal server error: Internal Server Error 500.0
Sorry for the German version.


I googled for hours and tried so many things without success.
Finally I found a working solution for me and so I thought I'd share it.
I'm using Windows 10, Visual Studio 2015.
In the project configuration file [SolutionFolder].vs\config\applicationhost.config
I changed from this:
<windowsAuthentication enabled="false">
<providers>
<add value="Negotiate" />
<add value="NTLM" />
</providers>
</windowsAuthentication>
to this (changed order and enabled windows authentication):
<windowsAuthentication enabled="true">
<providers>
<add value="NTLM" />
<add value="Negotiate" />
</providers>
</windowsAuthentication>
Maybe it helps someone else.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With