Windows Azure CDN :: 找不到 Javascript、样式表和图像(404 错误)
我正在使用 Windows Azure 托管我的 MVC3 项目,该项目具有需要附加到 CDN 的“/cdn”视图。 问题是当我尝试通过 http://azxxxxx.vo.msecnd.net 导航时,似乎我的浏览器找不到样式表、javascript 和图像文件(Firebug 显示 404 未找到)。 如果我尝试导航到原始方式,一切都会正常 http://mywebsite.cloudapp.net/cdn
我正在寻找一种也可以在 HTTPS 后面工作的解决方案( https://azxxxxx.vo.msecnd.net< /a>)。
I'm using Windows Azure for hosting my MVC3 project with '/cdn' view that needs to be attached to CDN.
The problem is when I try to navigate via http://azxxxxx.vo.msecnd.net it seems that my browser doesn't find stylesheets, javascripts and images files (Firebug shows 404 not found).
everything works good if I try to navigate to the original way http://mywebsite.cloudapp.net/cdn
I'm looking for a solution that will work behind HTTPS as well ( https://azxxxxx.vo.msecnd.net ).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
HTTP 404 告诉我您正在到达 CDN,并且您的请求正在通过 CDN 传递回您的“原始”Web 角色,但由于某种原因,该请求与您的 Web 角色的预期路径/目录结构不匹配。 (如果未启用 CDN,您会看到不同的错误消息,很可能是 HTTP 400。)
请确保您在 http://az#####.vo.msecnd.net 域,路径中不含 /cdn/ 段。
一旦您解决了请求与 Web 角色的预期路径不匹配的原因,这些请求将自动通过 HTTPS 运行(假设您在开发门户中启用了它)。
HTTP 404 tells me that you're reaching the CDN and your request is passing through the CDN back to your "origin" web role but for some reason the request isn't matching your web role's expected path/directory structure. (If the CDN wasn't enabled, you'd see a different error message, most likely HTTP 400.)
Be sure that you're navigating to it on the http://az#####.vo.msecnd.net domain without the /cdn/ segment in the path.
These requests will automatically work over HTTPS (assuming you enabled it in the dev portal) once you resolve why the request isn't matching up with the web role's expected path.
我记得,CDN 内容存在于 Blob 存储中,然后从 Blob 存储启用 CDN 内容。
听起来您正在寻找从 Azure 计算 URL 创建 CDN 内容,这是不正确的。
Blob 存储中启用 CDN 的内容的 URL 类似于以下内容:
As I recall, CDN content exists inside Blob storage and is then CDN content is enabled from the Blob storage.
It sounds like you're looking to create CDN content from your Azure Compute URL, which is not correct.
The URLs for CDN enabled content in Blob storage would resemble the following: