Skip to content
This repository was archived by the owner on Apr 24, 2020. It is now read-only.
This repository was archived by the owner on Apr 24, 2020. It is now read-only.

getting no access control error #4

@bigerock

Description

@bigerock

i'm getting a 'no access control allow origin' error (see below) when i've updated this project to use iis instead of iis express using local host headers. meaning, i've switched from using https://localhost:[port] to something like http://myapi.test for my web api and http://myapp.test for my app in iis. i've added the 'EnableCors' attribute on my web api controller, and properly called out http://myapp.test within the attributes - as the example has shown.

does this perhaps need a fully qualified domain in order to run properly?

Error:
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://myapp.test' is therefore not allowed access. The response had HTTP status code 405.

on my controller:
[EnableCors("http://myapp.test", "", "")]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions