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.

© 2024 - ErnesTech - Privacy
E-Commerce Return Policy