Azure Resources Created Date /Azure app Service Created Date


Azure app Service Created Date

Azure Resources Created Date


Issue:
·       Get the list of resource with created date
·       Web App Created date
·       How can I know when my web app is created?

Solution:
It is not possible to get the web app created date directly.

You can check relevant details on Activity Logs.

Through activity logs, you can determine:

·       What operations were taken on the resources in your subscription
·       Who started the operation?
·       When the operation occurred
·       The status of the operation
·       The values of other properties that might help you research the operation

I just created one web app and able to see the activity logs. You can also check who created it in “Event Initiated By” columns

Azure Resources Created Date



But Activity log has limitation as it retained logs only for 90 days. You can query for any range of dates, as long as the starting date is not more than 90 days in the past.

You can get more information in below URL,

I have investigated and observed that there is no REST API exposed for the web app’s created date property hence we have to think about the alternative way to achieve this.
And one of the most important feature which can help us here is the “TAGS
TAGS are used to organize your azure resources.
You apply tags to your Azure resources giving metadata to logically organize them into a taxonomy. Each tag consists of a name and a value pair.
For example, you can apply the name "Environment" and the value "Production" to all the resources in production similarly you can have “CREATED DATE” tag with the date value.
After you apply tags, you can retrieve all the resources in your subscription with that tag name and value. Tags enable you to retrieve related resources from different resource groups. This approach is helpful when you need to organize resources for billing or management.

You can get more details on below URL,


Once you create tags for “created date” than you can get the list of all your web app/App Services along with the created date.

You can go to your subscription -> resources -> Edit Columns
You can see the  filter name “Tags”



Once you select the Tags and move it to right section then then tag column appear in the filter and you can see the list of all web app along with “created tag” value.



I understand that it is not possible to add tag every time when someone create a web app hence you can use Azure Policy to enforce tagging rules and conventions. By creating a policy, you avoid the scenario of resources being deployed to your subscription that don't comply with the expected tags for your organization. Instead of manually applying tags or searching for resources that aren't compliant, you can create a policy that automatically applies the needed tags during deployment. The following section shows example policies for tags.

You can get more details on below URL,

You can simply apply tag and it’s default value.



References: 


Azure web app Multiple FTP Users

Azure web app Multiple FTP Users



I noticed many users want to have Multiple FTP users for Azure App Services.

Azure web app provide 2 types of deployment credentials,
  • User Level
  • App Level
User level credentials are for entire Azure account which can be used to deploy to any web app for the subscription,

while App Level credentials are particular web app specific and can't be used with any other web app. App Level credentials are generate automatically at app creation. Users can’t control this manually.

Now question is, where can I check these credentials and answer is simple,
Go to “deployment center” blade and click on FTP.


Once you click on “dashboard” button, a new pop up window will appear with App and user level credentials.



You can see that App level credentials can only be reset but you don’t have control to define the username or password here.


You can control user level credentials. Here we have one catch; you can have only one FTP user level credential. You can’t have multiple FTP user level credentials.

Get more details on below URL,


It seems Azure doesn't support multiple FTP users for web app. You can get more details on below URL

You can also share your feedback on that and maybe they can consider this request in the future.

For more information about azure app service FTP troubleshooting please visit,

https://azureappservices.blogspot.com/2020/02/everything-about-azure-app-service-ftp.html


Other useful references,

Issue: Azure function is throwing one of the following exceptions
·       Unable to retrieve Functions Keys
·       We are not able to retrieve the keys for function
·       The function runtime is unable to start.
·       Function host is not running.
·       Internal Server error.
·       Service Unavailable.


Issue: Azure Functions: The Consumption pricing tier is not allowed in this resource group



Issue: Disable Azure functions




Azure App Service Blank page after Deployment


Site Under Construction error after Deployment




Issue:
  • After deployment when you try to access the function app/web app you get blank screen.
  • You can see only one message “Site Under Construction”.
  • You didn’t do anything for this and was not sure why this message was appearing.



Solution

I observed this message is set in <title> tag of html page which function app is responding when I call the URL.


