发布到Azure时未加载捆绑的CSS [英] Bundled CSS not loading when published to Azure

查看:45
本文介绍了发布到Azure时未加载捆绑的CSS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从Microsoft提供的默认ASP.Net Web表单模板开始,我添加了两个CSS文件,并将其捆绑并将其添加到Site.Master.事物在本地工作,但在Azure上发布时则不行.

基于这些链接-

Bundle.config文件

Site.master文件内容

 < webopt:bundlereference runat ="server" path =〜/Content/css"/>< webopt:bundlereference runat ="server" path =〜/Content/mycss"/> 

第一个参考有效,而第二个则无效.还有其他想法可能是什么问题吗?

解决方案

在发布问题时,我一直在尝试发布到Azure'n'的次数,因为Azure不知何故不显示CSS文件.经过几个小时的尝试,一切都像魅力一样.

要在此处考虑的要点在此处.希望对其他人有帮助.

Starting with the default ASP.Net Web Forms template provided by Microsoft, I added a couple of CSS files, bundled it and added it to Site.Master. Things work locally, but not when published on Azure.

Based on these links - link 1 & link 2, I tried changing the bundle name, but it still does not work and I get a 404 error on Azure.

Current File Structure:

Bundle.config file

Site.master file contents

<webopt:bundlereference runat="server" path="~/Content/css" />
<webopt:bundlereference runat="server" path="~/Content/mycss" />

The 1st reference works but the 2nd one does not. Any other ideas what could be the issue?

解决方案

At the time of posting the question, I have been trying to publish to Azure 'n' number of times because of which Azure was somehow not displaying the CSS files. Tried after few hours and all worked like charm.

The main point to consider here is mentioned here. Hope it helps other folks.

这篇关于发布到Azure时未加载捆绑的CSS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