Base solution for your next web application
Open Closed

Not able to use multiple CORS policy #9676


User avatar
0
SRTMDEV created

Product Version: 8.6.0 Product Type: anuglar Prodcut Framework: .net core

What I am trying to achieve? I should be able to apply any origin CORS policy to some AppServiceController.

I create another CORS policy and trying to apply it to AppServiceController in** CompanyName.Application** project with Attribute [EnableCors("AllowAll")] however its not working. When i try same Attribute on HomeController on CompanyNameWeb.Host project it working.

What could be issue with AppServiceController? How can i achive my goal?

Below are the CORS policy

Below way i temporary achieve my goal,

Thanks.


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

    Hi @SRTMDEV

    Did you add EnableCors attribute to interface or implementation of the app service ? Could oyu try adding it to implementation ? If it doesn't work, can you share your app service interface and implementation ?

    Thanks,

  • User Avatar
    0
    SRTMDEV created

    Hi, i already try with applying to AppService Implementation, however it still not working

    Thanks

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @SRTMDEV

    We will check it again and inform you.

  • User Avatar
    0
    SRTMDEV created

    Hi, any update on this context?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Sorry, it seems like this issue is skipped. I have created an issue on GitHub, please follow https://github.com/aspnetzero/aspnet-zero-core/issues/3598

  • User Avatar
    0
    SRTMDEV created

    Hi, any update on this context?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Sorry, I thought you get an update from GitHub issue. Here is my answer;