{"action":"opened","issue":{"url":"https://api.github.com/repos/dotnet/cli/issues/4372","repository_url":"https://api.github.com/repos/dotnet/cli","labels_url":"https://api.github.com/repos/dotnet/cli/issues/4372/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/cli/issues/4372/comments","events_url":"https://api.github.com/repos/dotnet/cli/issues/4372/events","html_url":"https://github.com/dotnet/cli/issues/4372","id":182206869,"number":4372,"title":"System.Net.WebException: The remote server returned an error: (302) Found.","user":{"login":"EncoderPtd","id":12765050,"avatar_url":"https://avatars.githubusercontent.com/u/12765050?v=3","gravatar_id":"","url":"https://api.github.com/users/EncoderPtd","html_url":"https://github.com/EncoderPtd","followers_url":"https://api.github.com/users/EncoderPtd/followers","following_url":"https://api.github.com/users/EncoderPtd/following{/other_user}","gists_url":"https://api.github.com/users/EncoderPtd/gists{/gist_id}","starred_url":"https://api.github.com/users/EncoderPtd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EncoderPtd/subscriptions","organizations_url":"https://api.github.com/users/EncoderPtd/orgs","repos_url":"https://api.github.com/users/EncoderPtd/repos","events_url":"https://api.github.com/users/EncoderPtd/events{/privacy}","received_events_url":"https://api.github.com/users/EncoderPtd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-11T08:42:03Z","updated_at":"2016-10-11T08:42:03Z","closed_at":null,"body":"## Steps to reproduce\r\n  I was using `HttpWebRequest` to access a website. The server returned a redirection, then the `HttpWebResponse` threw an exception said:\r\n\r\n> System.AggregateException: One or more errors occurred. (The remote server returned an error: (302) Found.) ---> System.Net.WebException: The remote server returned an error: (302) Found.\r\n   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)\r\n   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)\r\n   --- End of inner exception stack trace ---\r\n   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)\r\n   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)\r\n   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout)\r\n   at NSHttpCommon.HttpAccess.GetResponse(Uri url, Boolean autoRedir, Stream stm, Dictionary`2 headers) in D:\\WS_Pretend\\CoreProjects\\CommonUtilities\\src\\HttpCommon\\__Source\\Http\\HttpAcc\\HttpAccess.cs:line 169\r\n---> (Inner Exception #0) System.Net.WebException: The remote server returned an error: (302) Found.\r\n   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)\r\n   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)<---\r\n\r\nIt's all ok when using .netframework. And also i tried manually using `Socket` or `TcpClient`. \r\nThis is what server returned:\r\n\r\n> HTTP/1.1 302 Found\r\nServer: nginx/1.9.10\r\nDate: Tue, 11 Oct 2016 06:50:39 GMT\r\nContent-Type: text/html\r\nTransfer-Encoding: chunked\r\nConnection: keep-alive\r\nLocation: http://xxx\r\nP3P: CP=\"CAO PSA OUR\"\r\nSet-Cookie: xxx; EXPIRES=Fri, 02-Jan-2020 00:00:00 GMT; PATH=/; DOMAIN=yyy;\r\nSet-Cookie: xxx; PATH=/; DOMAIN=yyy;\r\nSet-Cookie: xxx; PATH=/; DOMAIN=yyy;\r\nSet-Cookie: xxx; PATH=/; DOMAIN=yyy;\r\nSet-Cookie: xxx; PATH=/; DOMAIN=yyy;\r\n\r\n## Expected  behavior\r\nAnalyze correctly.\r\n\r\n## Actual behavior\r\nThrew exception.\r\n\r\n## Environment data\r\n`dotnet --info` output:\r\n\r\n```\r\n.NET Command Line Tools (1.0.0-preview3-003713)\r\n\r\nProduct Information:\r\n Version:            1.0.0-preview3-003713\r\n Commit SHA-1 hash:  98231a6628\r\n\r\nRuntime Environment:\r\n OS Name:     Windows\r\n OS Version:  10.0.14393\r\n OS Platform: Windows\r\n RID:         win10-x64\r\n```\r\n\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"EncoderPtd"}}