Visual studio not recognized by css

I have a strange problem. I downloaded the theme. And I entered the main theme folder and opened the html index in the browser. Everything is great and looks good. Css and javascript loaded correctly. Then I copy the theme folder to my asp.net mvc project (with the whole folder (in the css and js folder)). But when I opened index.html with my css browser and javascript loaded incorrectly. I do not know why.

The folder structure of my themes is shown below:

enter image description here

The structure of my themes in my asp.net mvc project is shown below:

enter image description here

My html code is:

<link rel="stylesheet/less" type="text/css" href="themes/less/bootstrap.less"> <script src="themes/js/less/less.js" type="text/javascript"></script> <script src="themes/js/lib/jquery-1.9.1.min.js"></script> <script src="bootstrap/js/bootstrap.min.js"></script> 

Also I tried (~ /):

 <link rel="stylesheet/less" type="text/css" href="~/themes/less/bootstrap.less"> <script src="~/themes/js/less/less.js" type="text/javascript"></script> <script src="~/themes/js/lib/jquery-1.9.1.min.js"></script> <script src="~/bootstrap/js/bootstrap.min.js"></script> 

And an exception:

enter image description here

No: it does not work when in the asp.net mvc project otherwise it works.

+4
source share
1 answer

Thanks daniele, I added this to my web config and the problem is resolved:

 <system.webServer> <staticContent> <mimeMap fileExtension=".less" mimeType="text/css" /> </staticContent > </system.webServer> 
+3
source

Source: https://habr.com/ru/post/1495134/


All Articles