James213
✅ Frontend unable to connect to webapi when starting server manually (dotnet run)
When I run my C# Webapi project through Visual Studio Code debugger (or VS) then my reactapp can make a GET request to the webapi, however if I start up the webapi via cmd
dotnet run
and make a GET request I get net::ERR_CONNECTION_REFUSED
This is the output from VS Code when I start the webapi through the debugger.
This is the output from cmd when I start the webapi through the cmd.
33 replies
❔ Unable to make a GET request
I get a 403 - "Forbidden" from this code. I have successfully tested (200) with Postman and a Python version.
Here is the doc fyi https://docs.github.com/en/rest/gists/gists?apiVersion=2022-11-28#list-gists-for-the-authenticated-user
7 replies
❔ Repository not found - Git
When I go to push, I get the error
Yet when I click the click it goes to the repository. As with the links with
git remote -v
git config --local --list
shows the same email that is associated with the repository, and I am pushing with that GitHub account on Visual Studio Code.
Although when I do git log --pretty=full
I get a different email for the (HEAD -> master), though for (origin/master) it's the correct email
Also, when I change the repository to public on GitHub and then try to push it says "You don't have permissions to push to "James7851/fem-manage-landing-page" on GitHub. Would you like to create a fork and push to it instead?"9 replies
❔ How to pass JS object to function.
How do I pass the JS object to the C# function in that it accepts it as an object of a defined Class?
I looked at an example using Ajax (don't know if that has to do with anything).
https://www.dotnettricks.com/learn/webapi/how-to-pass-javascript-complex-object-to-aspnet-web-api-and-mvc
I'm getting null values.
I tried removing JSON.stringify, but no luck.
Thank you
12 replies