gpt4 book ai didi

asp.net-mvc-3 - 如何在 Windows Azure 上使用 SquishIt

转载 作者:行者123 更新时间:2023-12-03 00:39:44 26 4
gpt4 key购买 nike

我想使用内部的 SquishIt nuget 包和在 Windows Azure 上运行的 MVC3 应用程序。我使用 SquishIt 进行 CSS 和 JS 组合和缩小。

在我的 Views/Shares/_Layout.cshtml 中,我有以下几行:

@MvcHtmlString.Create(
Bundle
.Css()
.Add("~/Content/templates/style.css")
.Add("~/Content/market.css")
.Add("~/Content/jquery-ui-theme/jquery-ui-1.8.17.custom.css")
.ForceRelease()
.Render("/Cache/combined-css_#.css"))

这会导致

"System.IO.IOException: Unable to open file"

我在这里找到了一些东西http://www.bondigeek.com/blog/2011/03/22/all-is-quiet-not-on-the-azure-front/但这其实不是我想要的。一般来说,SquishIt 应该可以在 Azure VM 的磁盘上写入,但可能是目录错误或安全权限不足。有什么想法吗?

最佳答案

在 Azure VM 中,您无法直接写入文件系统。您必须配置 SquishIt 以将 bundle 保留在内存中。

请参阅此页面了解更多详细信息:Using SquishIt programmatically without the file system

关于asp.net-mvc-3 - 如何在 Windows Azure 上使用 SquishIt,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9132379/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com