I am working with the new Project Type (part of Visual Studio 2022) Angular with ASP.NET Core backend.
With the app deployed in production, the API call is being redirected to the root page and the index file is being returned.
Example: when I call https://website.com/_api/controller
it would redirect to https://website.com
and I would just get the html of the index file.
When running the app in the debugger, everything is working fine only when deployed in production in Azure.
Any idea how to handle this?
CodePudding user response:
The Issue was a Firewall restriction between the Website in Prod and the DB. The Controller Function was actually throwing an exception and this was redirecting the api call automatically to the root url.