Now to explain this issue in more details I would like to explain the concept of app_offline.htm file which is the part of your deployment process.
In an effort to make Kudu deployments avoid file locking issues, Kudu will now create a temporary app_offline.htm in the site's WWWROOT folder before starting the deployment. Kudu then takes care of deleting the file after deployment is complete.
The effect is that while deployment is happening, the app will be kept offline. In addition to avoiding file locking issues, this helps keep the site is a consistent state, by not serving any traffic while the contents of the site is only half-deployed.
Note: the file will only be created if an app_offline.htm file is not already present in the site's folder.
If you'd like to turn this behavior off, please add an SCM_CREATE_APP_OFFLINE App Setting to your app and set the value to 0. For more information about configurable settings, please check this page.

You can get more information on below URL,

To get the final confirmation of this I tried to access this file from app and got the same response.(please check the URL in below screen shot)



That mean App has app_offline.htm file available in WWWROOT folder which was showing when calling the function app.

Ideally this file should have been deleted when your deployment is successful but I observed some unsuccessful deployment and that files was not deleted.

To resolve this,
  • Delete the file and try again “or”
  • Redeploy your application and make sure it is successful.

Feel free to add/update anything if needed.

409 Conflict: Could not write to local resource 'D:\home\site\wwwroot\ due to error'Could not find file 'D:\home\site\wwwroot\

409 Conflict: Could not write to local resource 'D:\home\site\wwwroot\ due to error 'Could not find file 'D:\home\site\wwwroot\

Issue:

·       409 Conflict: Could not write to local resources:\home\site\wwwroot\' due to error 'Invalid access to memory location.

·       409 Conflict: Cannot delete directory. It is either not empty or access is not allowed.



Solution:

Reason for all these errors is, APP SETTING KEY

WEBSITE_RUN_FROM_PACKAGE = 1

This setting makes wwwroot as a read-only file system.

With Run From Package, this is strictly enforced as the wwwroot folder becomes read-only

Please check the article for more details: 

Removing the key will bring back everything to work as expected but then you would not be able to utilize the benefits of WEBSITE_RUN_FROM_PACKAGE

If even after removing this setting your files still appears in read-only mode then it can be the read-only attributes of file which is preventing you to edit file.
You can check the permission of any file using below command,
attrib FileName 
e.g. attrib index.html
More information on below URL,

If all these steps doesn't resolve your issue then you can check below URL to understand how to deal with locked file in Azure App Service,
https://github.com/projectkudu/kudu/wiki/Dealing-with-locked-files-during-deployment


Other useful references,



Issue: Azure Functions: The Consumption pricing tier is not allowed in this resource group


Issue: Azure function is throwing one of the following exception

·       Unable to retrieve Functions Keys

·       We are not able to retrieve the keys for function

·       The function runtime is unable to start.

·       Function host is not running.

·       Internal Server error.

·       Service Unavailable.


Issue: Disable Azure functions



Function App | Unable to add function in Function App | Blank screen

Function App | Unable to add function in Function App | Blank screen


Issue:
  • Sometimes you are not able to create a new function under your existing function app.
  • Earlier You were able to add new function but now you are not able to add.
  • You are able to see only a blank screen.


Analysis :
When You report these types of issue, Please collect the network trace immediately.

Please follow below steps to collect the network traces,
•    Hit F12 on your browser
•    Refresh browser (F5) - This will clear session caches
•    Reproduce the issue.
•    Export network trace as HAR file (Save all as HAR on Chrome/Edge/IE)




Once you have network trace then you can open it through Fiddler which will definitely give some information about some of the API failure.

In my case, I observed a lot of API failure for the /api/functions api



While investigating this API failure I observed lot of messages related to Network,


As the message says something about Network I quickly verified  the network setting but I was getting this issue in other networks also that means this issue is not pertaining to the network.


I then checked  Storage Account for this function.



I further checked and confirmed about unavailability of storage account.  

Somehow my storage account was deleted by someone which was causing that issue. I created a new function app and was able to add a new function successfully.

So whenever you face this issue please check the network trace and storage account availability.

Feel free to add/update anything if needed.