I recently encountered a bug in my workplace where Server.Transferring to the page that's already active triggers a StackOverflow if the preserveForm param is True.
Example button that would trigger an overflow:
Private Sub bugTest_Click(sender As Object, e As EventArgs) Handles bugTest.Click
Server.Transfer("current aspx page", True)
End Sub
I know that the problem can be avoided by setting preserveForm to false or using Response.Redirect instead, but I was hoping to get a better understanding of why the bug happens in the first place.
I do have some theories about what might cause it but I don't feel confident enough in any of them to actually explain the cause to my coworkers, and my boss would really like to understand why the bug happens.