Not able to create VM getting CORS blocked error

Utkarsh Marathe 0 Reputation points
2025-01-15T07:14:35.81+00:00

I tried to create VM from learning sandbox. I am getting CORS blocked error for one of the calls hence VM creation is broken.

GET: https://catalogartifact.azureedge.net/publicartifacts/Microsoft.VirtualMachine-ARM-1.1.0/UIDefinition.json

Error:

Access to XMLHttpRequest at 'https://catalogartifact.azureedge.net/publicartifacts/Microsoft.VirtualMachine-ARM-1.1.0/UIDefinition.json' from origin 'https://portal.azure.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.

This question is related to the following Learning Module

Azure Training
Azure Training
Azure: A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.Training: Instruction to develop new skills.
1,947 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Manu Philip 18,706 Reputation points MVP
    2025-01-15T07:53:09.2633333+00:00

    Hi Utkarsh Marathe,

    You may try disabling CORS in chrome browser and try again

    1. Open Start window
    2. Search Run and open it or press Window+ R
    3. Paste chrome.exe --user-data-dir="C://Chrome dev session" --disable-web-security and execute it

    This will open a new browser with web security disabled. You can now access your project in this browser without worrying about the CORS errors.

    chrome.exe --user-data-dir="C://Chrome dev session" --disable-web-security
    

    Hope this helps.


    --please don't forget to upvote and Accept as answer if the reply is helpful--

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.