XML : Read XML file located in AWS throws "the remote name could not be resolved https://compcdn.cloud.com"

I have an XML file located on our company Cloud Site (this is an amazon s3 server) (https://compcdn.cloud.com/books.xml) and I am trying to read the XML from that location using XDocument doc = XDocument.Load("https://compcdn.cloud.com/books.xml"); But unfortunately it throws the following exception "The remote name could not be resolved compcdn.cloud.com" I am not sure what I am missing here. I am not sure If I have to pass any credentials over here to access the URL, if so can you please let me know how can I do that.. Thank you and appreciate your feedback. Inner Exception System.Net.WebException: The remote name could not be resolved: 'compcdn.cloud.com'\r\n at System.Net.HttpWebRequest.GetResponse()\r\n at System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)\r\n at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)\r\n at System.Xml.XmlTextReaderImpl.FinishInitUriString()\r\n at System.Xml.XmlReaderSettings.CreateReader(String inputUri, XmlParserContext inputContext)\r\n at System.Xml.Linq.XDocument.Load(String uri, LoadOptions options)\r\n at comp.internalServices.DownloadService.GetDownloadableDriversFromConfig() in c:\WorkSpace\git\master\comp.internalServices\DownloadService.cs:line 139

No comments:

Post a Comment