Reputation: 1093
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:
My themes folder structure in my asp.net mvc project is shown below:
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:
Not: It is not working when in asp.net mvc project otherwise it is working.
Upvotes: 4
Views: 1836
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