Hi,
I have a console application which should read xml from the Internet at some
point. I've noticed that it takes plenty of time (between 10-15 sec) for
initially "setting" an Internet connection via the console application. The
same code works instantly in a asp.net web project.
The example below illustrates the problem: It takes 14 seconds for step 1 and
0,0 seconds for steps 2 and 3.
All files on server are really small (about 1 kb each - 10-15 lines)
using (System.Net.WebClient wc = new System.Net.WebClient())
{
//step1
wc.DownloadFile("http://somedomain/test1.xml",
@"C:\Test1.xml");
//step2
wc.DownloadFile("http://somedomain/test2.xml",
@"C:\Test2.xml");
//step3
wc.DownloadFile("http://somedomain/test3.xml",
@"C:\Test3.xml");
}
Thanks in advance for your help,
Albert
--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...p-net/200612/1