Asp.Net Core 3.1 Not Returning NoContent() or BadRequest() in the Controller

      When developing in Asp.Net Core 3.1 you might want to code your algorithms to return the result in a fashionable manner. Returning a small amount of data from the Controller's Actions can not only enhance application performance but will also enhance user experience and strengthen security. A good developer knows that when working with user's data, code should implement the strongest security to protect data in transit, security includes using HST which is enforced Strict Transport Security. 

       Of course, when Developers implement Security on different layers, performance sufferers, this is where returning minimal data to the Client comes in play. In ASP.Net Core 3.1, a Developer can return HttpStatusCodes to the Client indicating that the post was successful or not. The Controller's Action can also return ActionResults that enables Status Codes responses, what's good with marking the Actions or Functions to return ActionResult is that, a developer can even pass in the Model Data to be consumed at the Client-Side.

Edit this Article Core 3.1 mvc core errors web forms core tutorial Technology published
Was this page helpful?
Yes Yes! this solution to the problem was helpful. No No! this solution to the problem was not helpful.. Leave ErnesTech Feedback.Feedback
If you log in, you will be notified when someone leaves a comment.

Other users would like to know if this solution helped you.

ee said:




Jack said:

Thank you

Your Session is Ending
Login to Continue

© 2021 - ErnesTech - Privacy