Tag Archives: Response.Redirect

HttpClient follow 302 redirects with .NET Core

The HttpClient in .NET Core will not automatically follow a 302 (or 301) redirect. You need to specify that you allow this. use the HttpClientHandler to do this: Now your code will follow up to 2 redirections. Please note that … Continue reading

Posted in .net, .NET Core, c#, General .NET | Tagged , , , , | Leave a comment

Response.Redirect throws an “Thread was being aborted”

Response.Redirect causes the browser to redirect to a different URL. It does so by sending a 302 – Object Moved to the browser, requesting it to do another roundtrip to the new page. Here is an example:  But here … Continue reading

Posted in .net, c# | Tagged , , , , | 5 Comments