How to load images from storage when a web role-instance startup and then cache the files in a virtual folder in IIS for later usage RRS feed

  • Question


    Hi (Steve?)!

    I would appreciate an answer on this question. Here in the forum or in a show on channel 9? I do believe it is a common "problem" which I think many shares with me.

    We provide an application for training. It contains approximately 4500 images. It is therefore obvious that there are some maintenance. We have a couple of instances on Azure for customer usage and one for the BackOffice maintenance. 

    I want to have the BackOffice-application connected to a central storage, live.  Then I want the instances that are used for training, to download the stuff they need and cache it locally. I want two methods. One that download "all there is" at tstartup so there is no latency and one that fetch stuff on the fly, if it is missing. Both methods should cache the stuff. In our old IIS, we use virtual folders for this. 

    The text is in SQL Azure so there is no problem.

    The above are specific to us but in general it would be nice to have a central repository of images and other files and then use them in an instance in an intelligent manner to keep the speed up and the cost for storage down.



    Wednesday, February 9, 2011 9:46 PM


  • Hi Kent,

    You may write a console application which could download files from azure storage and then save to role's local storage folder. And then, use startup task to run your console application. By this way, the cache would be initialized when cloud role's starting up.

    Mog Liang
    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 Mog Liang Wednesday, February 16, 2011 9:35 AM
    Friday, February 11, 2011 6:27 AM