URL を受け取り、リダイレクト先の最初の場所を吐き出すかなり単純なプログラムがあります。とにかく、私はいくつかのリンクでそれをテストしており、いくつかの URL で 400 エラーが発生することに気付きました。そのような URL をブラウザに貼り付けてテストしてみましたが、うまくいきました。
static string getLoc(string curLoc, out string StatusDescription, int timeoutmillseconds)
{
HttpWebRequest x = (HttpWebRequest)WebRequest.Create(curLoc);
x.UserAgent = "Opera/9.52 (Windows NT 6.0; U; en)";
x.Timeout = timeoutmillseconds;
x.AllowAutoRedirect = false;
HttpWebResponse y = null;
try
{
y = (HttpWebResponse)x.GetResponse(); //At this point it throws a 400 bad request exception.