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 6673437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:37:38+00:00 2026-05-26T03:37:38+00:00

I have a WCF service hosted in Azure. I have a spatialite database file

  • 0

I have a WCF service hosted in Azure.

I have a spatialite database file I’m going to keep in Azure blob storage (1.1G). Compressed it is 500K.

I would like to copy it to local storage when my service starts, and then use spatialite to run various spatial functions off the database file. The spatial data is static.

Does anybody have a code snippet (C#) to copy a file from azure blob storage to local storage?

(also, I think this approach makes sense – does it?)

(also, should I bother compressing the file for blob storage?)

Thanks

EDIT: Thanks for the first two responses. I was hoping for some code snippets to use. I could use a little more explanation on which would be the better route to go. Just code it all or use this bootstrap idea.

SOLUTION:
I’m marking SMARX’s as answer because it should work for any protected azure file, but since the file is a publicly available blob file, I skipped the CloudStorageAccount route suggested by SMARX, in favor of simple web access. I’m wondering if there are any speed advantages to using SMARX’s approach though. Any comments would be appreciated.

// Retrieve an object that points to the local storage resource
LocalResource localResource = RoleEnvironment.GetLocalResource("MyLocalStorage");

WebClient webClient = new WebClient();
webClient.DownloadFile(blobUrl, localResource.RootPath + "mySpatialiteDB.sqlite");

NOTE: You have to configure the local storage through your webRole properties

  • 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-05-26T03:37:39+00:00Added an answer on May 26, 2026 at 3:37 am

    How about: CloudStorageAccount.Parse(...).CreateCloudBlobClient().GetBlobReference("path/of/blob").DownloadFile(RoleEnvironment.GetLocalResource("nameOfLocalResource").RootPath);

    Do that in your RoleEntryPoint in OnStart before you do anything else?

    • 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 in IIS 7.0 that needs to run database
I have a WCF Data service hosted in Azure as a Azure Web Role.
I have a WCF Service hosted on Windows Azure and I just recently changed
I have hosted one WCF Service on the Azure platform and in web.config enabled
I have WCF service hosted by Windows service. This is my app.config file (server-side)
I have hosted a WCF service on Azure at http://voraservice.cloudapp.net/MyPushService.svc . The problem is
I have a WCF service hosted for internal clients - we have control of
I have a WCF service hosted in IIS. The intention is for clients to
I have a WCF service hosted in IIS and want to gain access to
I have a WCF service hosted in IIS 7. It takes some minutes until

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.