我想将文件从.css更改为.less,并使用less.js在客户端处理此.less。 因此,我将我的.css重命名为.less,然后将less.js添加到项目中(ASP.NET Web Forms)。因此,头部部分如下:
<link href="Content/myproject.less" rel="stylesheet/less" type="text/css"/>
<script src="Scripts/less-1.5.0.min.js"></script>
但是当我运行项目时,出现了文件myproject.less未找到的错误。具体的错误信息如下:
FileError: 'http://localhost:52714/Content/myproject.less' wasn't found (404)
in myproject.less
这行代码(在myproject.less中)允许我点击myproject.less文件,打开错误页面:
HTTP Error 404.3 - Not Found
The page you are requesting cannot be served because of the extension configuration.
If the page is a script, add a handler. If the file should be downloaded, add a
MIME map.
Most likely causes:
•It is possible that a handler mapping is missing. By default, the static file handler
processes all content.
•The feature you are trying to use may not be installed.
•The appropriate MIME map is not enabled for the Web site or application. (Warning: Do not
create a MIME map for content that users should not download, such as .ASPX pages or .config
files.)
•If ASP.NET is not installed.
我的ASP.NET项目缺少什么?