A Redirect can only happen if the first line in an HTTP message is "HTTP/1.x 3xx Redirect Reason
".
If you already called Response.Write()
or set some headers, it'll be too late for a redirect. You can try calling Response.Headers.Clear()
before the Redirect to see if that helps.