2
votes

I have an Azure Web app. Up until a few days ago I had a simple file upload form that worked well.

About a week ago, it started causing the following error:


Access to the path 'D:\home\site\wwwroot\Accounts\XXX\test.sqlite' is denied.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.UnauthorizedAccessException: Access to the path 'D:\home\site\wwwroot\Accounts\XXX\test.sqlite' is denied.

ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6 and IIS 7, and the configured application pool identity on IIS 7.5) that is used if the application is not impersonating. If the application is impersonating via , the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.


I know if this was running on my local machine or more traditional hosting provider, I could right click on the folder and manage the permissions.

But I have a hosted Azure web app. I have access to the following tools:

  • IIS remote manager
  • The new Azure portal (which has a sandbox command console)
  • FTP

How can I resolve this? I should note that I tried redeploying the source code to another Azure web instance... and the form worked fine!- for about 2 days and then started returning the same error.

A really basic tutorial would be much appreciated, maybe even with screenshots. I see this question being asked quite a bit with no resolve for sites running as an Azure Web App.

1

1 Answers

0
votes

You should store the files in Azure Storage not under your virtual directory as this may cause the IIS Site to restart