A Software Developer Worst Nightmare (Double Posting Back to the Server)

How to Prevent a Software Developer Worst Nightmare, Double Posting Back to the Server.

If you have worked with an MVC Asp.Net Application you might be well aware that a Customer or a User might click on the button twice hence sending two requests to the Server. If the function handling the request does not know how to handle Double Posting to the server this might cause a headache to debug.

It is critical to test for double clicks especially if you are working with Business Critical Applications. One way to solve this issue is by Memoization:

1. Create a Cache Entry to make sure if the function has been called already for the specific request, if yes, then return false letting the caller know that this function or Mission Critical Function has been called already for this specific Session ID.

- This will prevent double Request Handling and might reduce Bug Fixes.


Let me know if you are interested in hearing more about this issue in the comments below.


Edit this Article
Double Posting Back to the Server ebook AspNet6 AspNet Core MVC .NET 6 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.

Your Session is Ending
Login to Continue

© 2021 - ErnesTech - Privacy