locked
How to send a file to local machine from web role instance through azure connect ? RRS feed

  • Question

  • I have an application deployed on cloud and a local machine connected through azure connect. I want to send daily reports of my azure applications to my local machine. How can it be done ?

     

    Thanks and Regards,

    Hardik Dhokai

    Friday, March 25, 2011 12:19 PM

Answers

  • Hello Hardik,

    You can use the provided blog as a starting point, and you can do the oposite - share a folder in your on-premise and mount it in your Azure Role. Now just write to the mounted drive.

    However I would not suggest using Azure Connect to share files between Azure and on premise! What will happen if your Internet provider is down? Or you suffer a power outage at the moment the Azure role tries to write files? My suggestion is to write report files in a Azure Blob, and do a little WinForms application (or service) for the on-premise which would check the blob and download it. The best solution (although little more complex) would involve an Azure Queue also. And the scenario will be:

    1. Your role create the report and save it to a blob
    2. Your role sends a message in the Azure Queue that report is generated with reference to the blob
    3. Your on premise Service/WinForms app checks the Azure Queue for new messages periodically
    4. When there is a message in the Queue, your Windows Service / WinForms app reads that message and downloads the mentioned blob to the local hard drive

    Thus you will have reliable and decoupled infrastructure. Making your Azure dependent on your system is kind of non-sense for a Cloud service.

    You can refer this project at CodePlex: http://azurevideoconv.codeplex.com/ as it uses the very same technology I described. Even more. The role listens to the Queue for incoming files (which are stored into blob), donwload the files, make some process, writes the result into another blob and sends results to an Azure Table.

     

     

    Sunday, March 27, 2011 3:00 PM
  • Hi Hardik,

    One way to do what you want is to let you Azure app write file to a network file share on the local machine. See this blog for details. 


    Jason Chen, Windows Azure PM
    Friday, March 25, 2011 7:16 PM

All replies

  • Hi Hardik,

    One way to do what you want is to let you Azure app write file to a network file share on the local machine. See this blog for details. 


    Jason Chen, Windows Azure PM
    Friday, March 25, 2011 7:16 PM
  • Hi Jason,

    Thank you for your kind suggestion. But, we can just share files with connected local machine according the blog you provided. I want to send a copy of file to a local machine. Is there any way  for it ?

    Regards,

    Hardik Dhokai


    Be Innovative. :)
    Sunday, March 27, 2011 8:07 AM
  • Hello Hardik,

    You can use the provided blog as a starting point, and you can do the oposite - share a folder in your on-premise and mount it in your Azure Role. Now just write to the mounted drive.

    However I would not suggest using Azure Connect to share files between Azure and on premise! What will happen if your Internet provider is down? Or you suffer a power outage at the moment the Azure role tries to write files? My suggestion is to write report files in a Azure Blob, and do a little WinForms application (or service) for the on-premise which would check the blob and download it. The best solution (although little more complex) would involve an Azure Queue also. And the scenario will be:

    1. Your role create the report and save it to a blob
    2. Your role sends a message in the Azure Queue that report is generated with reference to the blob
    3. Your on premise Service/WinForms app checks the Azure Queue for new messages periodically
    4. When there is a message in the Queue, your Windows Service / WinForms app reads that message and downloads the mentioned blob to the local hard drive

    Thus you will have reliable and decoupled infrastructure. Making your Azure dependent on your system is kind of non-sense for a Cloud service.

    You can refer this project at CodePlex: http://azurevideoconv.codeplex.com/ as it uses the very same technology I described. Even more. The role listens to the Queue for incoming files (which are stored into blob), donwload the files, make some process, writes the result into another blob and sends results to an Azure Table.

     

     

    Sunday, March 27, 2011 3:00 PM