-1

While consuming RSS feed in the our company domain, i am getting proxy connection problem. how to solve this.. can any one give exact example which is working in corporate domain.

WebRequest MyRssRequest = WebRequest.Create("csharp-dotnet-interview-questions.blogspot.com/feeds/posts/…;); 
WebResponse MyRssResponse = MyRssRequest.GetResponse(); 
Stream MyRssStream = MyRssResponse.GetResponseStream(); 
// Load previously created XML Document XmlDocument MyRssDocument = new XmlDocument();
Jakob Gade
  • 12,319
  • 15
  • 70
  • 118
  • it is related to program related only.. – rangarajesh Nov 24 '11 at 06:33
  • Are you trying to create an ASP.NET app that reads an RSS feed, but the company network is making things difficult for you? Can you provide some more information: What have you tried so far? Are you getting any exceptions? – Jakob Gade Nov 24 '11 at 10:05
  • if i am using below code.. i am getting The remote server returned an error: (407) Proxy Authentication Required. exception WebRequest MyRssRequest = WebRequest.Create("http://csharp-dotnet-interview-questions.blogspot.com/feeds/posts/default"); WebResponse MyRssResponse = MyRssRequest.GetResponse(); Stream MyRssStream = MyRssResponse.GetResponseStream(); // Load previously created XML Document XmlDocument MyRssDocument = new XmlDocument(); – rangarajesh Nov 24 '11 at 10:17
  • I took the liberty of adding your code snippet to the question itself. Did you see this question, some of the answers deals with setting the proxy: http://stackoverflow.com/questions/490177/how-do-i-determine-elegantly-if-proxy-authentication-is-required-in-c-sharp-wi – Jakob Gade Nov 24 '11 at 11:52
  • yes i got the solution. i have posted in by blog. http://csharp-dotnet-interview-questions.blogspot.com/2011/11/reading-rss-feeds-in-aspnet-with-proxy.html – rangarajesh Nov 25 '11 at 09:11

1 Answers1

0

Check out the WebProxy Class, I think it's what you're looking for... :)

Jakob Gade
  • 12,319
  • 15
  • 70
  • 118