Closed Relax594 closed 5 years ago
Hi Dominik,
I'm looking into the issue, which doesn't seem to be caused by your proxy. Note to self: https://msdn.microsoft.com/en-us/library/aa302284.aspx
Hi @Relax594
The issue should be resolved in v5.2.1. Please let me know if it works out for you.
Hi @uli-weltersbach
That did not fix it as i get a System.IO.DirectoryNotFoundException now. Looks like he is trying to search that DTD on my local pc
C:/Users/dotel/Desktop/-//W3C//DTD XHTML 1.0 Strict//EN
now.
This accures in FileXmlUrlResolver.GetEntity
. Looks like the absoluteUri
is set to search local however
@Relax594 Could you please provide a screenshot and steps to reproduce, incl. your debug settings (e.g. which exceptions to break on - "Just my code" for instance)?
The exception is part of the XmlUrlResolver
control flow BTW.
Exceptions for control flow are bad - but I can't change the .NET Framework ;)
I've uploaded a txt file, you need to change the file extension to .xml. After that open that file in Visual Studio and try to run your plugin. test.txt
This is the exception i'm getting (it's german but i think you get the point :)).
Maybe there has to be a different thinking about it then because i think having a external linked DTD to a w3.org DTD is nothing special, is it?
I can't reproduce the behavior your describing: https://www.screencast.com/t/WjOnu3HqRAu
Could you please provide your debug settings, particularly the "Just my code" setting?
I'll restate my previous comment:
The exception is part of the XmlUrlResolver
control flow.
The XmlReader
needs the XmlUrlResolver
to throw an exception.
My Debug Settings are like yours.
I'm using some of your classes inside my own plugin but the core should be the same and make no difference. I'm not even into getting the XPATH, it happens while loading the XML on TextViewCreated
and then we end up back again in GetEntity with the exception.
absoluteUri is file:///C:/Users/dotel/Desktop/-//W3C//DTD XHTML 1.0 Strict//EN which causes the issue
As this throws a DirectoryNotFound Exception it gets called a second time with TryParseXml(xml, baseUri, DtdProcessing.Ignore)
and this is throwing
System.NotSupportedException: "URI scheme "http" isn't supported by FileXmlUrlResolver."
Getting the XPATH is working fine after that issues! It just occures that issue while loading the xml initialy at TextViewCreated
You want me to help your debug your own VS Extension, which uses some of the code from the XML Tools extension?
I linked your classes inside my extension, so it uses all your methods and workflow. So there is basicly no difference.
I attach the same events and the workflow when a xml-file gets opened is the same as your extension does.
If you run into the exception during debugging, you can ignore it because the exception is expected and required by the .NET Framework XML classes (I'm stating this for the 3rd time now).
What happens when you click "Continue" in the debugger and try to use your extension?
I'm not sure I can assist you further, without getting my hands on your extension.
(I'm stating this for the 3rd time now).
Then I missunderstood you, sorry for that.
As i said, its working fine if i click continue^^ It is just that loading exception i got, but if that is expected and required than i totaly missunderstood you and i'm sorry for taking your time!
Sorry if I was unclear about it, happy I could help.
XmlRepository.TryParseXml is getting a timeout while loading this external DTD from my given xml.
We are using a Proxy in our company, maybe that is causing the issue but idk
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">