Azure webjobs are unable to connect to sharepoint online: For security reasons DTD is prohibited in this XML document

Fernando Leitzelar 21 Reputation points

Azure webjobs are unable to connect to sharepoint online. The error message is:
For security reasons DTD is prohibited in this XML document. To enable DTD processing set the DtdProcessing property on XmlReaderSettings to Parse and pass the settings into XmlReader.Create method

The issue is well documented and it is caused by a CNAME entry (MSOID). I fixed the issue locally using the following entries in the hosts file:

Since the Azure WebJob runs in multiple containers, the Webjob fails intermittently, depending on what the host configuration is.

Is there a way to force the container running an Azure Webjob to resolve the MSOID names.

Azure Container Instances
Azure Container Instances
An Azure service that provides customers with a serverless container experience.
672 questions
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,659 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,393 questions
{count} votes

Accepted answer
  1. prmanhas-MSFT 17,901 Reputation points Microsoft Employee

    @FernandoLeitzelar-0895 Apologies for the delay in response.

    One of the way to avoid the problem of setting hostname manually is to use Azure DNS. You can create an azure DNS entry for specific private network (with entries which you are creating on the host directly) and then associate the azure Web jobs to this private network.

    Using this mechanism, you can avoid creating DNS entries and manage the entries from central place.

    Web jobs when run in these private network would use the DNS entries configured to fetch the DNS mapping. You can read more about azure DNS here

    Hope this helps.

    Please 'Accept as answer' if it helped, so that it can help others in the community looking for help on similar topics.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful