Thursday, March 19, 2020

LinuxFx version has invalid values or while creating Linux app service plan using ARM template, it is creating as a window app service plan in app services


  • Due to latest changes in ARM API's, deployment for the Linux web app using the ARM template is failing with the below error's:


  1. Linux FX version has invalid values error.
  2. Linux app service plan is getting created and showing on azure portal as a Linux app service plan but actually it has created a window app service plan.

  • Reason why it is happening:


  1. To resolve the issue 1, due to recent ARM API changes we can either use “Kind” or “Reserved” keyword.
After removing the “Kind” property from the ARM template, We have performed the deployment and it worked.
  1. To resolve the issue 2,If you set "kind": "Linux" but without setting "reserved": true, it deploys a Windows service plan with a Linux icon!
So you need to add "reserved": true property when you are performing Linux web app deployment and want to create a Linux App Service plan using the ARM template.


Thursday, April 11, 2019

409 Conflict: Could not write to local resource 'D:\home\site\wwwroot\web.config' due to error 'Access to the path is denied.'.



Issues/Errors

409 Conflict: Could not write to local resource 'D:\home\site\wwwroot\web.config' due to error 'Access to the path is denied.'.

Not able to Delete and Stop continuous web jobs from Portal/Kudu.

Cause of the Issue

The above issues/errors occur when we are not allowed to perform any write operations on wwwroot folder.

The application setting ‘WEBSITE_RUN_FROM_PACKAGE=1’ of the App Service makes the wwwroot folder of the application as read-only.

If the setting is available in the application settings of the App Service then we will get 409 conflict error whenever we try to add/edit any files to the wwwroot folder from App Service Editor or Kudu console.





When Deleting/Stopping a web job, it tries to add a file disable.job file to the job folder. If the Web Job is deployed to App_Data folder of wwwroot folder of the application then adding of disable.job file to the job folder i.e. App_Data is not supported and hence web job delete/stop operation from Azure Portal/kudu will be unsuccessful.

When does the setting ‘WEBSITE_RUN_FROM_PACKAGE=1’ get added?

 Usually the setting is added when Run from package deployment is performed to App Service.

Run from Package deployment means application code will be available as a Zip deployment package in the d:\home\data\SitePackages (instead of wwwroot folder) and the zip gets mounted on wwwroot as a read-only file system.
Deploying from DevOps using App Service Deploy task version 4.0, if no deployment method is selected, it auto selects the best suitable deployment method based on the build artifact generated.

If the artifact generated is Zip file and App Service Deploy Task version is 4.0 then most probably it auto-select Run from Package deployment method (if no deployment method is selected manually) and add the setting ‘WEBSITE_RUN_FROM_PACKAGE=1’ making wwwroot folder as read-only.





More details about Run from package deployment can be found on the Url:

Solution

Deploy the application/web job using other deployment method i.e. MSDeploy, which change the setting value to 0 and make wwwroot folder writable.

Deleting the setting ‘WEBSITE_RUN_FROM_PACKAGE’ or changing the setting value to 0.

Note: Deleting the setting ‘WEBSITE_RUN_FROM_PACKAGE’ or changing the setting value to 0 implies the application code will now be pointed to wwwroot folder, so before changing the value to 0 make sure you  application code is not pointing to d:\home\data\SitePackages so as to avoid the situation where wwwroot folder end up having no files.


Wednesday, February 6, 2019

Configure Sitecore® Experience Cloud environment on Azure

Configure Site core® Experience Cloud environment on Azure

Step 1:

Navigate to https://ms.portal.azure.com/ and click on Create a resource. Type Site core Experience Cloud on the search bar as mentioned on the below screenshot.




Step 2:

After clicking on Site core® Experience Cloud it will show you the below mentioned window. Just click on Create to proceed ahead with the Site core environment creation.


Step 3:

After clicking on Create, it will show you the below mentioned window. Just select your subscription -> Create or select existing resource group -> click on Configure required settings to proceed ahead with the Site core environment creation. It will open the below Site core window on the right side and ask you to setup the Site core environment.

Please select environment details from the drop downs based on your requirements and click on next.





Step 4:

After clicking on Next, it will ask you to fill Credentials and Region-specific details. Please fill it accordingly and go to the final Summary page and click on Back.




Step 5:

“This is very important step. Please don’t miss otherwise you will not be able to create Site core environment and get blank page if you missed.”

After clicking on Back, “Don’t click directly on OK button to create Site core environment”.

This is the mandatory step, You have to click on “Review legal terms” and acknowledge the privacy policy. Once done click on OK to create the Site core environment.




Feel free to reach out to me on itshemant09@gmail.com or comment on this blog if you see any issue or have any query.

LinuxFx version has invalid values or while creating Linux app service plan using ARM template, it is creating as a window app service plan in app services

Due to latest changes in ARM API's, deployment for the Linux web app using the ARM template is failing with the below error's: ...