views:

276

answers:

1

Hello,

One of my users had a single error while opening a file (I'm using standard xml 1.0):

The remote name could not be resolved: 'www.w3.org'

I found a post here in StackOverflow that deals with this and it suggest setting the XmlResolver property to null. I've tried this, and all my documents still seem to load fine. However, the last thing I want is to break the file-reading mechanism of my app, so is it actually safe to disable the resolver?

+1  A: 

It really depends on whether you make use of external references. You can always write your own XmlResolver, allowing it to work with the files that you do have (I have one that reads known files from resx for example).

But the simplest option is just to disable it... and of course your unit tests will quickly identify any problem ;-p

Marc Gravell
Thanks Marc. I don't think I'm using any external references. I'm no xml expert unfortunately, so I wouldn't trust myself to test this change properly prior to releasing a new version.What would an external reference look like? And why would the XmlDocument connect to w3 if there are no ext refs?
David Rutten
Mainly xsd validation, presumably?
Marc Gravell