I am trying to connect to URL using WebClient inside Asp.Net Web Api project. My intention was to get the content and create a web site thumbnail.
Sample Code:
using (var client = new WebClient())
{
var contents = client.DownloadString("http://www.google.com");
}
But this WebClient client object throws timeout exception in case of WebApi and same works fine for console application.
Kindly help.