Hi,
I am
trying to read an xml file from live URL in my ASP.Net code. While doing
that It gives me The remote server returned an error: (404) Not
Found. Everything working perfectly fine on developer side.
Please checkout below code for more information...
public void BindSomething()
{
Uri uri = new Uri("http://www.someurl.com/xml/photos.xml");
WebRequest wrq = WebRequest.Create(uri);
try
{
XmlTextReader rd = new XmlTextReader(wrq.GetResponse().GetResponseStream()); DataSet ds = new DataSet();
ds.ReadXml(rd);
rd.Close();
PhotosListView.DataSource = ds.Tables[0];
PhotosListView.DataBind();
}
catch (Exception ex)
{
throw ex ...
Go to the complete details ...