xilin-silence / dropthings

Automatically exported from code.google.com/p/dropthings
0 stars 0 forks source link

RSS Widget requires authentication #32

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I have this RSS widget that retrieves the content from another site that 
requires login. The url that I specified for the RSS widget 
programmatically logs the user in and redirect the user to the rss page.
If I just typed in the url manually to an IE browser, everything seems to 
work just fine; however when the 'WebRequest' in RSSWidget tries to 
retrieve the content, it just fails to retrieve anything.

Any idea what went wrong?
Is there a way to be able to auto login a user and then retrieve the rss 
feed?

Thanks

Original issue reported on code.google.com by lindak...@gmail.com on 6 Aug 2009 at 12:06

GoogleCodeExporter commented 8 years ago
Try create a method like GetRss in ProxyAsync but using a WebClient class with 
credentials. 

Code example of use:

WebClient wc = new WebClient();
wc.Credentials = new NetworkCredential("username", "password");
string url = "http://foo.com";                  
try
{
        using (Stream stream = wc.OpenRead(new Uri(url)))
        {
                using (StreamReader reader = new StreamReader(stream))
            {
                return reader.ReadToEnd();
             }
        }
}
catch (WebException e)
{
        //Error handeling
}

Original comment by glope...@gmail.com on 15 Feb 2010 at 3:56

GoogleCodeExporter commented 8 years ago
On the ProxyAsync.GetRss method, can you try adding the credential to the 
HttpWebRequest class and see it works?

Original comment by omaralzabir@gmail.com on 15 Feb 2010 at 4:07

GoogleCodeExporter commented 8 years ago

Original comment by omaralzabir@gmail.com on 10 Jun 2010 at 8:09

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
hmm rss widget cute profiles plugin i used. sample : http://siteeditor.net and 
http://premiumwordpress.tv my sites. RSS Balonu name.

Original comment by wordpresspremiumus@gmail.com on 31 Oct 2010 at 3:18