问题描述
我在appharbor上部署了一个简单的.NET MVC应用程序,该应用程序实现了bootstrap和更少的引导.当我运行它时,对我的本地主机实例的负载较小,但是,当我将其推送到appharbor时,我在bootstrap.less上得到了404.
I have deployed a simple .NET MVC application on appharbor that implements bootstrap and less. The less loads fine on my localhost instance when i run it, however, when i push it to appharbor i get a 404 on bootstrap.less.
在此之前有人遇到过这个问题吗?
Has anyone run into this before that might be able to tell me why?
我已经检查了扩展,部署中存在较少的目录/文件结构.
I have checked the buildout and the less directory/file structure exists on the deployment.
appharbor网址为 http://appharbor-bootstrap.apphb.com/想看看我在看什么.
The appharbor url is http://appharbor-bootstrap.apphb.com/ if anyone wants to check out what im seeing.
可在github上找到源 https://github.com/jamesamuir/appharbor-bootstrap
Source can be found on github https://github.com/jamesamuir/appharbor-bootstrap
这应该是这样的样子
这是appharbor上的外观
This is what it looks like on appharbor
推荐答案
您可能必须在web.config中配置mime类型映射.有详细信息链接,此处和此处.
You probably have to configure the mime-type mapping in your web.config. There are links to details here and here.
<system.webServer>
<staticContent>
<mimeMap fileExtension=".less" mimeType="text/css" />
</staticContent>
</system.webServer>
这篇关于Apphabor在bootstrap.less上给出404的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!