I am using a SMS web service, which sends me the replies to SMS via HTTP Post (i cant change this)
I catch the replies like this:
string from = Request.QueryString["from"];
string message = Request.QueryString["message"];
string reference = Request.QueryString["ref"];
Database.DBLayer db = new Database.DBLayer(App_Code.ConfigClass.ConnectionString);
db.InsertReply(Convert.ToInt32(reference), from, message);
But it seems to intermittently send me duplicates.. Is there a way of checking if the HTTP Request is a duplicate and if it is not actioning it?
You could hash the useful information in the response (e.g. the “from”, “message”, and “ref” concatenated together).
Use that as a unique constraint in your database.