Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8438855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:50:01+00:00 2026-06-10T07:50:01+00:00

I have a WCF service hosted on Windows Azure as a cloud service. When

  • 0

I have a WCF service hosted on Windows Azure as a “cloud service.” When the service starts, it needs to populate data from files/disk to its memory so it is accessed fast (cached in other words). Right now I’m using like C:\Documents\Filestoprocess folder so that the WCF calls the folder and populates data data in that folder in its memory. I have like 5,000 small files. How do I do this in Azure? Is there a folder path that I can call within the WCF so that the WCF calls these files and opens each files and saves each data in the files? I’m not really looking for complicated Blob access through network using bandwidth. I’m looking for simple disk I/O access to these files from the WCF “cloud service” that is running on its own public web address.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T07:50:03+00:00Added an answer on June 10, 2026 at 7:50 am

    Blob access is not complex. In fact, you could do a single download of a zip file from blob storage to local disk, unzip it, then prime your wcf service from those 5,000 small files.

    Check out this msdn page documenting DownloadBlobToFile(). The essential parts:

    CloudBlobClient blobClient = 
            new CloudBlobClient(blobEndpoint, new StorageCredentialsAccountAndKey(accountName, accountKey));
    
        // Return a reference to the blob.
        CloudBlob blob = blobClient.GetBlobReference("mycontainer/myblob.txt");
    
        // Download the blob to a local file.
        blob.DownloadToFile("c:\\mylocalblob.txt");
    

    Now: I don’t agree with saving to the root folder on C:. Rather, you should grab some local storage (easily configurable). Once you configure local storage in your role configuration, just ask the role environment for it, and ask for root path:

    var localResource = RoleEnvironment.GetLocalResource("mylocalstorage");
    var rootPath = localResource.RootPath;
    

    Note: As @KingPancake mentioned, you could use an Azure drive. However: remember that an Azure drive can only be writeable by one instance. You’d need to make additional snapshots for your other instances. I think it’s much simpler for you to go with a simple blob, copy your files down (either as single zip or individual files), and go from there.

    You mentioned concern with network+bandwidth. You don’t pay for bandwidth within the same data center. Also: It’s extremely fast: 100Mbps per core. So even with a Small instance, you’ll have your files copied down very quickly, moreso when you go to larger instance sizes.

    One last thought: The only other ways to gain access to your 5,000 files, without using blob storage or Azure Drives (which are mounted as vhd’s in blob storage) would be to either download the files from an external source or bundle them with your Windows Azure package (and then they’d show up in your app’s folder, under whatever subfolder you stuck them in). Bundling has two downsides:

    • Longer time to upload your deployment package due to added size
    • Inability to change any of the individual files without redeploying the package.

    By storing in a blob, you can easily change one (or all) of your small files without redeploying your code – you’d just need to signal it to either re-read from blob storage or restart the instances so they automatically download the new files.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WCF Service hosted on Windows Azure and I just recently changed
I have a WCF service hosted within a Windows service. Its purpose is to
I have a silverlight application which fetches data from a WCF Service hosted under
We have created a WCF service hosted in a windows service that handles Authentication
I have a wcf service library that is hosted in a windows service. I
I have a WCF process hosted in a windows service. I am wondering if
I have a WCF environment hosted on a windows service. I have two hosts
I have a WCF service hosted on my local machine as windows service. Now
I have created a WCF service that needs to be hosted in a Window
I have a WCF service which is hosted in a Windows Service and has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.