none
For security reasons DTD is prohibited in this XML document. To enable DTD processing set the ProhibitDtd property on XmlReaderS RRS feed

  • Question

  • We keep getting this error intermittently.

    " 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"

    Does anyone know of a solution?  I've got verbose set to 4 and am not seeing any errors in the log files or the event logs.

    Thanks!
    Monday, August 25, 2008 9:19 PM

Answers

  • There could be a couple of reasons behind this:

    1. resource issue (out of memory etc) during the processing/rendering of a report, which causes the processing/rendering to abort. in this case, the error occurs along with ProcessingAbortedException. Monitoring the server memory usage or the appdomain recycles (ASP.NET perf counters) during report execution will give some clue on whether if it is the case. A possible solution to this would be to upgrade server hardware
    2. security settings issue, if it is indeed the case, check out the BOL link below to make sure that the permissions are properly set: http://msdn.microsoft.com/en-us/library/aa337491.aspx

     heetrie wrote:
    We keep getting this error intermittently.

    " 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"

    Does anyone know of a solution?  I've got verbose set to 4 and am not seeing any errors in the log files or the event logs.

    Thanks!

    Monday, August 25, 2008 11:03 PM
    Moderator

All replies

  • There could be a couple of reasons behind this:

    1. resource issue (out of memory etc) during the processing/rendering of a report, which causes the processing/rendering to abort. in this case, the error occurs along with ProcessingAbortedException. Monitoring the server memory usage or the appdomain recycles (ASP.NET perf counters) during report execution will give some clue on whether if it is the case. A possible solution to this would be to upgrade server hardware
    2. security settings issue, if it is indeed the case, check out the BOL link below to make sure that the permissions are properly set: http://msdn.microsoft.com/en-us/library/aa337491.aspx

     heetrie wrote:
    We keep getting this error intermittently.

    " 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"

    Does anyone know of a solution?  I've got verbose set to 4 and am not seeing any errors in the log files or the event logs.

    Thanks!

    Monday, August 25, 2008 11:03 PM
    Moderator
  •  

    I donot know how is it possible that we do not know exactly what causes this error.

    I am stuill getting these errors i check all the damn posibillities.

     

    when i try to access the reports from my asp.net application from the server using localhost it works perfectly fine

     

    when i try access this link from another box i get the above error.

    Tuesday, September 16, 2008 4:32 PM
  • I finally got my environment working.  

    My problem was a memory issue.  The server had plenty of physical memory so I knew that wasn't the issue.  One of the main issues I saw was the ReportServer log files were being generated very frequently- like every 20-30 seconds.  At the end I'd see a line of "Reporting Web Server stopped".  After looking at my AppDomain restarts I knew that it was probably contributing to the problem.  

    Turns out there was a setting that one of the sys admins had set that limited the memory.  It is the "Memory recycling" section on the Application Pool properties.  The setting was the "Maximum virtual memory (in megabytes)".  After I unchecked that box the appdomain quit recycling and we quit getting the "DTD is prohibited in this XML document" error.

    So with your error, do you get it immediately or after the report starts generating?  If it is when the report starts generating then it is probably a security permission with the account your ReportServer application pool is running under.  I would check the access of that account against the data sources you are running against.  Another question is, does this happen for all your reports, or just reports that hit certain data sources?


    Tuesday, September 16, 2008 5:15 PM
  •  

    Hi Heetrie,

     

    This is my problem.

    I have hosted my asp.net  application on web server A1,

    I have hosted the Reports On report server R1.

     

    When i access A1 locally using localhost i can see the reports working fine.

    but when i access A1 from other boxes i get the above error.

     

    Please help

     

    Tuesday, September 16, 2008 6:13 PM
  •  

    Got the problme working,

     

    The server did not have proper permissions, after giving permission its working fine.
    Tuesday, September 30, 2008 4:30 PM
  • Can anybody tell me what is the solution for this.
    Tuesday, August 11, 2009 2:08 PM
  • this is a memory issue. if you have a 32 bit computer , the w3wp.exe is limit to ~1.2 GB of RAM.
    If your reports needs more than that you have a problem.

    you can solve it by:
    1. upgrade the server to 64 bit.
    2. use web garden.
    3. simplify your report. if you can use only one dataset it will be very helpfull.

    Thanks, Yuval
    Monday, October 26, 2009 1:41 PM
  • Hi There - Could you provide the version of RS you are using? This is an issue we've seen with reporting services 2005 for a while now, it was hard to repro but we did eventually find the problem and believe it is fixed in later releases of 2005 and 2008. Here is a thread that discusses the issues, but we believe the issue is related to RS getting a response it expects to be XML, but has errors in HTML that makes it appear to be DTD. This can result from many different problems, but appears to be most common with out of memory conditions with large reports, and unfortunately we do not have a clear/consistent workaround. RS in SQL 2008 has been rearchitected to handle large memory reports much better, and I do not recall hearing of this happening any more in 2008.

    Hope this helps - Thanks, Dean



    This posting is provided "AS IS" with no warranties, and confers no rights.
    Monday, October 26, 2009 4:43 PM
    Answerer
  • Hi Dean,

    I am using RS2005 on a 32 bit machine with 11GB (OS is Windows Server 2003, SP2).

    The "For security reasons DTD..." error occured many times with large reports (>70,000 rows)

    After investigeting the issue i found that its happend due to limit of ~1.2 GB memory of the IIS process W3WP.EXE  (60% of 2GB, changing the MemoryLimit/MaximumMemoryLimit parameters on rsreportserver.config wasn't helpfull)

    I found a temp solution till we upgrade to 64 bit by adding the /3GB switch in the boot.ini file which higher the limit to ~1.8GB.

    another aspect that i checked is why the reports are consuming so large amount of memory and i arrived to interesting finding: in case there is more than one dataset, the memory will be doubled!!!!! I know that it's hard to believe but I checked it very carefully: I took a simple RDL with one dataset the get ~  80,000 rows,and monitored the memory - 800MB
    the memory was1.6GB instead of 800MB!

    Are you familiar with this behavior? any workaround?

    Thanks, Yuval

    Tuesday, October 27, 2009 6:34 AM