Hello, we are glad that the option to use streams as inputs for BindXml was implemented but using it we got to an another problem. When using the BindXml(Stream,Stream) method the XmlResolver used to resolve the xsl;import does not function correctly as it looks in the current assembly execution directory (C:\windows\system32) not in the directoroy of the filestream provided. This was not a problem when using the BindXml(string,string).
What would solve our problem is if you provided a way to send in XmlReaderSettings object or XmlResolver object to be used when calling the BindXml(Stream,Stream) method so the interface would be
BindXml(Stream,Stream, XmlReaderSettings)
creating a XmlReaderSettings and providing a custom XmlResolver
XmlReaderSettings settings = new XmlReaderSettings();and then load the compiled transformation with the provided XmlReaderSetting from the stream.
settings.XmlResolver = new CustomXmlResolver();
<span style=“color: rgb(42, 42, 42); font-family: “Segoe UI”, “Lucida Grande”, Verdana, Arial, Helvetica, sans-serif; font-size: 13px;”>An <a rel=“nofollow” href=“https://msdn.microsoft.com/en-us/library/system.xml.xmlresolver(v=vs.110).aspx” style=“text-decoration: none; color: rgb(0, 112, 159); font-family: “Segoe UI”, “Lucida Grande”, Verdana, Arial, Helvetica, sans-serif; font-size: 13px;”>XmlResolver<span style=“color: rgb(42, 42, 42); font-family: “Segoe UI”, “Lucida Grande”, Verdana, Arial, Helvetica, sans-serif; font-size: 13px;”> used to access external documents. If set to <strong style=“color: rgb(42, 42, 42); font-family: “Segoe UI”, “Lucida Grande”, Verdana, Arial, Helvetica, sans-serif; font-size: 13px;”>null<span style=“color: rgb(42, 42, 42); font-family: “Segoe UI”, “Lucida Grande”, Verdana, Arial, Helvetica, sans-serif; font-size: 13px;”>, an <a rel=“nofollow” href=“https://msdn.microsoft.com/en-us/library/system.xml.xmlexception(v=vs.110).aspx” style=“text-decoration: none; color: rgb(0, 112, 159); font-family: “Segoe UI”, “Lucida Grande”, Verdana, Arial, Helvetica, sans-serif; font-size: 13px;”>XmlException<span style=“color: rgb(42, 42, 42); font-family: “Segoe UI”, “Lucida Grande”, Verdana, Arial, Helvetica, sans-serif; font-size: 13px;”> is thrown when the <a rel=“nofollow” href=“https://msdn.microsoft.com/en-us/library/system.xml.xmlreader(v=vs.110).aspx” style=“text-decoration: none; color: rgb(0, 112, 159); font-family: “Segoe UI”, “Lucida Grande”, Verdana, Arial, Helvetica, sans-serif; font-size: 13px;”>XmlReader<span style=“color: rgb(42, 42, 42); font-family: “Segoe UI”, “Lucida Grande”, Verdana, Arial, Helvetica, sans-serif; font-size: 13px;”> tries to access an external resource. The default is a new <a rel=“nofollow” href=“https://msdn.microsoft.com/en-us/library/system.xml.xmlurlresolver(v=vs.110).aspx” style=“text-decoration: none; color: rgb(0, 112, 159); font-family: “Segoe UI”, “Lucida Grande”, Verdana, Arial, Helvetica, sans-serif; font-size: 13px;”>XmlUrlResolver<span style=“color: rgb(42, 42, 42); font-family: “Segoe UI”, “Lucida Grande”, Verdana, Arial, Helvetica, sans-serif; font-size: 13px;”> with no credentials. Starting with the .NET Framework 4.5.2, this setting has a default value of <strong style=“color: rgb(42, 42, 42); font-family: “Segoe UI”, “Lucida Grande”, Verdana, Arial, Helvetica, sans-serif; font-size: 13px;”>null<span style=“color: rgb(42, 42, 42); font-family: “Segoe UI”, “Lucida Grande”, Verdana, Arial, Helvetica, sans-serif; font-size: 13px;”>.
as written in
https://msdn.microsoft.com/en-us/library/system.xml.xmlreadersettings.xmlresolver(v=vs.110).aspx