question

MichaelM-4295 avatar image
0 Votes"
MichaelM-4295 asked FranciscoJosMorenoCaravaca-0582 answered

Unable to view a file name that contains '%20' on my azure web app

I have set up an app service through Azure with Azure Repos(TfsGit) as the source.
Here's how the files set up on my repo:

files/img1.png
files/%20.png

and once deployed, I should be able to see those files under my web app. for example:

https://mine.azurewebsites.net/files/img1.png ---> looks fine

however these urls below give me the error 'The resource you are looking for has been removed, had its name changed, or is temporarily unavailable'

https://mine.azurewebsites.net/files/%20.png ---> can't load the file

I also tried these but no luck

https://mine.azurewebsites.net/files/%2520.png ---> can't load the file
https://mine.azurewebsites.net/files/%252520.png ---> can't load the file

How I can view that particular file?

azure-webapps
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.


Thanks for asking question! Could you please refer to this official document and see if all steps followed when enables continuous deployment from Azure Repos.

You may want to know that All the officially supported deployment methods make changes to the files in the /home/site/wwwroot folder of your app. These files are used to run your app. So the deployment can fail because of locked files. The app might also behave unpredictably during deployment because the files aren't all updated at the same time. To avoid this:

Run your app directly from the ZIP package, without unpacking it.
• Stop your app or enable offline mode for it during deployment. For more information, see Deal with locked files during deployment.

Check this article link: https://docs.microsoft.com/en-gb/azure/app-service/faq-deployment#how-do-i-integrate-azure-devops-code-with-app-service-

Let us know.

0 Votes 0 ·

Hi thanks for the reply, but there weren't any issues with the deployment.
It was successfully deployed to production.
I tried to redeploy again, and the issue still occurs

0 Votes 0 ·

1 Answer

FranciscoJosMorenoCaravaca-0582 avatar image
0 Votes"
FranciscoJosMorenoCaravaca-0582 answered

Hi, Michael

"%" (ASCII 25 hex): Used for encoding "strange" characters.
What characters should we use? Basically everything is based on US-ASCII. The% symbol will remain as the encoding system. This implies that the unsafe characters will be painted as% followed by 2 numbers. These numbers will refer to hexadecimal. For example,% 20 refers to ASCII character 20, which is "space". The rest of the special characters are defined in the list: "!", "$", "&", "‘ "," (",") "," "," + ",", ","; " and "=". The unreserved characters are: "letters", "numbers", "-", ".", "_" And "~". In the latter cases, when one of them is encoded in the URL, it must be converted to its original value. This means that if we find an address like this:

//example.com/example%2Dde%2Durl%2Ehtml
the browser (or any system) must leave it standardized in:

//example.com/url-example.html
In this way, these are semi-reserved characters since they have a special treatment.

  • Tim Berners-Lee document from June 1994 (3986)

I recommend that you do not use any special characters to create the name of the image.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.