R
rote
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;
}
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;
}