Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IIS Express Not Serving Static Files Over Basic Authentication

I have a ASP.NET WEB API 2 application which was configured to use Windows Integrated Authentication and was working without an issue.

When I change the authentication mode to basic, none of the static files are served by IIS Express. Instead it returns 500. Rest of the files like aspx are getting served without an issue.

Any ideas why this might be happening?

I'm using Visual Studio 2013, but also tried it on Visual Studio 2015 and got the same result.

PS: Static files are getting served fine when deployed on a full IIS instance.

PS2: I've the following in my web.config:

<staticContent>
  <remove fileExtension=".woff2" />
  <mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />
  <clientCache cacheControlMode="DisableCache" />
</staticContent>

UPDATE: If I remove the

<remove fileExtension=".woff2" />
<mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />

part, IIS Express serves all the static content except the .woff2 files, if I leave it in, it doesn't serve any static files.

Thanks in advance

like image 994
Jail Avatar asked Jan 19 '17 20:01

Jail


1 Answers

After doing research, I figured out it was due to UAC.

Please refer to this for more information.

like image 72
Jail Avatar answered Sep 20 '22 18:09

Jail