Access to a specific file location (c:/folder/file

2019-07-16 17:04发布

问题:

A company provides me a .dll with many files. The dll access to files using this kind of path "C:/folder/file.config". I'm working on IIS 8 over a dedicated server BUT I would like to migrate the project on Windows Azure.

I know that Windows Azure provides Virtual Machines, But I wouldn't use it just for this need.

In my dream, I would like to use a web site linked to an Azure Storage and the dll which is located on the web site could access to its "C:/folder/file.config".

Could Windows Azure has a storage which support basic path ? ("C:/folder/file.config") How could I solved this problem without using a Virtual Machine ?

回答1:

You need to exercise caution before moving onto this Azure solution for the following reasons:

  1. Azure Web Roles will have read/write access only to the Root Website folder and sub-folders. Not to any other.
  2. Also, even if you manage to get permissions to the expected folder, remember that the instance can be recycled anytime. Meaning you need to repeat your startup task of creating the folder structure and putting the file there, setting up permissions etc.
  3. And finally, the web instances are independent of each other with their own copies of the config file. So you need to take care of any sync issues. (just read-only doesn't pose a problem)
  4. Filesystem access requires a bunch of csdef configurations as well along with elevated tasks.

http://blog.codingoutloud.com/2011/06/12/azure-faq-can-i-write-to-the-file-system-on-windows-azure/



回答2:

In Azure Websites your website located here :

d:\home\site\wwwroot

which actually mapping for :

C:\DWASFiles\Sites\[your website name]

you can't access any parent folder above that folder in C: partition in Azure Websites