Click here to Skip to main content
15,912,329 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I am using XDocument Load function to read the xml file. I created a test project and use this method, work fine. When I use this function in my project, throw exception "Could not resolve url"

My Code is

C#
XDocument doc = XDocument.Load("http://meet68571338.adobeconnect.com/api/xml?action=common-info");


Exception Details:

System.Net.WebException was caught
Message=The remote name could not be resolved: 'meet68571338.adobeconnect.com'
Source=System
StackTrace:
at System.Net.HttpWebRequest.GetResponse()
at System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)
at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)
at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
at System.Xml.XmlReaderSettings.CreateReader(String inputUri, XmlParserContext inputContext)
at System.Xml.XmlReader.Create(String inputUri, XmlReaderSettings settings, XmlParserContext inputContext)
at System.Xml.Linq.XDocument.Load(String uri, LoadOptions options)
at System.Xml.Linq.XDocument.Load(String uri)

InnerException:


Please guide me to resolve the problem.
Posted
Updated 25-Oct-12 20:05pm
v5

1 solution

There could be 2 reasons;

1. You are not connected to internet.
2. Your VS need proxy to connect to the internet.
 
Share this answer
 
Comments
MauryaArunKumar 26-Oct-12 2:24am    
Thanks your for your suggestion

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900