web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Execution of scripts was prohibited. Use the XsltSettings.EnableScript property to enable it

(0) ShareShare
ReportReport
Posted on by 197

Hi All,

I am facing error as "Execution of scripts was prohibited. Use the XsltSettings.EnableScript property to enable it " while applying tranforms for a data entity in Data Mangement.Debugged the process issue is triggering in the DMFXsltTransform class.

6036.pastedimage1587565193690v1.png

static public void transformFile(DMFLocalFilePath inputFilePath, DMFLocalFilePath outputFilePath, str xsltString)
    {
        System.Xml.XmlUrlResolver resolver;
        System.Xml.Xsl.XsltSettings managedSettings;
        System.Xml.Xsl.XslCompiledTransform managedTransform;
        boolean scriptingEnabled = DMFFlights::DMFXsltEnableScript();   
        managedSettings = new System.Xml.Xsl.XsltSettings(scriptingEnabled, scriptingEnabled);
        resolver = new System.Xml.XmlUrlResolver();

        managedTransform = new System.Xml.Xsl.XslCompiledTransform();
        
        // Initialize reader for the xslt
        using(System.IO.StringReader xsltStringReader = new System.IO.StringReader(xsltString))
        {
            using(System.Xml.XmlReader xsltXmlReader = System.Xml.XmlReader::Create(xsltStringReader))
            {
                // Load xslt
                managedTransform.Load(xsltXmlReader, managedSettings, resolver);

                using(System.Xml.XmlReader inputFileXmlReader = System.Xml.XmlReader::Create(inputFilePath))
                {
                    using(System.Xml.XmlWriter outputWriter = System.Xml.XmlWriter::Create(outputFilePath))
                    {
                        // Transform
                        managedTransform.Transform(inputFileXmlReader, outputWriter);-- facing Issue at this point
                        outputWriter.Flush();
                    }
                }
            }
        }
    }

Can anyone please help me to resolve the issue.

Regards,

Swetha.

I have the same question (0)
  • Martin Dráb Profile Picture
    239,634 Most Valuable Professional on at

    What is the value of scriptingEnabled variable?

    By the way, I moved the question here from the AX forum.

  • Sergei Minozhenko Profile Picture
    23,097 on at

    Hi, What version are you using?

    There is new fix fix.lcs.dynamics.com/.../Details

    Potential security vulnerability: XSLT transform running script

    DMFXsltTransform has a method transformFile() in which we are using XsltSettings with ScriptEnabled set to True. Because of this a hacker can put random script in the xml file and let the system run it.

    For me, it sounds like scripts will be disabled anyway.

  • Swetha Molagavalli Profile Picture
    197 on at

    Hi Martin,

    Thank you for moving the question to D365 forum.

    Value for scriptingEnabled variable is false.

    Regards,

    Swetha.

  • Swetha Molagavalli Profile Picture
    197 on at

    Hi Sergei,

    I am using version 10.0.10.

    Is there any chance of enabling the script?

    Regards,

    Swetha.

  • Suggested answer
    Sergei Minozhenko Profile Picture
    23,097 on at

    Hi,

    According to the code above, it's activated by flight DMFXsltEnableScript

    There is also description how to enable flight and some clarification about DMFXsltEnableScript

    docs.microsoft.com/.../data-entities-data-packages

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 802

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 636 Super User 2026 Season 1

#3
Subra Profile Picture

Subra 534

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans