Error : New-AzWebApp : Web site name ‘ is not available. Please try a different name
I hope you all are doing good 🙂 . Today I came up with one different topic related one Issue. This is very known issue but it took much time for me to find-out the main reason behind this. Here I will share my experience with that issue I faced during my lab test using power-shell. The requirement was to create multiple Azure web app by using Power-Shell .
as usual, I have prepared and execute my power shell script, during the execution, I got the following s shown in the figure also.
Error : New-AzWebApp : Web site name ‘Maanas_App2 is not available. Please try a different name .
Initially my thought was like, I am using the duplicate name for the web app but I am repeatedly getting the same error as shown in the following figure, even after changing the name many times.
Then as usual I went to our godfather 🙂 the Google for some time without any success. After that I thought, there might be some issue with my subscription and try to create one web app through portal using the same name and got the following error as shown in the following figure.
Now I realized underscore ( “_” ) was not allowed for the name ( Maanas_app2 ) of a Web App as it is allowed for the name of other resources (virtual Network, Resource Group etc.) in Azure. Then I replaced all underscore (“_”) to hyphen (“-“) and it worked as shown here.
Then execute my power-shell script after update the script and this time I succeed to create the Web App.
I hope this helps you, to fix your issue and save some time 🙂 .
Keep reading, share your thoughts, experiences. Feel free to contact us to discuss more.
If you have any suggestion / feedback / doubt, you are most welcome. Stay tuned on Knowledge-Junction, will come up with more such articles.
Thanks for reading 🙂 .
You must log in to post a comment.