none
migrating a windows phone7 game to the cloud!!

    Question

  • i have created my windows phone 7 game and it is running on my PC and i intend to migrate it to windows azure, so far i think it will be through blobs but i still don't know how to do it. 

    This is the code i have done in an MVC webrole but i dont know yet how to put the game in a blob??

    var

     

     

    account = CloudStorageAccount.Parse(RoleEnvironment.GetConfigurationSettingValue("DataConnectionString"));

     

     

    var blobs = account.CreateCloudBlobClient();

     

     

    var blob = blobs.GetBlobReference("Catapult/Catapult.xap");

    Wednesday, January 19, 2011 3:01 PM

Answers

All replies

  • Once you have a reference to a blob, you can upload a file to blob storage like this:


    blob.UploadFile(filename);


    If the file is large, however, you need to upload it in blocks (chunks) which will require more code. Look up the PutBlock and PutBlockList operations in the Storage API online documentation.

     

    The blob will not be accessible anonymously (without storage keys) unless you set permissions on its container to allow access.

     

    You may find it useful to obtain a storage utility to work with blobs. There are many to choose from, some free. Some popular ones are Cerebrata Cloud Storage Studio, Cloudberry Explorer and my own Azure Storage Explorer.


    David Pallmann GM Application Development, Neudesic Windows Azure MVP
    • Marked as answer by Mog Liang Wednesday, January 26, 2011 9:14 AM
    Wednesday, January 19, 2011 5:59 PM
  • that 's very good but  dont think i will be in need for blocks because the file is too small (only 2 MB) and the block divides the blob to around several block in around 60 MB am i right??

     

    just a small question in the blob.UploadFile(filename);

    the filename is the XAP file right?

    i am trying to learn using the Azure Storage Explorer


    Haddy El-Haggan Microsoft Student Partner - Egypt
    Thursday, January 27, 2011 1:00 PM
  • Can we make it in a WorkerRole too?

     

    i am currently doing it on a webrole using shared access signature


    Haddy El-Haggan Microsoft Student Partner - Egypt
    Thursday, January 27, 2011 1:02 PM