I am trying to access a website via webclient in .net but I am getting an error message saying this: "Microsoft Online Services requires JavaScript to sign in. This web browser either does not support JavaScript, or scripts are being blocked."
Here is the code I am using to access the website:
string url = "myUrl";
WebClient client = new WebClient();
client.Headers.Add("user-agent", "Mozilla/5.0 (Windows NT 6.1; rv:5.0.1) Gecko/20100101 Firefox/5.0.1");
client.Credentials = new NetworkCredential("username", "Password");
string lines = client.DownloadString(url);
Any help is appreciated. Should I change the user agent or try something else? Thanks in advance, Laziale