0

I am trying the sample code below.
https://learn.microsoft.com/ja-jp/azure/storage/blobs/storage-upload-process-images?tabs=javascript%2Cazure-powershell

I was able to move locally.
(Start URL: http: // localhost: 3000)
We are deploying the code to Azure Apps Service as a Zip file.
However, even if I access the site URL, it cannot be operated.
(Start URL: https: // {azure apps service} .azurewebsites.net)

I'm wondering if I should set Web.Config, but I don't know what to write.
If you know what to set in WebConfig with the above code, I would appreciate it if you could tell me.
Also, if there is a solution other than this, I would appreciate it if you could tell me that as well.

stkhr
  • 71
  • 1
  • 12
  • What is the error you are getting while accessing the URL ? – Harshitha Veeramalla Jan 17 '22 at 10:39
  • The error is "You do not have permission to view this directory or page." – stkhr Jan 18 '22 at 01:10
  • Even if you specify the start file (./bin/www) of package.json in web.config, the code of the file will appear as pre tag as it is Is this another problem? What should I do if I don't want to display the code as pre? – stkhr Jan 18 '22 at 02:19

1 Answers1

0
  • I have followed the document which you have provided and it is working fine for me.
  • I am able to upload images and check them in storage account. enter image description here enter image description here

"You do not have permission to view this directory or page."

  • The root reason can be there is no default page in your Azure website.

  • when you deploy the zip file via the azurewebsites.net/ZipDeployUI, make sure that you see the files being unzipped on the /wwwroot level.

  • If the files show up under /wwwroot/your-app-folder/ you may get this permission issue.

  • You could directly view the page with url.

https://{siteanme}.azurewebsites.net/views/yourpage.html

Add the default document in the project root folder and set it as default page in appsetting on the Azure portal and save the setting.

The default document is the web page that is displayed at the root URL for a website.

enter image description here

  • Navigate to KUDU url: https://<your app name>.scm.azurewebsites.net/DebugConsole and go to site\wwwroot to check if the files are contained within a directory.

  • If you find any files missing , re-deploy the app.

    OR

  • Just for checking Temporarily, drag the local files directly to the d:home\site\wwwroot directory and try again.

  • For debugging purposes you can turn on the Azure detailed messaging.

  • Login to Azure > App Services > Your Web App > App Service logs , then turn on Detailed Error Messages or turn on all of the logging options.

  • Add the below in your Web Config file,

  • add <customErrors mode="Off" /> BEFORE system.web closing tag, </system.web>. Similarly, add <httpErrors errorMode="Detailed"></httpErrors> BEFORE </system.webServer>.Upload the Web Config to Azure.

This will show the error messages in detail , from there you can figure out the exact issue.

Please refere SO thread for more details.

Harshitha Veeramalla
  • 1,515
  • 2
  • 10
  • 11
  • @ HarshithaVeeramalla-MT - Thank you for your teaching. The file was unzipped directly under wwwroot. I have one question. Do I need to build a new default page? Or is there a specified default page in the sample? If so, I would appreciate it if you could tell me. – stkhr Jan 26 '22 at 00:26
  • @stkhr - Check if your Application has any default document , In Portal=>Your Application=>Advanced Tools=>Go=>Debug Cosole=>cmd=>site=>wwwroot. If you dont find any create one and check once. – Harshitha Veeramalla Jan 26 '22 at 05:14
  • Try to access url like - > https://{siteanme}.azurewebsites.net/views/yourpage.html – Harshitha Veeramalla Jan 26 '22 at 05:15
  • @ HarshithaVeeramalla-MT - Thank you for your teaching. After reviewing the settings, I found that the file specification in the handler of web.config was incorrect and could not be seen. Also, I was able to deepen my understanding of how to write the default page. The check mark has already been pressed. thank you. – stkhr Jan 27 '22 at 01:39