I recently started working on a personal ASP.NET MVC project on which I wanted to use Less CSS for styling. I quickly ran into a problem when I discovered that a IIS Express doesn’t have “.less” registered as a valid MIME type, so it won’t serve up the file at all. So that forced me to dig around to figure out how to add a mimetype to the IIS Express configuration. I found a working solution, and thought it could potentially help someone else out.
To add the .less extension as a valid MIME type to IIS express follow these steps:
- Open a windows command prompt
- Switch to the directory that IIS Express is installed in (on my 64 bit Windows 7 system, it was installed in C:\Program Files (x86)\IIS Express)
- Execute the following command:
1
| |
Boom. Works great. Now I’m rollin’ with Less CSS in my ASP.NET MVC project developing on IIS Express. Sweetness.