ftdeveloper
ftdeveloper

Reputation: 1093

Visual studio not recognized css

I have strange problem. I downloaded theme. And i entered theme's main folder and opened index html in browser. Everything okey and looks well. Css and javascript loaded correct. Then i copy theme's folder into the my asp.net mvc project (with all folder(inlude css and js folder)). But when i opened index.html with my browser css and javascript not loaded correctly. I dont know why.

My themes folder structure is shown below:

enter image description here

My themes folder structure in my asp.net mvc project is shown below:

enter image description here

My html code:

<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 exception:

enter image description here

Not: It is not working when in asp.net mvc project otherwise it is working.

Upvotes: 4

Views: 1836

Answers (1)

ftdeveloper
ftdeveloper

Reputation: 1093

Thanks daniele i added this in my web config and problem resolved:

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

Upvotes: 3

Related Questions