How to Distribute Folders by Deploying Windows azure WebSite?

Damir Dobric Posts

Next talks:



Follow me on Twitter: #ddobric




Sometimes there are situations when your Windows Azure Web Site is requiresdto read or write some files to/from folders which are directly below your site root.
For example if you want to persist some temporary created data or similar. To illustrate this requirement take a look on following picture:

When this application is deployed on the web server the folder ‘Temp” will not exist. Usually your web site is deployed on location which looks like:


Everything from you project folder structure will be deployed here.Almost everything, because folder ‘Temp’ and possibly some other folders will not be deployed.
If you execute following statement


you will get back FALSE, which obviously means that this folder does not exist. Deployment process will not deploy the folder if it is empty.
The solution is easy. As in most other project types you need to add a file in the folder and set it as a content of your application:


Posted Jan 21 2014, 06:29 AM by Damir Dobric
Filed under: , , is a .Net Community Blog powered by daenet GmbH.