EDN Admin
Well-known member
Hi All!<br/><br/>Im writing an app, that retrieves information from 2 betting websites. The exception Im getting is "Cannot handle redirect from HTTP/HTTPS protocols to other dissimalr ones".<br/><br/>When I try the first website, there is no problem. But when I try the second website, I get the above exception. Ive checked out MSDN ( http://msdn.microsoft.com/en-us/library/system.net.webclient.aspx http://msdn.microsoft.com/en-us/library/system.net.webclient.aspx ), and it says that "<span>AllowAutoRedirect is set to true in <span><span class=selflink> WebClient instances" (although, I cannot see this property as one of the WebClients members).<br/><br/>Ive also looked around the net but cant find anything concrete about this exception (including MSDN). Is anyone able to help at all... I really hope so.<br/><br/>Ill put the code here, but as I said, it works fine for one address and not the other, so i dont think its a code thing. I just want to know what the exception means, and what I can do about it!<br/><br/>
<div style="background-color:white;color:black
<pre>WebClient wcScraper = <span style="color:blue new WebClient();
<span style="color:blue byte[] reqHTML;
<span style="color:blue string strUrl = tbAddress.Text;
reqHTML = wcScraper.DownloadData(strUrl);
[/code]
Many thanks in advance.<br/><br/>Cheers, TS
View the full article
<div style="background-color:white;color:black
<pre>WebClient wcScraper = <span style="color:blue new WebClient();
<span style="color:blue byte[] reqHTML;
<span style="color:blue string strUrl = tbAddress.Text;
reqHTML = wcScraper.DownloadData(strUrl);
[/code]
Many thanks in advance.<br/><br/>Cheers, TS
View the full article