question

JayashreeKC-6711 avatar image
0 Votes"
JayashreeKC-6711 asked Grmacjon-MSFT answered

Azure web app path mapping using az update not working

I have used the below command to update my path mappings for azure web app but it does not actually add the mapping but still shows command execution successfull.

az resource update --name acusnpdsndweb06/config/web --resource-group azrg-tax-snd-m-dev --resource-type "Microsoft.Web/sites/config" --set properties.virtualApplications="[{\"physicalPath\":\"site\\wwwroot\",\"preloadEnabled\":true,\"virtualDirectories\":null,\"virtualPath\":\"/\"},{\"physicalPath\":\"site\\wwwroot\\ConfigService\",\"preloadEnabled\":false,\"virtualDirectories\":null,\"virtualPath\":\"/configService\"},{\"physicalPath\":\"site\\wwwroot\\FileManagerApi2020100516.2\",\"preloadEnabled\":true,\"virtualDirectories\":null,\"virtualPath\":\"/FileManagerApi2020100516.2\"},{\"physicalPath\":\"site\\wwwroot\\FileManagerApi2020103014.2\",\"preloadEnabled\":true,\"virtualDirectories\":null,\"virtualPath\":\"/FileManagerApi2020103014.2\"},{\"physicalPath\":\"site\\wwwroot\\FileManagerApi2020103018.1\",\"preloadEnabled\":true,\"virtualDirectories\":null,\"virtualPath\":\"/FileManagerApi2020103018.1\"},{\"physicalPath\":\"site\\wwwroot\\FileManagerApi2020103021.1\",\"preloadEnabled\":true,\"virtualDirectories\":null,\"virtualPath\":\"/FileManagerApi2020103021.1\"},{\"physicalPath\":\"site\\wwwroot\\FileManagerApi2020110421.1\",\"preloadEnabled\":false,\"virtualDirectories\":null,\"virtualPath\":\"/FileManagerApi2020110421.1\"},{\"physicalPath\":\"site\\wwwroot\\FileManagerApi2020120707.1\",\"preloadEnabled\":false,\"virtualDirectories\":null,\"virtualPath\":\"/FileManagerApi2020120707.1\"},{\"physicalPath\":\"site\\wwwroot\\FileManagerApi2020120810.1\",\"preloadEnabled\":false,\"virtualDirectories\":null,\"virtualPath\":\"/FileManagerApi2020120810.1\"},{\"physicalPath\":\"site\\wwwroot\\FileManagerApi2021020501.2\",\"preloadEnabled\":false,\"virtualDirectories\":null,\"virtualPath\":\"/FileManagerApi2021020501.2\"},{\"physicalPath\":\"site\\wwwroot\\FileManagerApi2021021002.1\",\"preloadEnabled\":false,\"virtualDirectories\":null,\"virtualPath\":\"/FileManagerApi2021021002.1\"},{\"physicalPath\":\"site\\wwwroot\\FileManagerApi2021033019.1\",\"preloadEnabled\":false,\"virtualDirectories\":null,\"virtualPath\":\"/FileManagerApi2021033019.1\"},{\"physicalPath\":\"site\\wwwroot\\FileManagerApi2021033023.1\",\"preloadEnabled\":false,\"virtualDirectories\":null,\"virtualPath\":\"/FileManagerApi2021033023.1\"},{\"physicalPath\":\"site\\wwwroot\\FileManagerApi2021033103.1\",\"preloadEnabled\":false,\"virtualDirectories\":null,\"virtualPath\":\"/FileManagerApi2021033103.1\"},{\"physicalPath\":\"site\\wwwroot\\FileManagerApi2021033104.1\",\"preloadEnabled\":false,\"virtualDirectories\":null,\"virtualPath\":\"/FileManagerApi2021033104.1\"},{\"physicalPath\":\"site\\wwwroot\\FileManagerApi2021040700.1\",\"preloadEnabled\":false,\"virtualDirectories\":null,\"virtualPath\":\"/FileManagerApi2021040700.1\"},{\"physicalPath\":\"site\\wwwroot\\FileManagerApi2021040918.1\",\"preloadEnabled\":false,\"virtualDirectories\":null,\"virtualPath\":\"/FileManagerApi2021040918.1\"},{\"physicalPath\":\"site\\wwwroot\\FileManagerApi2021061217.1\",\"preloadEnabled\":false,\"virtualDirectories\":null,\"virtualPath\":\"/FileManagerApi2021061217.1\"},{\"physicalPath\":\"site\\wwwroot\\FileManagerApi2021072316.1\",\"preloadEnabled\":true,\"virtualDirectories\":null,\"virtualPath\":\"/FileManagerApi2021072316.1\"},{\"physicalPath\":\"site\\wwwroot\\FileManagerApi2021072615.1\",\"preloadEnabled\":false,\"virtualDirectories\":null,\"virtualPath\":\"/FileManagerApi2021072615.1\"},{\"physicalPath\":\"site\\wwwroot\\FileManagerService\",\"preloadEnabled\":false,\"virtualDirectories\":null,\"virtualPath\":\"/FileManagerService\"},{\"physicalPath\":\"site\\wwwroot\\FMApiStoargeChangeTest\",\"preloadEnabled\":false,\"virtualDirectories\":null,\"virtualPath\":\"/FMApiStoargeChangeTest\"},{\"physicalPath\":\"site\\wwwroot\\FileManagerApi2021072719.1\",\"preloadEnabled\":false\"virtualDirectories\":null,\"virtualPath\":\"/FileManagerApi2021072719.1\"}]"


Please check

azure-webapps
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.

1 Answer

Grmacjon-MSFT avatar image
0 Votes"
Grmacjon-MSFT answered

Hi @JayashreeKC-6711,

Thanks for brining this to our attention. What version of CLI are you using? Is this a Linux or windows based app?have you tried updating your map pathing through the portal?

Based on this similar Github thread, az resource update is not designed to support updating the webapp config.

If you want to update the configuration of webapp, the following command should be executed:

az webapp config set --name {resource-name} -g {resource-group} --generic-configurations "{\"virtualApplications\":[{\"physicalPath\":\"site\\wwwroot\",\"preloadEnabled\":false,\"virtualDirectories\":null,\"virtualPath\":\"/\"},{\"physicalPath\":\"site\\wwwroot\\v2\\flow-server\",\"preloadEnabled\":false,\"virtualDirectories\":null,\"virtualPath\":\"/flow\"},{\"physicalPath\":\"site\\wwwroot\\v2\\iris-server\",\"preloadEnabled\":false,\"virtualDirectories\":null,\"virtualPath\":\"/iris\"}]}"

Because only this command implements the function of Web Apps - Create Or Update Configuration.

It might be also helpful to check out this documentation regarding quoting best practices when using CLI.


Hope that helps.

-Grace


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.