Base solution for your next web application
Open Closed

Cross-Origin Request Blocked for AbpUserConfiguration, #3816


User avatar
0
shanefryer4184 created

My code is running fine on local. Even the swagger apis are running fine. I have hosted the code on azure, there somehow it is not working. I am getting the following error. I am not able to understand what is causing it, as it is the first time I have got this error in 3 months. I have also added the IP in firewall of azure sql server.

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at <a class="postlink" href="http://intelesightapi.azurewebsites.net/AbpUserConfiguration/GetAll">http://intelesightapi.azurewebsites.net ... ion/GetAll</a>. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

Please help.


4 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @ShaneFryer4184,

    Have you changed configurations of your deployed Web.Host and angular projects ? If so, can you share your configurations ? If it contais private information, you can send it via email.

    Thanks.

  • User Avatar
    0
    shanefryer4184 created

    I have just updated Microsoft.composition from 1.0.27 to 1.0.31 and updated castle.core dll to 4.1.1

    Even the cors origins, client & server root address are mentioned properly.

    Should I send web.host.csproj & appsettings.json ? Or do you want any other files too.

    Can you list down the files ?

    What mail id should I send to?

  • User Avatar
    0
    polrken created

    If you are running on Azure Websites, there is an CORS setting under API when you configure your site. This worked for me.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Thanks @polrken, this might help.

    @ShaneFryer4184, the two files are appsettings.json from host project and appconfig.json from angular client (under src/assets). You can send those files to <a href="mailto:[email protected]">[email protected]</a>.

    Thanks.