Click here to Skip to main content
15,890,845 members
Home / Discussions / C#
   

C#

 
GeneralRe: Combo ControlArray - Selected Item Pin
sreejith ss nair28-Dec-04 16:12
sreejith ss nair28-Dec-04 16:12 
GeneralRetrieving HTML Source for a given website Pin
Anand Mudliar28-Dec-04 7:07
Anand Mudliar28-Dec-04 7:07 
GeneralRe: Retrieving HTML Source for a given website Pin
Jesse Squire28-Dec-04 7:34
Jesse Squire28-Dec-04 7:34 
GeneralRe: Retrieving HTML Source for a given website Pin
Anand Mudliar28-Dec-04 8:25
Anand Mudliar28-Dec-04 8:25 
GeneralRe: Retrieving HTML Source for a given website Pin
Nick Parker28-Dec-04 8:53
protectorNick Parker28-Dec-04 8:53 
GeneralRe: Retrieving HTML Source for a given website Pin
Jesse Squire28-Dec-04 9:08
Jesse Squire28-Dec-04 9:08 
GeneralRe: Retrieving HTML Source for a given website Pin
Anand Mudliar28-Dec-04 22:12
Anand Mudliar28-Dec-04 22:12 
GeneralRe: Retrieving HTML Source for a given website Pin
Jesse Squire29-Dec-04 4:50
Jesse Squire29-Dec-04 4:50 
Ahhh... so I've basically been spouting off under a false assumption. D'Oh! | :doh: Sorry about that.

The HttpWebRequest can do anything that the AXWebBrowser can, it just sometimes requires a bit more code. I would definately recommend using the HttpWebRequest, as the difference in performance and resource consumption is worth it, IMHO.

As far as the timeouts and closed connections, they're usually due to network or remote site issues. I would think your best bet would simply be to trap the exception and retry. The redirections are where some work comes in.

Assuming that you retrieve a HttpWebResponse object from the request by calling the GetResponse method, redirection will cause the ContentLength property of the response to be set to -1. By parsing out the headers of the response, you can determine where the redirection was to, and use your HttpWebRequest to query the redirection URI. You can reference the headers here[^]. Search for the "10.3 Redirection 3xx" section.

I had some code that followed redirection using the HttpWebRequest, but, unfortunately I can't seem to find it at the moment. If I can remember where the heck I put it, I'll post it in another reply.

Hope that helps. Smile | :)

--Jesse
GeneralRe: Retrieving HTML Source for a given website Pin
Nick Parker28-Dec-04 7:57
protectorNick Parker28-Dec-04 7:57 
GeneralFle Version Pin
Anonymous28-Dec-04 7:03
Anonymous28-Dec-04 7:03 
GeneralRe: Fle Version Pin
Jesse Squire28-Dec-04 9:21
Jesse Squire28-Dec-04 9:21 
GeneralChanging the scroll bar color Pin
LannieK28-Dec-04 5:34
LannieK28-Dec-04 5:34 
GeneralLicensing, Encryption and .NET Reflector Pin
PaleyX28-Dec-04 3:58
PaleyX28-Dec-04 3:58 
GeneralRe: Licensing, Encryption and .NET Reflector Pin
Javier Lozano28-Dec-04 6:21
Javier Lozano28-Dec-04 6:21 
GeneralRe: Licensing, Encryption and .NET Reflector Pin
Skynyrd28-Dec-04 8:43
Skynyrd28-Dec-04 8:43 
GeneralA loop in write statement Pin
Anonymous28-Dec-04 3:43
Anonymous28-Dec-04 3:43 
GeneralRe: A loop in write statement Pin
Identity Undisclosed28-Dec-04 7:46
Identity Undisclosed28-Dec-04 7:46 
GeneralRe: A loop in write statement Pin
Anonymous28-Dec-04 11:34
Anonymous28-Dec-04 11:34 
GeneralRe: A loop in write statement Pin
Bill Dean29-Dec-04 16:55
Bill Dean29-Dec-04 16:55 
GeneralRe: A loop in write statement Pin
jablo30-Dec-04 8:48
jablo30-Dec-04 8:48 
GeneralRe: A loop in write statement Pin
Bill Dean30-Dec-04 9:11
Bill Dean30-Dec-04 9:11 
GeneralTerminating ThreadPool Paths Pin
Tristan Rhodes28-Dec-04 2:09
Tristan Rhodes28-Dec-04 2:09 
GeneralRe: Terminating ThreadPool Paths Pin
Guinness4Strength28-Dec-04 8:52
Guinness4Strength28-Dec-04 8:52 
GeneralRe: Terminating ThreadPool Paths Pin
Tristan Rhodes28-Dec-04 13:35
Tristan Rhodes28-Dec-04 13:35 
GeneralDoes anybody have the C# Sorted ListView by Carlos H. Perez Pin
dfsgdsfgdfg28-Dec-04 1:51
dfsgdsfgdfg28-Dec-04 1:51 

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.