Inserire questo codice in global.asax:
Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs) Dim path As String = HttpContext.Current.Request.Url.PathAndQuery Dim pagequery As String = path.Substring(path.LastIndexOf("/") + 1) Dim pagequery_Elements As String() = pagequery.Split("?") Dim ReturnUrl As String = pagequery_Elements(pagequery_Elements.Length - 1) If ReturnUrl.Contains("ReturnUrl") Then Response.Redirect("~/Login.aspx", True) End Sub