views:

297

answers:

1

I am using a 3rd-party .NET component which requires an XML configuration file. I'm am using this in an ASP.NET application.

I get an error when configure the XML with the following dtd:

<!DOCTYPE prod-config SYSTEM "cache-config.dtd">

The error is as follows:

For security reasons DTD is prohibited in this XML document. To enable DTD processing set the ProhibitDtd property on XmlReaderSettings to false and pass the settings into XmlReader.Create method.

prod-config.dtd is sitting in the same directory as the XML config file.

I don't have access to the component code to modify XmlReaderSettings, ProhibitDtd etc. Is there anotherway I can modify or tag the XML file to permit the DTD to be accessed?

(FYI, the component is Oracle Coherence .NET client)

A: 

Do you need to specify the DTD at all? If nothing is actually using it, then it would be simplest to just omit the DTD declaration altogether.

Ths page on Oracle's site suggests the component is only supported on .NET 1.1. I think the behaviour of refusing DTDs by default changed between .NET 1.1 and .NET 2.0. If you are tryingt run with .NET 2.0, I suggest you try downgrading. Installing 1.1 side-by-side might work but you may ned to hack the configuration to force it to use the desired runtime version.

Daniel Renshaw
This gives the error: Could not find schema information for the element 'cache-config'.
frankadelic
I think this behaviour changed between .NET 1.1 and .NET 2. Could it be that this component is only supported in .NET 1.1?
Daniel Renshaw
It's a .NET 2.0 component.
frankadelic