I'm trying to generate data in XML Format by using a RSS feed URL. I got the exception:
Remote server returned an error (400) bad request error.
I'm using a SSIS package and I created a Security Task in control Flow, the script I've written is as follows:
public bool DownloadFeed()
{
string user = "xxx";
string password = "pwd";
WebClient web = new WebClient();
System.Net.WebClient wc = new System.Net.WebClient();
wc.Credentials = new System.Net.NetworkCredential(user, password);
System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Ssl3 |
SecurityProtocolType.Tls |
SecurityProtocolType.Tls11 |
SecurityProtocolType.Tls12;
wc.DownloadFile(@"https://Entered RSS Feed URL here", @"H:\import\Test.xml");
return true;
}