HttpWebRequest wr = (HttpWebRequest)HttpWebRequest.Create(new Uri("https://sharepointurl/_api/lists/"));
wr.Credentials = CredentialCache.DefaultNetworkCredentials;
var v = wr.GetResponse();
On executing the request, I get a HTTP 500 error.
The URL returns the data successfully in IE
Any pointers as to whats wrong?