locked
CDN Problem - Javascript, Stylesheet and Images cannot be found (404 Error) RRS feed

  • Question

  • Hello,

    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 ).

     

    Thanks

    Wednesday, September 14, 2011 3:44 PM

Answers

  • Hi,

    Sorry for any inconvenience, I have misunderstood this issue. Please ignore my previous reply.

    As you mentioned, the issue only occurs when we visit CDN default HTTP endpoint(http://azxxxxx.vo.msecnd.net ), from my experience ,if the stylesheets, javascripts and images files are not contained in the CDN folder, we can not access them via CDN default HTTP endpoint. You can place the stylesheets, javascripts and images files in the CDN folder or in the CDN's subfolders to make the files available when we visit CDN default HTTP endpoint.

     

    Best Regards,

    Ming Xu.

     


    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com.
    Microsoft One Code Framework
    • Marked as answer by FrankParsons Wednesday, September 21, 2011 10:06 AM
    Wednesday, September 21, 2011 6:10 AM

All replies

  • Hi,

    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).

    I would like to suggest you to make sure the CDN access is enabled for a storage account, when you enable CDN access for a storage account, the Windows Azure portal provides you with a domain name of the following format: http:/ /<guid>.vo.msecnd.net/. This domain name can then be used to access blobs in a public container.

    The following steps are to enable CDN access to a storage account:

    1.Go to the Windows Azure Developer Portal.
    2.Click on your storage account.
    3.Click on “Enable CDN” for your storage account.
    4.The portal provides a CDN domain name in the form of: http://<guid>.vo.msecnd.net/ .

    Please also designate the containers you want to provide access to as a public container:

    http://msdn.microsoft.com/en-us/library/dd179391.aspx

    I'm looking for a solution that will work behind HTTPS as well

    As far as I know Windows Azure CDN access only works for anonymous access and for HTTP. HTTPS is not supported for CDN access.

    In addition, here is an article that explains the Windows Azure Content Delivery Network, please check it and see whether it helps.

    http://blogs.msdn.com/b/windowsazure/archive/2009/11/05/introducing-the-windows-azure-content-delivery-network.aspx

     

    Best Regards,

    Ming Xu.


    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com.
    Microsoft One Code Framework
    Thursday, September 15, 2011 2:02 PM
  • Hi FrankParsons,

    CDN supports delivery of contents over HTTPS. On windows Azure Portal checkbox for HTTPS support is available.

    For details about using HTTPS over CDN kindly download windows azure training kit and follow lab mentioned for CDN.

    Download link - http://www.microsoft.com/download/en/details.aspx?id=8396

    Alternatively to understand CDN and its usage just check if this link helps you - http://sanganakauthority.blogspot.com/2011/09/using-windows-azure-content-delivery.html

    Regards,

    Kunal


    Mark As Answer if it helps you | My Blog
    Tuesday, September 20, 2011 5:41 AM
  • Hi Kunal,

    I guess we can do in http as well.

    CDN supports delivery of contents over HTTPS. On windows Azure Portal checkbox for HTTPS support is available.

    Please find below link to enable the same.

    http://msdn.microsoft.com/en-us/library/windowsazure/ff919703.aspx

     

     


    cpsingh
    Tuesday, September 20, 2011 10:45 AM
  • Hi,

    Sorry for any inconvenience, I have misunderstood this issue. Please ignore my previous reply.

    As you mentioned, the issue only occurs when we visit CDN default HTTP endpoint(http://azxxxxx.vo.msecnd.net ), from my experience ,if the stylesheets, javascripts and images files are not contained in the CDN folder, we can not access them via CDN default HTTP endpoint. You can place the stylesheets, javascripts and images files in the CDN folder or in the CDN's subfolders to make the files available when we visit CDN default HTTP endpoint.

     

    Best Regards,

    Ming Xu.

     


    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com.
    Microsoft One Code Framework
    • Marked as answer by FrankParsons Wednesday, September 21, 2011 10:06 AM
    Wednesday, September 21, 2011 6:10 AM
  • Hi,

    Sorry for any inconvenience, I have misunderstood this issue. Please ignore my previous reply.

    As you mentioned, the issue only occurs when we visit CDN default HTTP endpoint(http://azxxxxx.vo.msecnd.net ), from my experience ,if the stylesheets, javascripts and images files are not contained in the CDN folder, we can not access them via CDN default HTTP endpoint. You can place the stylesheets, javascripts and images files in the CDN folder or in the CDN's subfolders to make the files available when we visit CDN default HTTP endpoint.

     

    Best Regards,

    Ming Xu.

     


    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com.
    Microsoft One Code Framework

    Thanks Ming,

    It is good practice to use CDN as a mini website instead of only storage?

    Wednesday, September 21, 2011 8:42 AM
  • Hi,

    As a matter of fact that CDN for hosted services should be used to cache static content, if you use CDN as a mini website and it contains dynamic content ,the dynamic content may adversely affect your performance or cause content problems, all at increased cost.

    I remember I have replied a similar thread for you at:

    http://social.msdn.microsoft.com/Forums/en-US/windowsazuredata/thread/205b385f-2bf7-45ca-a682-6a960315d727

    Please check the link above and see whether it helps.

     

    Best Regards,

    Ming Xu.


    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com.
    Microsoft One Code Framework
    Wednesday, September 21, 2011 9:33 AM