Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jim Lesinski 32 posts 54 karma points
    Aug 23, 2010 @ 22:47
    Jim Lesinski
    0

    GetXmlDocumentByUrl and Proxy issue

    I was having some issues using umbraco.library.GetXmlDocumentByUrl. I kept receiving this error when saving the XSLT file.

    System.Xml.XmlException: An error occurred while parsing EntityName. Line 3, position 106. 
    at System.Xml.XmlTextReaderImpl.Throw(Exception e) 
    at System.Xml.XmlTextReaderImpl.Throw(String res, String arg) 
    at System.Xml.XmlTextReaderImpl.Throw(String res) 
    at System.Xml.XmlTextReaderImpl.ParseEntityName() 
    at System.Xml.XmlTextReaderImpl.ParseEntityReference() 
    at System.Xml.XmlTextReaderImpl.Read() 
    at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace) 
    at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc) 
    at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) 
    at System.Xml.XmlDocument.Load(XmlReader reader) 
    at System.Xml.XmlDocument.LoadXml(String xml) 
    at umbraco.library.GetXmlDocumentByUrl(String Url)

     

    I searched the forums here and didn't find a solution. I determined that the issue only occurred with xml feeds outside of our network. Adding a default proxy to the web.config fixed this issue. Here's how to do that:

    Locate the <system.net> </system.net> tags

     <defaultProxy>
     <proxy proxyaddress="http://servername:port" />
     </defaultProxy>

     

    I hope that helps someone out. 

  • Jim Lesinski 32 posts 54 karma points
    Aug 23, 2010 @ 22:55
    Jim Lesinski
    0

    Also, your specific defaultproxy configuration may be slightly different. For example, you may need to include a password...

    Go here for more information: http://msdn.microsoft.com/en-us/library/kd3cf2ex.aspx

     

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies