Load files from cdn

Hi.

I have a web role, created a cdn folder and place an empty txt file in this folder. In the azure portal, i created a cdn endpoint to this project.

I can recive the file on: www.jumblets.com/cdn/test.txt.

The site url for this project on azure is: http://jumbletmainsite.cloudapp.net/

And the url to the cdn: http://az530312.vo.msecnd.net/

So, why can't i recive the txt file on: http://az530312.vo.msecnd.net/test.txt

Grateful for any help


  • Edited by mrcode86 Wednesday, November 27, 2013 10:24 AM
November 27th, 2013 1:23pm

Once the CDN is enabled on a Windows Azure storage account, any blobs that are in public containers and are available for anonymous access will be cached via the CDN.

Only blobs that are publically available can be cached with the Windows Azure CDN. To make a blob publically available for anonymous access, you must denote its container as public.

Free Windows Admin Tool Kit Click here and download it now
November 27th, 2013 1:32pm

We not use blobs for this files. I have follow this gude: http://blog.slalom.com/2011/03/24/hosting-a-simple-website-in-the-windows-azure-cdn/

but it will not work :(

November 27th, 2013 1:35pm

See if this helps:
  • Your hosted service must be deployed to in a production deployment.
  • Your hosted service must provide the object on port 80 using HTTP.
  • The hosted service must place the content to be cached in, or delivered from, the /cdn folder on the hosted service.
Free Windows Admin Tool Kit Click here and download it now
November 27th, 2013 1:42pm

See if this helps:
  • Your hosted service must be deployed to in a production deployment.
  • Your hosted service must provide the object on port 80 using HTTP.
  • The hosted service must place the content to be cached in, or delivered from, the /cdn folder on the hosted service.
November 27th, 2013 1:50pm

Still problem. Anybody with a solution? thanx!

Free Windows Admin Tool Kit Click here and download it now
November 28th, 2013 5:25pm

hi mrcode,

Thanks for posting!

[MSDN Document]

If your CDN endpoint is associated with a cloud service, then the address of your cached content will be similar to the following URL:

http://www.mydomain.com/cdn/mycloudservice

I guess you may need to refer to "Verify that the custom subdomain references your CDN endpoint" in this page(http://msdn.microsoft.com/en-us/library/gg680307.aspx ).

And about your question, Please check your CDN URL(http://az530312.vo.msecnd.net/) map to the cloud service CDN folfer(www.jumblets.com/cdn/test.txt). Base on my experience, if you didn't map it, it will show 404 error.

Regards,

Will

 

November 29th, 2013 10:31am

Thanx Will.

Now, it works, but i notice that the files is not gzip anymore. Why? 

When we used "/cdn/Test.js", the file was gziped, but when we change this to, http://az530312.vo.msecnd.net/Test.js, the file is not gziped. Why? How can we fix this?

Free Windows Admin Tool Kit Click here and download it now
November 29th, 2013 3:10pm

hi mrcode86,

I think you may need set "Content-Encoding" in http-header, I recommend you to read this blog(http://blogs.msdn.com/b/avkashchauhan/archive/2012/03/05/enableing-gzip-compression-with-windows-azure-cdn-through-web-role.aspx ) and this thread (http://stackoverflow.com/questions/10420004/azure-cdn-enabling-http-compression-hosted-web-role ).

Hope it helps.

Thanks

regards,

Will

November 29th, 2013 6:17pm

Hi Will.

When we create a WebRole.cs and add the code to the OnStart event, we can't upload the project to Azure. It's only recycling. Why?

Thanx

Free Windows Admin Tool Kit Click here and download it now
December 2nd, 2013 5:14pm

Hi,

Lots possible reasons may be due to instance recycling. Base on my experience, when our project occurred problem on publishing or our Onstart() method included the multi-thread. I suggest you firstly modify the project's warning and error. And you could troubleshoot (http://blogs.msdn.com/b/kwill/archive/2013/10/03/troubleshooting-scenario-7-role-recycling.aspx )& (http://blogs.msdn.com/b/kwill/ ) .Please find the log files and view the reason.

Please try it.

Thanks

Regards,

Will

December 3rd, 2013 4:29am

Hi

I remote to the server, and there i found a lot of errors in the logfiles.

In GuestAgent i get this:
- Role process exited with exit code of 0
SetRolePackageTreeTime failed with 0x80070057.

In Runtime i se this:

Exception:System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: Filename: \\?\D:\Windows\system32\inetsrv\config\applicationHost.config
Error: Cannot commit configuration changes because the file has changed on disk

 (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.IO.FileLoadException: Filename: \\?\D:\Windows\system32\inetsrv\config\applicationHost.config
Error: Cannot commit configuration changes because the file has changed on disk

Server stack trace: 
   at Microsoft.Web.Administration.Interop.AppHostWritableAdminManager.CommitChanges()
   at Microsoft.Web.Administration.Configuration.CommitChanges()
   at Microsoft.Web.Administration.ConfigurationManager.CommitChanges()
   at Microsoft.Web.Administration.ServerManager.CommitChanges()
   at Microsoft.WindowsAzure.ServiceRuntime.IISConfigurator.WasManager.DeploySite(String roleId, WASite roleSite, String appPoolName, String sitePath, String iisLogsRootFolder, String failedRequestLogsRootFolder, List`1 bindings, List`1 protocols, FileManager fileManager, WAAppPool defaultAppPoolSettings, String roleGuid, String& appPoolSid, List`1 appPoolsAdded, String configPath)
   at System.Runtime.Remoting.Messaging.S...).


 ----  And ----

Exception:System.IO.FileLoadException: Filename: \\?\D:\Windows\system32\inetsrv\config\applicationHost.config
Error: Cannot commit configuration changes because the file has changed on disk

Server stack trace: 
   at Microsoft.Web.Administration.Interop.AppHostWritableAdminManager.CommitChanges()
   at Microsoft.Web.Administration.Configuration.CommitChanges()
   at Microsoft.Web.Administration.ConfigurationManager.CommitChanges()
   at Microsoft.Web.Administration.ServerManager.CommitChanges()
   at Microsoft.WindowsAzure.ServiceRuntime.IISConfigurator.WasManager.DeploySite(String roleId, WASite roleSite, String appPoolName, String sitePath, String iisLogsRootFolder, String failedRequestLogsRootFolder, List`1 bindings, List`1 protocols, FileManager fileManager, WAAppPool defaultAppPoolSettings, String roleGuid, String& appPoolSid, List`1 appPoolsAdded, String configPath)
   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at Microsoft.WindowsAzure.ServiceRuntime.IISConfigurator.WasContainer.DeploySite(String roleId, WASite roleSite, String appPoolName, String sitePath, String iisLogsRootFolder, String failedRequestLogsRootFolder, List`1 bindings, List`1 protocols, FileManager fileManager, WAAppPool defaultAppPoolSettings, String roleGuid, String& appPoolSid, List`1 appPoolsAdded, String configPath)
   at Microsoft.WindowsAzure.ServiceRuntime.IISConfigurator.IISConfigurator.Deploy(String roleId, WebAppModel webAppModel, String roleRootDirectory, String sitesDestinationRootDirectory, String diagnosticsRootDirectory, String roleGuid, String configPath)


Other errors:
The worker process failed to initialize correctly and therefore could not be started.  The data is the error.
The worker process failed to initialize communication with the W3SVC and therefore could not be started.  The data is the error.
Session "MA_ETWSESSION_............." failed to start with the following error: 0xC0000035

Could it be any problem here?

Free Windows Admin Tool Kit Click here and download it now
December 4th, 2013 1:07pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics