public Form1() { InitializeComponent(); CheckForIllegalCrossThreadCalls = false; this.cc = new CookieContainer(); this.spwc = new SpWebClient(cc); this.spwc.Headers.Add("User-Agent", "User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.97 Safari/537.36"); }