Describe the issue
Cloned and built the projects. Tested locally, everything works as expected.
Uploaded the Backend to a development server running Windows Server 2022 with IIS 10 .
Modified the Backend Url in appsettings.json
Run Frontend from my dev workstation (https://localhost:7171)
I am able to register a user, when I try to register a second time, it tell me the username is already taken. This indicates it is working as should.
When I try to login, I get a CORS error:
Access to fetch at 'https://mydevserverurl.com/manage/info' from origin 'https://localhost:7171' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
I also get this error when the login page is accessed.
The only changes to the code that was made was on each appsettings.json files to change the BackEnd server url to https://mydevserverurl.com
Any help would be appreciated.
I am thinking that it has something to do with my running the front end on localhost and accessing the API from there.
If this is the case, how would one develop the front end and have the API deployed?
Issue Details
⚠ Do not edit this section. It is required for issue processing.
Describe the issue
Cloned and built the projects. Tested locally, everything works as expected.
Uploaded the Backend to a development server running Windows Server 2022 with IIS 10 .
Modified the Backend Url in appsettings.json
Run Frontend from my dev workstation (https://localhost:7171)
I am able to register a user, when I try to register a second time, it tell me the username is already taken. This indicates it is working as should.
When I try to login, I get a CORS error:
Access to fetch at 'https://mydevserverurl.com/manage/info' from origin 'https://localhost:7171' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
I also get this error when the login page is accessed.
The only changes to the code that was made was on each appsettings.json files to change the BackEnd server url to https://mydevserverurl.com
Any help would be appreciated.
I am thinking that it has something to do with my running the front end on localhost and accessing the API from there.
If this is the case, how would one develop the front end and have the API deployed?
Issue Details
⚠ Do not edit this section. It is required for issue processing.