exam questions

Exam AZ-203 All Questions

View all questions & answers for the AZ-203 exam

Exam AZ-203 topic 10 question 1 discussion

Actual exam question from Microsoft's AZ-203
Question #: 1
Topic #: 10
[All AZ-203 Questions]

HOTSPOT -
You need to resolve the Shipping web site error.
How should you configre the Azure Table Storage service? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

Show Suggested Answer Hide Answer
Suggested Answer:
Box 1: AllowedOrigins -
A CORS request will fail if Access-Control-Allow-Origin is missing.
Scenario:
The following error message displays while you are testing the website:

Box 2: http://test-shippingapi.wideworldimporters.com
Syntax: Access-Control-Allow-Origin: *
Access-Control-Allow-Origin: <origin>
Access-Control-Allow-Origin: null
<origin> Specifies an origin. Only a single origin can be specified.

Box 3: AllowedOrigins -

Box 4: POST -
The only allowed methods are GET, HEAD, and POST. In this case POST is used.
"<Corsrule>" "allowedmethods" Failed to load no "Access-control-Origin" header is present
References:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin

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
Regimiento
Highly Voted 5 years, 5 months ago
Second box should be http://test.wideworldimporters.com, as that is the origin from the error message.
upvoted 36 times
Zhang
5 years, 5 months ago
Yes, agreed, second box should be http://test.wideworldimporters.com. the last box either POST or GET. GET is also acceptable.
upvoted 6 times
balddie
5 years, 4 months ago
I disagree, the error is happening in the API calling the function app.
upvoted 6 times
PHARKGAOYOU
4 years, 11 months ago
go study well and come back, don't make confusion over here. The answer is indeed 2nd Box
upvoted 12 times
Chilred
4 years, 5 months ago
Even if you are right, you could add the prove ;)
upvoted 2 times
...
...
RT007
4 years, 11 months ago
second box is the correct answer
upvoted 1 times
...
...
...
chintan4190
5 years, 2 months ago
origin from the error message is without dot. it is "http://testwideworldimporters.com" where as in option it is http://test(dot)wideworldimporters.com.
upvoted 4 times
oxaytol
4 years, 11 months ago
In this case i think it is a typo error. The origin is http://testwideworldimporters.com, none of the choices matches this origin but if we assume the typo error, then http://test.wideworldimporters.com should be the answer
upvoted 6 times
...
...
Juanlu
4 years, 6 months ago
Agree. BOX 1 & BOX3 for "Allowed Origin" value. Agree. BOX 2 should be this url (http://test.wideworldimporters.com) , assuming typo error exists in "dot"(...test(dot)wide...) as @oxaytol said. Agree also por BOX 4. GET and POST, are correct, so this is a correct answer.
upvoted 1 times
...
hikari_se
4 years, 9 months ago
Agree, this problem comes when the origins test.wideworldimporters.com is not allowed for accessing container API. The XML configuration here is for the API, so we have to accept the origin comes from test.wideworldimporters.com
upvoted 3 times
...
...
AK89
Highly Voted 5 years ago
2nd Box answer is correct as the request is generating from the website Url as given in the usecase. Although 4th box should be GET as the app is meant to display data as per the usecase
upvoted 7 times
...
Ave
Most Recent 4 years, 7 months ago
both Get and Post are accepted https://docs.microsoft.com/en-us/azure/api-management/api-management-cross-domain-policies
upvoted 2 times
Cornholioz
4 years, 5 months ago
The link you pasted also mentions two origins: localhost and example.com. Does this mean 3rd option in Box2 could be right? Since the 2nd option has a typo. Maybe it's not a typo but simply a wrong answer?
upvoted 1 times
...
...
rrongcheng
4 years, 10 months ago
I think the Bos 4 is: Get, Head, As it hasn't mentioned which CDN it uses, GET, HEAD is the best answer for Azure CDN from Microsoft. https://docs.microsoft.com/en-us/azure/cdn/cdn-how-caching-works
upvoted 3 times
rrongcheng
4 years, 10 months ago
It should be Get, as it's dynamic content so it will use Azure CDN from Akamai
upvoted 1 times
...
...
chaudh
4 years, 11 months ago
Box1 & Box3: AllowedOrigins Box2: http://*.wideworldiporters.com The question asks to resolve the Shipping web site error, not the testing. Use wildcard instead. https://docs.microsoft.com/en-us/rest/api/storageservices/cross-origin-resource-sharing--cors--support-for-the-azure-storage-services Box4: GET, PUT
upvoted 4 times
xofowi5140
4 years, 10 months ago
For me that is not correct. I think only regex works or <AllowedOrigins> * <AllowedOrigins>
upvoted 1 times
...
chaudh
4 years, 11 months ago
https://docs.microsoft.com/en-us/rest/api/storageservices/set-table-service-properties AllowedMethods Required if CorsRule element exists. A comma-separated list of HTTP methods that are allowed to be executed by the origin. For Azure Storage, permitted methods are DELETE, GET, HEAD, MERGE, POST, OPTIONS or PUT.
upvoted 3 times
...
...
mrpaul9
4 years, 11 months ago
The answer provided is correct. Allowed Origin API Allowed Origin POST, GET If you have any doubt. The question is from Azure Storage Service perspective which is consumed by API. Please read the below https://docs.microsoft.com/en-us/rest/api/storageservices/cross-origin-resource-sharing--cors--support-for-the-azure-storage-services
upvoted 1 times
xofowi5140
4 years, 10 months ago
POST, GET is not an option
upvoted 4 times
...
...
nikos2001
4 years, 11 months ago
Website http://testwideworldimporters.com is calling the API. Web browser blocs the call, because this API is in a different domain. This API must me configured to accept calls from the source http://testwideworldimporters.com. https://docs.microsoft.com/en-us/rest/api/storageservices/cross-origin-resource-sharing--cors--support-for-the-azure-storage-services
upvoted 5 times
...
RT007
4 years, 11 months ago
why AllowedMethod is Post it can also be Get. No where mentioned its using Post method
upvoted 6 times
Gall
4 years, 3 months ago
I would say it's POST as CosmosDB search query will be nested within BODY https://docs.microsoft.com/en-us/rest/api/cosmos-db/querying-cosmosdb-resources-using-the-rest-api
upvoted 2 times
altafpatel1984
3 years, 6 months ago
But here MongoDb is used, not Cosmos DB.
upvoted 1 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 ...