Hi @Craig Stone
First of all, suppose there is a program named ServerA
as the api interface. When other programs need to call the interface in ServerA
, we usually set it in the code AddCors
, or set it in IIS (the way it is reflected in the program) It can be in the web.config
file of the project, in the azure webapp, it can be set in the portal).
Suppose there is a webapp named ClientA
that needs to call ServerA's interface
, then in ServerA's
portal, the easiest way is to add ClientA's domain
name in the figure below. Assuming that any other programs are also adding other domain names in ServerA
.
Please follow the methods below to troubleshoot the error you are currently experiencing:
- First of all, in the webapp you will be called, you don’t need to use the
AddCors
method in the code to control cross-domain issues. Fill in*
in theCORS
of the portal. Then perform your previous test, (please make sure you are called In the program, the above operation was carried out). *Explain the reason: Filling in * is to ensure that you have not made other wrong configurations, which may cause problems.* - If according to step 1, the program can be called normally without cross-domain error, then please fill in the called webapp (assuming it is server), and it will visit his webapps
(Client side) URL. - If the problem persists, it is recommended to create a new resource group, create a new webapp, redeploy and test.
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best Regards,
Jason