Forum Discussion

TKEUH's avatar
TKEUH
Copper Contributor
Sep 28, 2023

Eventid 6 MSExchange CmdletLogs: The response received from the service didn't contain valid XML

On my exchange 2016 server every 30 seconds i am getting the following error on my eventlog.

If i go to details it shows the following:

Get-Notification
-Summary "True"
Users/Administrator
Local-ECP-Unknown
29716 w3wp#MSExchangeECPAppPool

32
00:00:00.0070016
View Entire Forest: 'True', Configuration Domain Controller: 'dc.domain.local', Preferred Global Catalog: 'dc.domain.local', Preferred Domain Controllers: '{ dc.domain.local }'
Microsoft.Exchange.Data.DataSourceOperationException: The response received from the service didn't contain valid XML. ---> Microsoft.Exchange.WebServices.Data.ServiceRequestException: The response received from the service didn't contain valid XML. ---> System.Xml.XmlException: DTD is prohibited in this XML document. at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.ParseDoctypeDecl() at System.Xml.XmlTextReaderImpl.ParseDocumentContent() at System.Xml.XmlCharCheckingReader.Read() at Microsoft.Exchange.WebServices.Data.EwsXmlReader.Read() at Microsoft.Exchange.WebServices.Data.EwsXmlReader.Read(XmlNodeType nodeType) at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ReadXmlDeclaration(EwsServiceXmlReader reader) --- End of inner exception stack trace --- at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ReadXmlDeclaration(EwsServiceXmlReader reader) at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ReadSoapFault(EwsServiceXmlReader reader) at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ProcessWebException(WebException webException) at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.GetEwsHttpWebResponse(IEwsHttpWebRequest request) at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ValidateAndEmitRequest(IEwsHttpWebRequest& request) at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest`1.Execute() at Microsoft.Exchange.WebServices.Data.ExchangeService.FindFolders(FolderId parentFolderId, SearchFilter searchFilter, FolderView view) at Microsoft.Exchange.Data.Storage.Management.EwsStoreDataProvider.InvokeServiceCall[T](Func`1 callback) --- End of inner exception stack trace --- at Microsoft.Exchange.Data.Storage.Management.EwsStoreDataProvider.InvokeServiceCall[T](Func`1 callback) at Microsoft.Exchange.Data.Storage.Management.EwsStoreDataProvider.GetOrCreateFolderCore(String folderName, FolderId parentFolder, Func`1 creator) at Microsoft.Exchange.Data.Storage.Management.AsyncOperationNotificationDataProvider.GetDefaultFolder() at Microsoft.Exchange.Data.Storage.Management.EwsStoreDataProvider.get_DefaultFolder() at Microsoft.Exchange.Data.Storage.Management.EwsStoreDataProvider.<>c__DisplayClass24_0`1.<InternalFindPaged>b__0() at Microsoft.Exchange.Data.Storage.Management.EwsStoreDataProvider.InvokeServiceCall[T](Func`1 callback) at Microsoft.Exchange.Data.Storage.Management.EwsStoreDataProvider.<InternalFindPaged>d__24`1.MoveNext() at Microsoft.Exchange.Data.Storage.Management.AsyncOperationNotificationDataProvider.<GetNotificationDetails>d__17.MoveNext() at Microsoft.Exchange.Configuration.Tasks.GetTaskBase`1.WriteResult[T](IEnumerable`1 dataObjects) at Microsoft.Exchange.Management.StoreTasks.GetNotification.InternalProcessRecord() at Microsoft.Exchange.Configuration.Tasks.Task.<ProcessRecord>b__91_1() at Microsoft.Exchange.Configuration.Tasks.Task.InvokeRetryableFunc(String funcName, Action func, Boolean terminatePipelineIfFailed)
ServerOperation
Microsoft.Exchange.WebServices.Data.ServiceRequestException: The response received from the service didn't contain valid XML. ---> System.Xml.XmlException: DTD is prohibited in this XML document. at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.ParseDoctypeDecl() at System.Xml.XmlTextReaderImpl.ParseDocumentContent() at System.Xml.XmlCharCheckingReader.Read() at Microsoft.Exchange.WebServices.Data.EwsXmlReader.Read() at Microsoft.Exchange.WebServices.Data.EwsXmlReader.Read(XmlNodeType nodeType) at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ReadXmlDeclaration(EwsServiceXmlReader reader) --- End of inner exception stack trace --- at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ReadXmlDeclaration(EwsServiceXmlReader reader) at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ReadSoapFault(EwsServiceXmlReader reader) at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ProcessWebException(WebException webException) at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.GetEwsHttpWebResponse(IEwsHttpWebRequest request) at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ValidateAndEmitRequest(IEwsHttpWebRequest& request) at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest`1.Execute() at Microsoft.Exchange.WebServices.Data.ExchangeService.FindFolders(FolderId parentFolderId, SearchFilter searchFilter, FolderView view) at Microsoft.Exchange.Data.Storage.Management.EwsStoreDataProvider.InvokeServiceCall[T](Func`1 callback)



False

0 objects execution has been proxied to remote server.


0
ActivityId: 3c64cc18-8a3b-42c0-a235-ed32ab99bc2b
ServicePlan:;IsAdmin:True;

nl-NL

Can anybody point me in the right direction to solve this??

thanks

 

  • LeonPavesic's avatar
    LeonPavesic
    Silver Contributor

    Hi TKEUH,

    The error message "The response received from the service didn't contain valid XML" indicates that the Exchange server is receiving invalid XML responses from another server.

    This can be caused by a variety of factors, such as a firewall blocking traffic, a network problem, or a problem with the other server.

    In the case of the error message you provided, the problem is being caused by a DTD (Document Type Definition) in the XML response. DTDs are used to define the structure of an XML document, but they are not supported by Exchange.

    To resolve this issue, you need to identify the server that is sending the invalid XML responses and disable the DTD. This may involve contacting the administrator of the other server or making changes to the configuration of the server.

    Here are some things you can try to troubleshoot the issue:

    • Check the firewall settings on the Exchange server and make sure that traffic to the other server is not being blocked.
    • Try restarting the Exchange server and the other server.
    • Check the network connection between the Exchange server and the other server.
    • If the other server is an Exchange server, try running the following command on the other server to disable DTDs:

     

    Set-WebServicesVirtualDirectory -Identity "EWS/Exchange.asmx" -AllowDTDs $false​

     

    Once you have disabled the DTD, the error message should go away.

    Please click Mark as Best Response & Like if my post helped you to solve your issue.
    This will help others to find the correct solution easily. It also closes the item.


    If the post was useful in other ways, please consider giving it Like.


    Kindest regards,


    Leon Pavesic
    (LinkedIn)

Resources