'doctype' is an unexpected token. The expected token is 'DOCTYPE'. Line 1, position 3.

Server Error in '/' Application.

'doctype' is an unexpected token. The expected token is 'DOCTYPE'. Line 1, position 3.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Xml.XmlException: 'doctype' is an unexpected token. The expected token is 'DOCTYPE'. Line 1, position 3.

Source Error:


Line 162:            Dim weatherXMLcache As XmlDocument = CType(Cache.Get("weatherXMLcache"), XmlDocument)
Line 163:            If weatherXMLcache Is Nothing Then  'data is not in cache
Line 164:                xmlDoc.Load(URLString)
Line 165:                Cache.Insert("weatherXMLcache", xmlDoc, Nothing, DateTime.Now.AddMinutes(TimeToRefreshCache), TimeSpan.Zero)
Line 166:                Application("weatherLastUpdated") = DateTime.Now

Source File: E:\Websites\nest\nest.hr\wwwroot\CMSWebParts\WeatherList\WeatherControl.ascx    Line: 164

Stack Trace:


[XmlException: 'doctype' is an unexpected token. The expected token is 'DOCTYPE'. Line 1, position 3.]
   System.Xml.XmlTextReaderImpl.Throw(Exception e) +95
   System.Xml.XmlTextReaderImpl.ParseDoctypeDecl() +5144409
   System.Xml.XmlTextReaderImpl.ParseDocumentContent() +668
   System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) +165
   System.Xml.XmlDocument.Load(XmlReader reader) +134
   System.Xml.XmlDocument.Load(String filename) +95
   LAWeather.WeatherControl.Page_Load(Object sender, EventArgs e) in E:\Websites\nest\nest.hr\wwwroot\CMSWebParts\WeatherList\WeatherControl.ascx:164
   System.Web.UI.Control.OnLoad(EventArgs e) +132
   System.Web.UI.Control.LoadRecursive() +66
   System.Web.UI.Control.LoadRecursive() +191
   System.Web.UI.Control.LoadRecursive() +191
   System.Web.UI.Control.LoadRecursive() +191
   System.Web.UI.Control.LoadRecursive() +191
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428


Version Information: Microsoft .NET Framework Version:2.0.50727.8669; ASP.NET Version:2.0.50727.8015