I am currently facing an issue with threadabortexception in .NET, and despite trying various options, I have not been able to resolve it.
In essence, the Redirect function is throwing errors and landing in the catch block, regardless of whether the second parameter is set to true or false.
The code snippet provided below is just an illustration (although I have encountered this issue a few times in actual projects).
...
try {
var TSD = TriggeredSend.Init("DE_Name");
var Status = TSD.Send(data.subscriber, data.attributes);
if (Status != "OK") {
Platform.Response.Redirect(Variable.GetValue("@error_page"));
} else {
Platform.Response.Redirect(Variable.GetValue("@thanks_page")); //<<<-- This redirect throw error
}
} catch (err) {
Platform.Response.Redirect(Variable.GetValue("@error_page")); // <---- here it comes
}
...
For more information, you can refer to the following resources: 1# https://support.microsoft.com/en-us/help/312629/prb-threadabortexception-occurs-if-you-use-response-end-response-redir
2#
Any suggestions for a workaround would be greatly appreciated.