C#C
C#3y 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
A tool for sharing your source code with the world!
Was this page helpful?