roozrob / yahoo-finance-managed

Automatically exported from code.google.com/p/yahoo-finance-managed
0 stars 0 forks source link

The remote server returned an error: (407) Proxy Authentication Required. #36

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When using YahooManaged.Search.BOSS.API.SearchDownload() Download method is get 
the following error:
The remote server returned an error: (407) Proxy Authentication Required.

This looks like it is because i am behind a web proxy which requires 
authentication.

I have tried creating my own proxy:
            string consumerKey = @"...";
            string consumerSecret = "...";
            var dl = new YahooManaged.Search.BOSS.API.SearchDownload();
            dl.UniversalOptions.HttpsUsed = false;
            dl.UniversalOptions.ConsumerKey = consumerKey;
            dl.UniversalOptions.ConsumerSecret = new System.Security.SecureString();
            WebProxy webProxy = new WebProxy("primary-proxy.mydomain.com",8181)
                                    {

                                        UseDefaultCredentials =  true,
                                    };

            dl.Proxy = webProxy;

However this resulted in Bad Request 200 error message.

Is there an example somewhere that works from behind a web proxy that requires 
authentication ?

Original issue reported on code.google.com by 16thJanu...@gmail.com on 12 Mar 2012 at 5:24

GoogleCodeExporter commented 8 years ago
Can you try a download with default System.Net.WebRequest class and your proxy 
settings for let's say "http://finance.yahoo.com"?
Do you have the same problem then? If yes it's not a problem of the API. Then 
it's a problem of the webrequest/proxy. The proxy object will just be passed to 
the WebRequest.Proxy property.
Does it work with a "normal" proxy (without auth)?

Maas

Original comment by Maas...@gmail.com on 14 Mar 2012 at 12:18

GoogleCodeExporter commented 8 years ago
started issue

Original comment by Maas...@gmail.com on 14 Mar 2012 at 12:42

GoogleCodeExporter commented 8 years ago
tested with standard System.Net.WebRequest and found an issue with my web proxy.
This issue can now be closed.

thanks you

Original comment by 16thJanu...@gmail.com on 15 Mar 2012 at 4:08

GoogleCodeExporter commented 8 years ago

Original comment by Maas...@gmail.com on 16 Mar 2012 at 9:12