Azure MVC Web 角色在开发结构下运行时不使用 CSS

发布于 2024-08-16 10:40:15 字数 168 浏览 3 评论 0原文

当我从 Web 运行应用程序本身或 Azure 部署时,我的页面是使用 CSS 呈现的,但是当在本地结构下运行 Web 角色时,我会得到普通的“无 CSS”样式页面。

我有两个问题:

  • 有人知道为什么会发生这种情况吗?
  • 调试类似问题的好方法是什么?

When I run either application itself or Azure deployment from Web, my pages are rendered using CSS, but when running the Web role under local fabric, I get plain "no-CSS" style pages.

I have two questions:

  • Anybody knows why does it happen?
  • What is a good way to debug similar issues?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

不爱素颜 2024-08-23 10:40:15

替代文本
(来源:asp.net

我遇到了这个问题,这解决了它。打开“可选功能”对话框并选中上面屏幕截图中的选项。 (您可以通过转到“开始”并键入不带空格的可选功能来快速访问“可选功能”。)


由于图像不再可用:以下步骤为我解决了问题:

  • 打开“活动或停用Windows” - 功能”
  • 转到 IIS、WWW-服务、常用功能
  • 激活“静态内容”

alt text
(source: asp.net)

I had this problem and this solved it. Open up the Optional Features dialog and check off the option from the screenshot above. (You can get to Optional Features quickly by going to Start and typing optionalfeatures with no spaces.)


As the image is not avaiblable anymore: the following steps solved the problem for me:

  • Open "Active or deactivate Windows-Features"
  • Go to IIS, WWW-Services, Common Features
  • Activate "Static Content"
像你 2024-08-23 10:40:15

运行 HttpWatch、Firebug 或 IE 开发工具,刷新页面,您将很快看到问题所在。这可能只是一个路径问题。

Run HttpWatch, Firebug, or IE Developer Tools, refresh your page, and you'll quickly see where the problem lies. It's likely just a pathing issue.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文