C
C#13mo ago
Salubris

Using Web API with Next.js

Version: .NET 7 I have a Web API with basic CRUD operations connected to a MSSQL database. It works in both Postman and the SwaggerUI, but I can't get it to work with my frontend in Next.js. I've tried implementing CORS in program.cs, which doesn't work. Any suggestions to what could be wrong? Might be that I didn't implement CORS correctly. Could also be a problem with my frontend and not backend. https://paste.mod.gg/osuotjtlkxmw/3
BlazeBin - osuotjtlkxmw
A tool for sharing your source code with the world!
4 Replies
SinFluxx
SinFluxx13mo ago
$details
MODiX
MODiX13mo ago
When you ask a question, make sure you include as much detail as possible. Such as code, the issue you are facing, and what you expect the result to be. Upload code here https://paste.mod.gg/ (see $code for more information on how to paste your code)
Batuhan
Batuhan13mo ago
can you try to add these to your policy
No description
Salubris
SalubrisOP13mo ago
That didn't work for me. I still get this error from the browser
No description
Want results from more Discord servers?
Add your server