Hi,
I'd like to suggest you use Remote Desktop to connect Azure VM and see that XML file is existing. As far as i know, azure package is deployed it's not creating the /App_Data/ folder, you can check for this.
And i dont think this is a good way to put xml file in app root directory:
1, security reason. it's not a good practice that the worker account has write access to the app directory.
2, recycling reson. when a certain amount of files (or directories) change or get created, IIS might decide to recycle the app domain.
The better solution is local storage, try this:
Service definition:
<LocalResources>
<LocalStorage name="cacheStorage" sizeInMB="20480" cleanOnRoleRecycle="false" />
</LocalResources>
Code:
string cachePath = RoleEnvironment.GetLocalResource("cacheStorage").RootPath;
string filePath = Path.Combine(cachePath, filename);
Hope this helps.
Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact
msdnmg@microsoft.com
Microsoft One Code Framework