how to retrieve CGI rss feed using asp.net but error The remote server returned an error: (503) Serv

Discussion in 'ASP .Net' started by rote, Mar 6, 2008.

  1. rote

    rote Guest

    I'm trying to recieve some feeds from a cgi page like below but i keep
    getting error

    "The remote server returned an error: (503) Server Unavailable."

    Any ideas?
    The page(rss.cgi) needs a username and password to get couls that be the
    reason if yes
    how can i pass the username and password in my code



    private void Page_Load(object sender, System.EventArgs e)

    {

    myXml.Document = getXML(http://myserver/cgi-bin/rss.cgi);

    }



    public XmlDocument getXML(string sourceFile)

    {

    XmlDocument tempgetXML = null;

    System.Net.WebRequest myRequest = System.Net.WebRequest.Create(sourceFile);

    System.Net.WebResponse myResponse = myRequest.GetResponse();

    System.Xml.XmlTextReader myReader = new
    System.Xml.XmlTextReader(myResponse.GetResponseStream());

    System.Xml.XmlDocument doc = new System.Xml.XmlDocument();

    doc.Load(myReader);

    tempgetXML = doc;

    myResponse.Close();

    myReader.Close();

    return tempgetXML;

    }
    rote, Mar 6, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Raúl Martín
    Replies:
    1
    Views:
    10,803
    Natty Gur
    May 13, 2004
  2. Replies:
    5
    Views:
    751
    SpaceGirl
    Feb 25, 2005
  3. Motta
    Replies:
    1
    Views:
    518
    Andy Dingley
    Jun 9, 2004
  4. Scott Gordo
    Replies:
    5
    Views:
    693
  5. Jonathan Groll
    Replies:
    1
    Views:
    258
    Kouhei Sutou
    Jun 27, 2009
Loading...

Share This Page