By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,203 Members | 1,480 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,203 IT Pros & Developers. It's quick & easy.

Want to call a custom handler that redirect and receive the http return code (302, 303 or 307)

P: n/a
Hi,
I want to use a class (if possible other than Socket) which one I could call
a custom handler and receive the redirect code it sends...

Actually, I tried using the WebClient class, but when the WebClient is
redirected, it does not give the redirect code in the result, it
automaticaly redirects and put the resulting page into the result...

Is there a buit-in class that does what I need in the .Net Framework or will
I have to implement the HTTP protocol myself using the Socket class?

thanks

ThunderMusic
Jan 26 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
use HttpWebRequest and turn off AllowAutoRedirect.
-- bruce (sqlwork.com)
ThunderMusic wrote:
Hi,
I want to use a class (if possible other than Socket) which one I could call
a custom handler and receive the redirect code it sends...

Actually, I tried using the WebClient class, but when the WebClient is
redirected, it does not give the redirect code in the result, it
automaticaly redirects and put the resulting page into the result...

Is there a buit-in class that does what I need in the .Net Framework or will
I have to implement the HTTP protocol myself using the Socket class?

thanks

ThunderMusic

Jan 26 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.