Quantcast
Channel: XML and XmlDataSource Control
Viewing all articles
Browse latest Browse all 20

Re: "The remote server returned an error: (407) Proxy Authentication Required" Help please

$
0
0

hi Sohnee the code i hv used is

XmlTextReader rd;

WebRequest wrq; string url;

url =

"http://www.ibnlive.com/xml/top.xml"; wrq = WebRequest.Create(url);

wrq.Proxy =

WebProxy.GetDefaultProxy();

//wrq.Proxy.Credentials = CredentialCache.DefaultCredentials; wrq.Proxy.Credentials = new System.Net.NetworkCredential("UserName", "Password");

try

{

rd =
new XmlTextReader(wrq.GetResponse().GetResponseStream());DataSet ds = new DataSet();

ds.ReadXml(rd);

//ds.ReadXml(url);

dlNews.DataSource = tableGenerate(ds);

dlNews.DataBind();

}

catch(Exception ex)

{

lblNewsError.Text = ex.Message.ToString();

}

it works smoothly when i run the code in Designer but when i access the pages through IIS it throw me the error "The remote name could not be resolved: 'www.ibnlive.com'"

[8-)]


Viewing all articles
Browse latest Browse all 20

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>