exam questions

Exam AZ-304 All Questions

View all questions & answers for the AZ-304 exam

Exam AZ-304 topic 5 question 6 discussion

Actual exam question from Microsoft's AZ-304
Question #: 6
Topic #: 5
[All AZ-304 Questions]

You have a .NET web service named Service1 that has the following requirements:
✑ Must read and write temporary files to the local file system.
✑ Must write to the Application event log.
You need to recommend a solution to host Service1 in Azure. The solution must meet the following requirements:
✑ Minimize maintenance overhead.
✑ Minimize costs.
What should you include in the recommendation?

  • A. an App Service Environment
  • B. an Azure web app
  • C. an Azure virtual machine scale set
  • D. an Azure function
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Elecktrus
Highly Voted 4 years, 5 months ago
Answer is B - Azure Web App, because: - Azure Web App can write Application log - https://docs.microsoft.com/es-es/azure/app-service/troubleshoot-diagnostic-logs - Azure web App can read/write files to local file system - https://github.com/projectkudu/kudu/wiki/Understanding-the-Azure-App-Service-file-system - Azure web app is less expansive that a VM scale set (VM scale is thinked for a long number of VM)
upvoted 122 times
sejalo
4 years, 3 months ago
Where is it mentioned that web app can read/write files to local file system in https://github.com/projectkudu/kudu/wiki/Understanding-the-Azure-App-Service-file-system
upvoted 2 times
BoxGhost
3 years, 9 months ago
Here you go. I think the key word in the requirement is 'temporary' therefore it fits the bill. https://docs.microsoft.com/en-us/azure/app-service/overview-local-cache#how-the-local-cache-changes-the-behavior-of-app-service The local cache is read-write. However, any modification is discarded when the app moves virtual machines or gets restarted. Do not use the local cache for apps that store mission-critical data in the content store. D:\home\LogFiles and D:\home\Data contain log files and app data. The two subfolders are stored locally on the VM instance, and are copied to the shared content store periodically. Apps can persist log files and data by writing them to these folders. However, the copy to the shared content store is best-effort, so it is possible for log files and data to be lost due to a sudden crash of a VM instance.
upvoted 1 times
...
...
aperally
4 years, 3 months ago
Application EVENT LOG != Application Logs
upvoted 13 times
addam23
3 years, 9 months ago
Yup, but you still can view it: https://docs.microsoft.com/en-us/learn/modules/azure-diagnose-application-startup-errors-with-kudu-console/5-exercise-diagnose-application-event-log-using-kudu-console
upvoted 1 times
...
...
Rume
4 years, 1 month ago
As per "https://github.com/projectkudu/kudu/wiki/Understanding-the-Azure-App-Service-file-system" The Web App is able to access many standard Windows locations like %ProgramFiles% and %windir%. These files can never be modified by the Web App. Which implies - Azure app will not be able to "write" to local file system.
upvoted 2 times
El_Hechizo
3 years, 9 months ago
You can create and append data into the files located or created in the home directory. I tested it on my own subscription. I created an application that in response to a click on a button creates a file (C:\home\site\wwwroot\newfile.txt)
upvoted 1 times
rdemontis
3 years, 6 months ago
yes but you can't write on windows application event log (we are speaking about accessing the folder WINDOWS\system32\config\folder as you can do with Event Viewer). So you need to host the app on a VM. So, provided answer is correct
upvoted 1 times
JayBee65
2 years, 11 months ago
That is not correct - this article explains how you both write to event log and view the entries
upvoted 1 times
...
...
...
...
gssd4scoder
3 years, 10 months ago
Agree: https://social.msdn.microsoft.com/Forums/vstudio/en-US/294b9e3e-e89c-4095-b8d0-ee1646e77268/writing-to-local-file-system-from-web-app-in-azure?forum=windowsazurewebsitespreview
upvoted 1 times
...
...
andyR
Highly Voted 4 years, 6 months ago
I think the requirement to write to the Application event log ties the solution to a VM
upvoted 15 times
yyuryyucicuryyforme
3 years, 4 months ago
The answer must be C) (VM, scale set in this case) and not B) (web app) because "Areas of diagnostics logging and tracing that aren't available to apps are Windows ETW events and common Windows event logs (for example, System, Application, and Security event logs)." https://docs.microsoft.com/en-us/azure/app-service/operating-system-functionality#diagnostics-logs-and-events
upvoted 2 times
...
...
creator
Most Recent 3 years ago
Selected Answer: C
Becaus of Application "event" log not Application log.
upvoted 1 times
...
icedog
3 years, 2 months ago
Selected Answer: B
B - Azure Web App
upvoted 2 times
...
jeetnix2121
3 years, 3 months ago
Its B. Read this Troubleshoot on Azure App Service Important ASP.NET Core preview releases with Azure App Service ASP.NET Core preview releases aren't deployed to Azure App Service by default. To host an app that uses an ASP.NET Core preview release, see Deploy ASP.NET Core preview release to Azure App Service. Application Event Log (Azure App Service) To access the Application Event Log, use the Diagnose and solve problems blade in the Azure portal: In the Azure portal, open the app in App Services. Select Diagnose and solve problems. Select the Diagnostic Tools heading. Under Support Tools, select the Application Events button. Examine the latest error provided by the IIS AspNetCoreModule or IIS AspNetCoreModule V2 entry in the Source column.
upvoted 3 times
...
xyz213
3 years, 4 months ago
https://docs.microsoft.com/en-us/azure/active-directory-domain-services/overview Azure Active Directory Domain Services (Azure AD DS) provides managed domain services such as domain join, group policy, lightweight directory access protocol (LDAP), and Kerberos/NTLM authentication Answer is C
upvoted 1 times
...
[Removed]
3 years, 4 months ago
Selected Answer: B
B is more prominent answer than C. Web app service is sufficient for running simple app
upvoted 1 times
...
student22
3 years, 7 months ago
C ---
upvoted 1 times
...
Spooky7
3 years, 7 months ago
For me term "application event log" is not clear. It could be just a standard application logs. How I suppose to know what Microsoft is reffering to? It wasn't explicite said "windows application event logs"
upvoted 1 times
...
syu31svc
3 years, 7 months ago
https://docs.microsoft.com/en-us/azure/app-service/troubleshoot-diagnostic-logs Logs messages generated by your application code. The messages can be generated by the web framework you choose, or from your application code directly using the standard logging pattern of your language Answer is B
upvoted 3 times
...
souvik123
3 years, 8 months ago
Answer is B - Azure Web App
upvoted 4 times
...
booboo2k
3 years, 8 months ago
Should be only C: ----" Since ETW trace information can potentially be viewable machine-wide (with the right ACLs), read and write access to ETW events are blocked. Developers might notice that API calls to read and write ETW events and common Windows event logs appear to work, but that is because App Service is "faking" the calls so that they appear to succeed. In reality, the application code has no access to this event data. " https://docs.microsoft.com/en-in/azure/app-service/operating-system-functionality#diagnostics-logs-and-events
upvoted 3 times
...
Pinto
3 years, 9 months ago
Based on https://docs.microsoft.com/en-us/azure/app-service/operating-system-functionality and https://docs.microsoft.com/en-us/azure/app-service/troubleshoot-diagnostic-logs I think right answer is A. an App Service Environment The VM scale set does not reduce cost. The question may be missing some point or has bad english
upvoted 1 times
...
sukhdeep
3 years, 10 months ago
Correct answer is B. Please follow this :- https://cloudtech.how/microsoft/exam-az-304-microsoft-azure-architect-design/az-304-question-108/
upvoted 1 times
...
Kunal13
3 years, 11 months ago
This would be A. App Service Environment My references are as follows... Lift & Shit of WebApp: https://docs.microsoft.com/en-in/azure/architecture/guide/technology-choices/compute-decision-tree Writing to Event Logs: https://docs.microsoft.com/en-in/azure/app-service/operating-system-functionality
upvoted 3 times
...
Jaydeeps03
3 years, 11 months ago
examtopics : Pls confirm answer ..
upvoted 2 times
...
azurellc
4 years ago
http://blog.mohlsen.com/viewing-application-event-logs-on-azure/ is B
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...