Question 36 of 179 from exam AZ-204: Developing Solutions for Microsoft Azure

Question 36 of 179 from exam AZ-204: Developing Solutions for Microsoft Azure

Question

HOTSPOT - You are developing an ASP.NET Core web application.

You plan to deploy the application to Azure Web App for Containers.

The application needs to store runtime diagnostic data that must be persisted across application restarts.

You have the following code:

public void SaveDiagData(string data)

{
var path = Environment .GetEnvironmentVariable (“DIAGDATA”) 7
File.WriteAllText (Path.Combine (path, “data”), data);

You need to configure the application settings so that diagnostic data is stored as required.

How should you configure the web app's settings? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.

Hot Area:

Answer Area

App setting Value

W true
LOCALAPPDATA
WEBSITE_LOCALCACHE_ENABLED
DOTNET_HOSTING_OPTIMIZATION_CACHE /nome
WEBSITES_ENABLE_APP_SERVICE_STORAGE] | /local

D:\nome

DIAGDATA D:\local

Explanations

Answer Area

App setting Value

W true
LOCALAPPDATA
WEBSITE_LOCALCACHE_ENABLED
DOTNET_HOSTING_OPTIMIZATION_CACHE shome
WEBSITES_ENABLE_APP_SERVICE_STORAGE focal

\nome

DIAGDATA D:\local

Box 1: If WEBSITES_ENABLE_APP_SERVICE_STORAGE If WEBSITES_ENABLE_APP_SERVICE_STORAGE setting is unspecified or set to true, the /home/ directory will be shared across scale instances, and files written will persist across restarts Box 2: /home - Reference: https://docs.microsoft.com/en-us/azure/app-service/containers/app-service-linux-faq.