System.UnauthorizedAccessException

I’ve a solution running on my local machine without issue. However when I deploy to an azure website I encounter the following error:


System.UnauthorizedAccessException: Access to the path ‘temp\Processing\adbd92df-868f-4bc4-80e4-4aa8dc195498.pdf\2015-12-21T01_50_46\100@x.Pdf’ is denied.

There is no way that I’m aware of to set folder permissions for an azure website. Does the product work with websites or do I need to deploy using webroles?

Hello,


Thank you for the request. This issue related to the Azure server, Please try to use approach suggested here

Best regards.

Hi,


Thanks for your reply.

I had already looked into that - the issue I have is specifically to do with websites, NOT webroles. Permissions can not be administered for websites in the way that they can for webroles. Do you have any other suggestions?

Hi again,


Thank you for coming back. I think you should start from here and if there is nothing useful contact the Azure support to found out how to configure your web site.

Sorry for the inconvenience.
For anyone else with this issue - you need to set the processing folder as App_Data (a folder with appropriate permissions) like so:

Viewer.SetRootStoragePath(Server.MapPath("~/App_Data/"));

Hi,


Thank you for sharing. Yes, this is one of possible solutions but such solution is not quite acceptable for all users because the App_Data folder is a kind of application system folder.

Best regards.