IBRA
IBRA

Reputation: 1782

Internal Server Error 500.19 :: .less mimeMap

I have added the below mimeType inside web.config file, in order to run the .less files, and it's working as a charm.

<mimeMap fileExtension="*.less" mimeType="text/css" />

But when I deployed the solution on another machine, It didn't work until I removed the star (*) like the below line.

<mimeMap fileExtension=".less" mimeType="text/css" />

So now it's working on one machine with a *.less and on the other with .less.

Why is that? and is there anyway to fix this?

Upvotes: 2

Views: 1438

Answers (2)

As Lex Li mentioned, that is correct. Just for info how to write that in web.config:

<remove fileExtension=".less" />
<mimeMap fileExtension=".less" mimeType="text/css" />

Upvotes: 2

Lex Li
Lex Li

Reputation: 63143

Always put a remove tag before such additions in your web.config as you don't know if the server administrators have already configured them at the server level.

Any duplicate MIME type registration will trigger such errors.

Upvotes: 2

Related Questions