S-IERRA
ASP.Net IActionResult always returns Ok
I have the following method inside of a service, I call this method from a controller
Where its suppsoe to return 404 not found it enters the return statement and jumps to the last line of the method (Return Ok)
This seems to happen on all methods, possibly there is a better way of returning values from services?
This is how I call this method
82 replies
❔ Sockets, SendTo is erroring
A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied.
With my setup, the socket is connected in a different class but I am trying to send a message to that socket via its endpoint where I get an error, is that possible or do I have to use the socket class its self?
37 replies
❔ Entityframework model
I have the following models in EFC, I need the server member to share the id of user Id as I do not want to make a new Id for it entierly (if thats even possible) tho i'm getting errors saying the code needs a primary key when I do define a key
26 replies
❔ EntityFramework Code cleanup
I have lots of controllers like this, is there anyway I could clean this up?
for one I don't want to be calling the firstordefaultasync each time I have an ID parameter possibly there is somew ay to implicitly convert it while carrying context for performance sake?
Also I was thinking of moving the logic to the Logic layer But I'm not sure how I'd do validation there and return it, for example. if a user has missing permissions
25 replies
❔ Cors Policy Error
When ever my front-end tries to communicate with my back-end I receive this error, any ideas why?
https://cdn.discordapp.com/attachments/1136302991666843680/1146527808072454144/image.png
72 replies
❔ Problem setting up ASP.NET on Linux
Hi, I'm trying to setup ASP on linux but I'm getting erros like this
https://cdn.discordapp.com/attachments/679791684548296735/1146446137662914590/image.png
35 replies
❔ ASP.NET always validates invalid JWT
I have a custom configuration for Asp.net where the JWT Token is stored in an http-only cookie, because of this there is 1 method in specific that is always returning 200 no matter if there is no actual JWT attached
76 replies
❔ JWT Storage location
Hi I'd like to ask where JWTs should be stored, my backend returns a JWT through the API and also sets an http-only cookie, but I'm not sure what to do with this from the front end as ASP requires an Authorization header and http only cookies can't be accessed from the front-end any ideas?
This is for most part what I do
25 replies
❔ SmptClient invalid response to the EHLO command.
I have 2 versions of this project one is one console which works perfectly well the other one is on Asp.net which is always receiving
"The server returned an invalid response to the EHLO command."
The code is pretty much identical across the both of them I assume it could be asp blocking the request?
Asp.net src (not working)
Console app Src (working)
3 replies