Interoperability Between MSXML and .Net Using COM +

I need to create a .Net C # component with these two requirements:

  • Providing XML and XSL paths as input parameters must return an HTML string.
  • XSLT engine must be implemented using XSLT MSXML processor *

Using MSXML

via COM Interop might be an option, but I found this scary knowledgebase article on the subject that says:

815112 INFO: Using MSXML is not supported in .NET applications
http://support.microsoft.com/kb/815112

MSXML uses threading models and garbage collection mechanisms that are not compatible with the .NET Framework. Using MSXML in .NET. applications through COM interoperability can lead to unexpected problems that are difficult to debug.

Could using MSXML

in a batch package COM+

be a safer way to access MSXML

from within a .NET application?
As stated in my requirements, I don't need to treat classes or interfaces MSXML

as I / O parameters, but just plain vanilla strings.

* The code base consists of thousands of XSL files that work fine on the MSXML

XSLT engine (MSXML 4.0), but give more than an error with the picker System.xml

.Net library .

+3


source to share


1 answer


Yes, you can create an out-of-process COM + application and then use classes in System.EnterpriseServices

namespace
or WCF (I would go with that, personally) to connect to the COM + application.



Of course, this means that you will have to use some other technologies besides .NET to host your component, but this is probably the easiest way to get process isolation and .NET compatibility out of the box.

+3


source







All Articles