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

  • Home
  • SEARCH
  • 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 8321595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T23:04:28+00:00 2026-06-08T23:04:28+00:00

I am in doubts. I have a code which create a file foo.txt and

  • 0

I am in doubts.

I have a code which create a file “foo.txt” and then copy it to a blob with UploadFile().
If I undesrtand well azure concept I can’t create this file in “c:\” ?
I am obliged to use local storage in my ServiceDefinition.csdef, and create it in azureLocalResource.RootPath.

But there is a c:\ drive for write (a d:\ for the OS and a e:\ for code), isn’t it?
What is it use ?
Can we just use it in the start-up task ?

I ask because I believe that code ran with c:\ util this day.
And I can’t find why a similar code don’t work in a new worker role.
(It is a file and directory issue, not just file)

[Answer]
I can create this file in c: but it is highly recommended to use local storage API, because the drive letter isn’t always the same (after a reboot for example).
Local storage is just a short cut for use the read&write drive of the current instance.
In specific case of startup task, we can acces to this storage by 2 ways : with the azure API in a c# program/script (see this topic) or with environment variables (see this topic).

  • 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-08T23:04:31+00:00Added an answer on June 8, 2026 at 11:04 pm

    You don’t want to tie yourself to fixed driveletters. It’s true that C:\ is most of the time the data disk, D:\ is most of the time the OS and E:\ is most of the time where your code resides.

    But you can’t count on this, that’s why I say most of the time. Like Ryan explains here, it could be possible that your application disk changes from E:\ to F:\ after a reboot, well the same thing could apply for your data disk. Only the LocalResource can tell you where you can save your files, so I suggest you use it.

    If you have startup tasks that need to work with files, you should also work with LocalResources. This is possible by using PowerShell: http://blog.smarx.com/posts/using-a-local-storage-resource-from-a-startup-task

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

Sidebar

Related Questions

Applescript: Deleting Duplicates in a text file I have a .txt file which I've
i have a problem with my jquery code which is disabling all the text
I have a following piece of code which connects to database and executes a
I have a few doubts which i am already sure of it but still
I have to implement one web2py application which has to access java code (which
I have some doubt on below code #include<stdio.h> int i=6; int main() { int
I have a small architecture doubt about organizing code in separate functional units (most
Few basic doubts I have: 1. Is primary key column automatically indexed? 2. What
I am thinking about using Gears in a project, but I have doubts about
I have some doubts. What is querystrng? how we can use it? what are

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.