Click here to Skip to main content
15,906,455 members
Home / Discussions / C#
   

C#

 
GeneralRe: Large databases Pin
WillemM24-Oct-03 5:24
WillemM24-Oct-03 5:24 
GeneralRe: Large databases Pin
Eric Gunnerson (msft)24-Oct-03 7:18
Eric Gunnerson (msft)24-Oct-03 7:18 
GeneralRe: Large databases Pin
WillemM24-Oct-03 20:39
WillemM24-Oct-03 20:39 
GeneralSetup Questionn Pin
Mazdak23-Oct-03 23:11
Mazdak23-Oct-03 23:11 
GeneralRe: Setup Questionn Pin
antoine@orchus-tech24-Oct-03 4:33
antoine@orchus-tech24-Oct-03 4:33 
GeneralRe: Setup Questionn Pin
Adam Turner26-Nov-03 19:39
Adam Turner26-Nov-03 19:39 
GeneralRe: Setup Questionn Pin
Mazdak27-Nov-03 8:31
Mazdak27-Nov-03 8:31 
GeneralTimeout WebException of GetResponseStream().Read Pin
PrimeYork23-Oct-03 21:49
PrimeYork23-Oct-03 21:49 
There is Timeout WebException occurs at the 'stream.Read' of following codes.
Process hangs after reading a few times.
Why?
(Visual Sudio.net 2003, .Net Framework 1.1, Windows XP Professional sp1)


HttpWebRequest req = (HttpWebRequest)WebRequest.Create("http://download.adobe.com/pub
/adobe/acrobatreader/win/5.x/5.1/AcroReader51_KOR.exe");
HttpWebResponse resp = (HttpWebResponse)req.GetResponse();
Stream stream = resp.GetResponseStream();
FileStream fs = new FileStream("AcroReader51_KOR.exe", FileMode.Create);

long currSizeForThisFile = 0;
const int LENGTH = 1024;
const int OFFSET = 0;
byte[] buffer = new byte[LENGTH];

while (true)
{
/* Timeout WebException occurs after a few reading */
int rcvd = stream.Read(buffer, OFFSET, LENGTH);

if (rcvd > 0 && !enableExit)
{
fs.Write(buffer, 0, rcvd);
}
else
{
fs.Close();
stream.Close();
resp.Close();

System.Threading.Thread.Sleep(50);

break;
}
}
Generalprint page number Pin
hkl23-Oct-03 15:25
hkl23-Oct-03 15:25 
GeneralRe: print page number Pin
mistery2225-Oct-03 2:46
mistery2225-Oct-03 2:46 
GeneralRe: print page number Pin
hkl27-Oct-03 8:38
hkl27-Oct-03 8:38 
GeneralRe: print page number Pin
hkl27-Oct-03 9:00
hkl27-Oct-03 9:00 
GeneralButton Pin
Gary Kirkham23-Oct-03 10:55
Gary Kirkham23-Oct-03 10:55 
GeneralRe: Button Pin
Tomas Petricek23-Oct-03 12:30
Tomas Petricek23-Oct-03 12:30 
GeneralRe: Button Pin
Gary Kirkham23-Oct-03 14:00
Gary Kirkham23-Oct-03 14:00 
GeneralRe: Button Pin
J. Dunlap23-Oct-03 14:12
J. Dunlap23-Oct-03 14:12 
GeneralRe: Button Pin
Gary Kirkham24-Oct-03 3:14
Gary Kirkham24-Oct-03 3:14 
GeneralTransparency Pin
Den2Fly23-Oct-03 10:00
Den2Fly23-Oct-03 10:00 
GeneralRe: Transparency Pin
Jeremy Kimball24-Oct-03 5:24
Jeremy Kimball24-Oct-03 5:24 
GeneralRe: Transparency Pin
Den2Fly24-Oct-03 7:28
Den2Fly24-Oct-03 7:28 
GeneralSimple XPath Question Pin
antoine@orchus-tech23-Oct-03 9:55
antoine@orchus-tech23-Oct-03 9:55 
GeneralRe: Simple XPath Question Pin
Christian Graus23-Oct-03 11:40
protectorChristian Graus23-Oct-03 11:40 
GeneralRe: Simple XPath Question Pin
Tomas Petricek23-Oct-03 12:26
Tomas Petricek23-Oct-03 12:26 
GeneralRe: Simple XPath Question Pin
hravn24-Oct-03 7:16
hravn24-Oct-03 7:16 
GeneralRe: Simple XPath Question Pin
John Arlen24-Oct-03 7:25
John Arlen24-Oct-03 7:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.