การแก้ปัญหาเกี่ยวกับรันไทม์ของนโยบาย XMLThreatProtection

คุณกำลังดูเอกสารประกอบของ Apigee Edge
ไปที่เอกสารประกอบของ Apigee X
ข้อมูล

ExecutionFailed

รหัสข้อผิดพลาด

steps.xmlthreatprotection.ExecutionFailed

เนื้อหาการตอบกลับข้อผิดพลาด

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition policy_name:
        Execution failed. Reason: error_description at line line_num
        (possibly around char char_num)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

ตัวอย่างเนื้อหาการตอบกลับข้อผิดพลาด

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: Premature end of document while parsing at line 5(possibly  around char 0)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

ประเภทของข้อผิดพลาดและสาเหตุที่เป็นไปได้

นโยบาย XMLThreatProtection อาจแสดงข้อผิดพลาด ExecutionFailed หลายประเภท ตารางด้านล่างแสดงรายการข้อผิดพลาดประเภทต่างๆ และสาเหตุที่เป็นไปได้

ข้อผิดพลาด สาเหตุ
ElementNameExceeded เกินความยาวสตริงสูงสุดที่อนุญาตในแท็ก XML
ChildCountExceeded องค์ประกอบย่อยเกินจำนวนสูงสุดที่อนุญาตในเพย์โหลด XML
NodeDepthExceeded องค์ประกอบ XML เกินจำนวนสูงสุดที่อนุญาตในเพย์โหลด XML
AttributeCountExceeded แอตทริบิวต์ในองค์ประกอบเดียวมีเกินจำนวนสูงสุด
AttributeNameExceeded ชื่อแอตทริบิวต์มีความยาวเกินขีดจำกัดที่กำหนด
AttributeValueExceeded เกินความยาวสูงสุดของค่าแอตทริบิวต์
TextExceeded เกินความยาวสูงสุดที่อนุญาตสำหรับข้อความ
CommentExceeded ความคิดเห็นมีความยาวเกินความยาวสูงสุด
PIDataExceeded ข้อมูลวิธีการประมวลผลที่อนุญาตมีความยาวเกินที่อนุญาต
PITargetExceeded ชื่อคำสั่งกระบวนการมีความยาวเกินกำหนด
NSURIExceeded เกินความยาวของ URL ของเนมสเปซ
NSPrefixExceeded คำนำหน้าเนมสเปซยาวเกินไป
NSCountExceeded มีการใช้พื้นที่ชื่อในองค์ประกอบเดียวเกินจำนวนสูงสุดแล้ว
เพย์โหลด XML ไม่ถูกต้อง เพย์โหลด XML ที่ป้อนไม่ถูกต้อง

ElementNameExceeded

รหัสข้อผิดพลาด

steps.xmlthreatprotection.ExecutionFailed

เนื้อหาการตอบกลับข้อผิดพลาด

การจราจรของข้อมูลรันไทม์แสดงโค้ดตอบกลับ 500 พร้อมข้อผิดพลาดต่อไปนี้

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition policy_name:
        Execution failed. reason: XMLThreatProtection stepDefinition policy_name:
        Element name length exceeded num at line line_num(possibly
        around char char_num)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

ตัวอย่างเนื้อหาการตอบกลับข้อผิดพลาด

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Element name length exceeded 5 at line 1(possibly around char 9)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

สาเหตุ

ข้อผิดพลาดนี้เกิดขึ้นหากเพย์โหลดอินพุตที่ระบุโดยองค์ประกอบ <Source> ของนโยบายมีองค์ประกอบ XML ที่เกินความยาวสูงสุดที่ระบุไว้ในองค์ประกอบ <Element> ภายใต้องค์ประกอบ <NameLimits>

ตัวอย่างเช่น หากระบุองค์ประกอบ <Element> เป็น 5 ในนโยบาย XMLThreatProtection แต่เพย์โหลดอินพุตมีองค์ประกอบที่มีอักขระมากกว่า 5 ตัว ระบบจะแสดงข้อผิดพลาดนี้

การวินิจฉัย

  1. ตรวจสอบข้อความแสดงข้อผิดพลาดเพื่อระบุชื่อนโยบาย XMLThreatProtection, หมายเลขบรรทัด และจำนวนอักขระที่เป็นไปได้ในเพย์โหลดอินพุตที่เกินความยาวขององค์ประกอบ

    ตัวอย่างเช่น ในข้อความแสดงข้อผิดพลาดต่อไปนี้ ชื่อนโยบายคือ XML-Threat-Protection-1,หมายเลขบรรทัดในเพย์โหลดคือ 1 และจำนวนอักขระที่เป็นไปได้คือ 9.

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Element name
    length exceeded 5 at line 1(possibly around char 9)
    
  2. ตรวจสอบนโยบายที่ล้มเหลว (ระบุในขั้นตอนที่ 1) และจดบันทึกค่าที่ระบุในองค์ประกอบ <Element>

    ตัวอย่างเช่น ในนโยบาย XMLThreatProtection ต่อไปนี้มีการตั้งค่า <Element> เป็น 5

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>5</Element>
            <Attribute>5</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>request</Source>
        <StructureLimits>
            <NodeDepth>5</NodeDepth>
            <AttributeCountPerElement>2</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>15</Text>
            <Attribute>10</Attribute>
            <NamespaceURI>10</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>10</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    
  3. ตรวจสอบหมายเลขบรรทัดเฉพาะ (ระบุในขั้นตอนที่ 1) ของเพย์โหลดอินพุต แล้วตรวจสอบว่าความยาวขององค์ประกอบในบรรทัดนั้นมากกว่าค่าที่ระบุสำหรับองค์ประกอบ <Element> (ระบุในขั้นตอนที่ 2) หรือไม่ หากความยาวขององค์ประกอบเกินค่านี้ แสดงว่าเป็นสาเหตุของข้อผิดพลาด

    ต่อไปนี้เป็นตัวอย่างเพย์โหลดอินพุต

    <company>
      <name>Google</name>
      <country>USA</country>
    </company>
    

    เปย์โหลด XML ที่แสดงด้านบนมีองค์ประกอบรากชื่อ company ที่บรรทัดที่ 1 ซึ่งมี 7 อักขระ เนื่องจากความยาวขององค์ประกอบมากกว่า 5 (ค่าที่ระบุสำหรับองค์ประกอบ <Element>) คุณจึงได้รับข้อผิดพลาดต่อไปนี้

    XML-Threat-Protection-1: Execution failed. reason: XMLThreatProtection stepDefinition
    XML-Threat-Protection-1: Element name length exceeded 5 at line 1(possibly around char 9)
    

ความละเอียด

หากนโยบาย XMLThreadProtection มีไว้เพื่อป้องกันเพย์โหลดที่มีชื่อองค์ประกอบเกินค่าที่กำหนดไว้ ก็คาดว่าจะมีข้อความแสดงข้อผิดพลาด ในกรณีนี้ คุณไม่จำเป็นต้องดำเนินการใดๆ เพิ่มเติม

อย่างไรก็ตาม หากคุณทราบว่าสามารถระบุองค์ประกอบที่ยาวขึ้นได้ในเพย์โหลดโดยไม่มีผลกระทบใดๆ ให้แก้ไข <Element> เป็นค่าที่เหมาะสมตามข้อกำหนดของคุณ

ตัวอย่างเช่น หากคิดว่าคุณสามารถอนุญาตองค์ประกอบได้ไม่เกิน 10 รายการ ให้แก้ไขนโยบาย XMLThreatProtection ดังนี้

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>5</Attribute>
        <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>5</NodeDepth>
        <AttributeCountPerElement>2</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>15</Text>
        <Attribute>10</Attribute>
        <NamespaceURI>10</NamespaceURI>
        <Comment>10</Comment>
        <ProcessingInstructionData>10</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>

ChildCountExceeded

รหัสข้อผิดพลาด

steps.xmlthreatprotection.ExecutionFailed

เนื้อหาการตอบกลับข้อผิดพลาด

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition policy_name:
        Execution failed. reason: XMLThreatProtection stepDefinition policy_name:
        Children count exceeded num at line  num(possibly
        around char num)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

ตัวอย่างเนื้อหาการตอบกลับข้อผิดพลาด

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Children count exceeded 3 at line 5(possibly around char 89)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

สาเหตุ

ข้อผิดพลาดนี้เกิดขึ้นหากเพย์โหลดของข้อความอินพุตที่ระบุโดยองค์ประกอบ <Source> มีองค์ประกอบ XML ที่มีองค์ประกอบย่อยมากกว่าค่าที่ระบุในองค์ประกอบ <ChildCount> ของนโยบาย

ตัวอย่างเช่น หากองค์ประกอบ <ChildCount> คือ 3 แต่เพย์โหลด XML ของอินพุตมีองค์ประกอบที่มีองค์ประกอบย่อยมากกว่า 3 รายการ ระบบจะแสดงข้อผิดพลาดนี้

การวินิจฉัย

  1. ตรวจสอบข้อความแสดงข้อผิดพลาดเพื่อระบุชื่อนโยบาย XMLThreatProtection และหมายเลขบรรทัดที่มีรายการเกินจำนวน เช่น ชื่อนโยบายคือ XML-Threat-Protection-1 และหมายเลขบรรทัดในเพย์โหลดคือ 5 ในข้อความแสดงข้อผิดพลาดต่อไปนี้

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Children
    count exceeded 3 at line 5(possibly around char 89)"
    
  2. ตรวจสอบนโยบายที่ล้มเหลว (ระบุในขั้นตอนที่ 1) และจดบันทึกค่าที่ระบุในองค์ประกอบ <ChildCount>

    ในตัวอย่างนโยบายต่อไปนี้ <ChildCount> ได้รับการตั้งค่าเป็น 3(โปรดทราบว่าความคิดเห็น การรวมองค์ประกอบ และอื่นๆ จะนับรวมอยู่ในขีดจำกัดนี้)

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>5</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
            <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>request</Source>
        <StructureLimits>
            <NodeDepth>5</NodeDepth>
            <AttributeCountPerElement>2</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>15</Text>
            <Attribute>10</Attribute>
            <NamespaceURI>10</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>10</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    
  3. ตรวจสอบหมายเลขบรรทัดเฉพาะ (ระบุในขั้นตอนที่ 1) ของเพย์โหลดอินพุต และตรวจสอบว่าจำนวนองค์ประกอบย่อย (รวมถึงความคิดเห็นทั้งหมด ฯลฯ) ในเพย์โหลดมีค่ามากกว่าค่าที่ระบุสำหรับองค์ประกอบ <ChildCount> (ระบุในขั้นตอนที่ 2) หรือไม่ หากจำนวนองค์ประกอบย่อยเกินจำนวนย่อย นั่นจะเป็นสาเหตุของข้อผิดพลาด

    ต่อไปนี้เป็นตัวอย่างเพย์โหลดอินพุต

    <movie>
      <title>Jurassic Park</title>
      <language>English</language>
      <country>USA</country>
      <director>Steven Spielberg</director>
    </movie>
    

    ในเพย์โหลด XML ที่แสดงด้านบน บรรทัดที่ 5 มีองค์ประกอบย่อยที่ 4 <director>ขององค์ประกอบราก <movie> เนื่องจากจำนวนองค์ประกอบย่อยในเปย์โหลด XML อินพุตมากกว่า 3 (ค่าที่ระบุสำหรับองค์ประกอบ <ChildCount>) คุณจึงได้รับข้อผิดพลาดต่อไปนี้

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Children
    count exceeded 3 at line 5(possibly around char 89)
    

ความละเอียด

หากนโยบาย XMLThreatProtection มีไว้เพื่อป้องกันเพย์โหลดที่มีจำนวนองค์ประกอบย่อยเกินเกณฑ์ที่เจาะจง คุณจะเห็นข้อความแสดงข้อผิดพลาด ในกรณีนี้ คุณไม่จำเป็นต้องดำเนินการใดๆ เพิ่มเติม

อย่างไรก็ตาม หากคุณพิจารณาว่าสามารถรวมองค์ประกอบย่อย (รวมถึงความคิดเห็น ฯลฯ) จำนวนมากไว้ในเพย์โหลดได้โดยไม่มีผลใดๆ ให้แก้ไข <ChildCount> เป็นค่าที่เหมาะสมโดยอิงตามข้อกำหนดของคุณ

ตัวอย่างเช่น หากคิดว่ามีการจำกัดองค์ประกอบย่อยได้สูงสุด 10 รายการ ให้แก้ไขนโยบาย XMLThreatProtection ดังนี้

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>5</Attribute>
        <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>5</NodeDepth>
        <AttributeCountPerElement>2</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">10</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>15</Text>
        <Attribute>10</Attribute>
        <NamespaceURI>10</NamespaceURI>
        <Comment>10</Comment>
        <ProcessingInstructionData>10</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>

NodeDepthExceeded

รหัสข้อผิดพลาด

steps.xmlthreatprotection.ExecutionFailed

เนื้อหาการตอบกลับข้อผิดพลาด

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition [policy_name]:
        Execution failed. reason: XMLThreatProtection stepDefinition [policy_name]:
        Node depth exceeded [num] at line [num](possibly around
        char [num])",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

ตัวอย่างเนื้อหาการตอบกลับข้อผิดพลาด

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Node depth exceeded 5 at line 6(possibly around char 110)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

สาเหตุ

ข้อผิดพลาดนี้จะเกิดขึ้นหากเพย์โหลดของข้อความอินพุตที่ระบุโดยองค์ประกอบ <Source> มีเอกสาร XML ที่ลำดับชั้นของโหนดเกินจำนวนที่ระบุไว้ในองค์ประกอบ <NodeDepth> ของนโยบาย XMLThreatProtection

ตัวอย่างเช่น หากระบุองค์ประกอบ <NodeDepth> เป็น 4 ในนโยบาย แต่เพย์โหลดอินพุตมีความลึกของโหนดเกิน 4 ระบบจะแสดงข้อผิดพลาดนี้

การวินิจฉัย

  1. ตรวจสอบข้อความแสดงข้อผิดพลาดเพื่อระบุชื่อนโยบาย XMLThreatProtection และหมายเลขบรรทัดที่มีความลึกของโหนดเกินขีดจำกัด เช่น ชื่อนโยบายคือ XML-Threat-Protection-1 และหมายเลขบรรทัดในเพย์โหลดคือ 6 ในข้อความแสดงข้อผิดพลาดต่อไปนี้

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Node depth
    exceeded 5 at line 6(possibly around char 109)
    
  2. ตรวจสอบนโยบาย XMLThreatProtection ที่ล้มเหลว (ระบุในขั้นตอนที่ 1) และบันทึกค่าที่ระบุในองค์ประกอบ <NodeDepth>

    ในตัวอย่างนโยบาย XMLThreatProtection ต่อไปนี้ มีการตั้งค่า <NodeDepth> เป็น 5

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>5</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
            <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>request</Source>
        <StructureLimits>
            <NodeDepth>5</NodeDepth>
            <AttributeCountPerElement>2</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>15</Text>
            <Attribute>10</Attribute>
            <NamespaceURI>10</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>10</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    
  3. ตรวจสอบหมายเลขบรรทัดเฉพาะ (ระบุในขั้นตอนที่ 1) ของเพย์โหลดอินพุต และตรวจสอบว่าความลึกของโหนดที่ระบุมีจำนวนสูงกว่าตัวเลขที่ระบุในองค์ประกอบ <NodeDepth> (ระบุในขั้นตอนที่ 2) หรือไม่ หากระดับขององค์ประกอบย่อย XML เกินจำนวน นั่นเป็นสาเหตุของข้อผิดพลาด

    ต่อไปนี้เป็นตัวอย่างเพย์โหลดอินพุต

    <hellos>
       <hello1>
           <wave1>
                <wave2>
                    <wave3>
                        <wave4>
                           <wave5>wave</wave5>
                        </wave4>
                    </wave3>
                </wave2>
           </wave1>
       </hello1>
       <hello2>world2</hello2>
       <hello3>world3</hello3>
       <hello4>world4</hello4>
       <hello5>world5</hello5>
       <hello6>world6</hello6>
    </hellos>
    

    เพย์โหลด XML ที่แสดงด้านบนที่บรรทัดที่ 6 มีความลึกของโหนดเป็น 6.เนื่องจากความลึกของโหนดมากกว่า 5 (ค่าที่ระบุสำหรับองค์ประกอบ <NodeDepth>) คุณจึงได้รับข้อผิดพลาดต่อไปนี้

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Node depth
    exceeded 5 at line 6(possibly around char 109)
    

ความละเอียด

หากนโยบาย XMLThreatProtection มีไว้เพื่อป้องกันเพย์โหลดที่มีเกณฑ์ความลึกของโหนดที่เฉพาะเจาะจง ข้อความแสดงข้อผิดพลาดก็อาจเกิดขึ้นได้ ในกรณีนี้ คุณไม่จำเป็นต้องดำเนินการใดๆ เพิ่มเติม

อย่างไรก็ตาม หากคุณอนุญาตให้ใช้ความลึกของโหนดได้มากขึ้น ให้แก้ไข <NodeDepth> เป็นค่าที่เหมาะสมตามความต้องการของคุณ

ตัวอย่างเช่น หากคุณคิดว่าคุณสามารถอนุญาตความลึกของโหนดได้สูงสุด 10 รายการ ให้แก้ไขนโยบายดังนี้

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>5</Attribute>
        <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>10</NodeDepth>
        <AttributeCountPerElement>2</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>15</Text>
        <Attribute>10</Attribute>
        <NamespaceURI>10</NamespaceURI>
        <Comment>10</Comment>
        <ProcessingInstructionData>10</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>

AttributeCountExceeded

รหัสข้อผิดพลาด

steps.xmlthreatprotection.ExecutionFailed

เนื้อหาการตอบกลับข้อผิดพลาด

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition [policy_name]:
        Execution failed. reason: XMLThreatProtection stepDefinition [policy_name]:
        Attribute count exceeded [num] at line [num](possibly around
        char [num])",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

ตัวอย่างเนื้อหาการตอบกลับข้อผิดพลาด

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Attribute count exceeded 2 at line 3(possibly around char 105)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

สาเหตุ

ข้อผิดพลาดนี้เกิดขึ้นหากเพย์โหลดของข้อความอินพุตที่ระบุโดยองค์ประกอบ <Source> ของนโยบาย XMLThreatProtection มีเอกสาร XML ที่จำนวนแอตทริบิวต์ขององค์ประกอบเดียวเกินจำนวนที่ระบุไว้ในองค์ประกอบ <AttributeCountPerElement> ของนโยบาย

ตัวอย่างเช่น หากระบุองค์ประกอบ <AttributeCountPerElement> เป็น 2 ในนโยบาย XMLThreatProtection แต่เพย์โหลดอินพุตมีองค์ประกอบที่มีแอตทริบิวต์มากกว่า 2 รายการ ระบบจะแสดงข้อผิดพลาดนี้

การวินิจฉัย

  1. ตรวจสอบข้อความแสดงข้อผิดพลาดเพื่อระบุชื่อนโยบาย XMLThreatProtection และหมายเลขบรรทัดที่มีแอตทริบิวต์เกินจำนวนสูงสุด เช่น ชื่อนโยบายคือ XMLThreat-Protection-1 และหมายเลขบรรทัดในเพย์โหลดคือ 3 ในข้อความแสดงข้อผิดพลาดต่อไปนี้

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Attribute
    count exceeded 2 at line 3(possibly around char 105)
    
  2. ตรวจสอบนโยบายที่ล้มเหลว (ระบุในขั้นตอนที่ 1) และจดบันทึกค่าที่ระบุในองค์ประกอบ <AttributeCountPerElement>

    ในตัวอย่างนโยบายต่อไปนี้ <AttributeCountPerElement> ได้รับการตั้งค่าเป็น 2

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>5</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
            <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>request</Source>
        <StructureLimits>
            <NodeDepth>10</NodeDepth>
            <AttributeCountPerElement>2</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>15</Text>
            <Attribute>10</Attribute>
            <NamespaceURI>10</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>10</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    
  3. ตรวจสอบหมายเลขบรรทัดเฉพาะ (ระบุในขั้นตอนที่ 1) ของเพย์โหลดอินพุต และตรวจสอบว่าจำนวนแอตทริบิวต์ที่ระบุเกินจำนวนที่ระบุไว้ในองค์ประกอบ <AttributeCountPerElementh> (ระบุในขั้นตอนที่ 2) หรือไม่ หากแอตทริบิวต์มีจำนวนเกินขีดจำกัด นั่นเป็นสาเหตุของข้อผิดพลาด

    ต่อไปนี้เป็นตัวอย่างเพย์โหลดอินพุต

    <?xml version="1.0" encoding="UTF-8"?>
    <bookstore>
      <book category="cooking" cuisine="Indian" lang="en">
        <title>Easy Indian Cooking</title>
        <author>Suneeta</author>
        <year>2004</year>
        <price>300.00</price>
      </book>
    </bookstore>
    

    เพย์โหลด XML ที่แสดงด้านบนในบรรทัดที่ 3 มีองค์ประกอบที่มีแอตทริบิวต์ 3 รายการ เนื่องจากจำนวนแอตทริบิวต์มากกว่า 2 (ค่าที่ระบุสำหรับองค์ประกอบ <AttributeCountPerElement>) คุณจึงได้รับข้อผิดพลาดต่อไปนี้

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Attribute
    count exceeded 2 at line 3(possibly around char 105)
    

ความละเอียด

หากนโยบาย XMLThreatProtection มีไว้เพื่อป้องกันเพย์โหลดที่มีแอตทริบิวต์เกินจำนวนที่กำหนด คุณจะเห็นข้อความแสดงข้อผิดพลาด ในกรณีนี้ คุณไม่จำเป็นต้องดำเนินการใดๆ เพิ่มเติม

อย่างไรก็ตาม หากพิจารณาแล้วว่าคุณอนุญาตให้ใช้แอตทริบิวต์ที่มีจำนวนมากกว่าที่กำหนดได้ ให้แก้ไข <AttributeCountPerElement> เป็นค่าที่เหมาะสมโดยอิงตามข้อกำหนดของคุณ

ตัวอย่างเช่น หากคุณคิดว่าคุณสามารถอนุญาตจำนวนแอตทริบิวต์ต่อองค์ประกอบได้สูงสุด 5 รายการ ให้แก้ไขนโยบายดังนี้

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>5</Attribute>
        <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>10</NodeDepth>
        <AttributeCountPerElement>5</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>15</Text>
        <Attribute>10</Attribute>
        <NamespaceURI>10</NamespaceURI>
        <Comment>10</Comment>
        <ProcessingInstructionData>10</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>

AttributeNameExceeded

รหัสข้อผิดพลาด

steps.xmlthreatprotection.ExecutionFailed

เนื้อหาการตอบกลับข้อผิดพลาด

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition [policy_name]:
        Execution failed. reason: XMLThreatProtection stepDefinition [policy_name]:
        Attribute name length exceeded [num] at line [num](possibly around char [num])",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

ตัวอย่างเนื้อหาการตอบกลับข้อผิดพลาด

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Attribute name length exceeded 5 at line 3(possibly around char 105)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

สาเหตุ

ข้อผิดพลาดนี้จะเกิดขึ้นหากเพย์โหลดของข้อความอินพุตที่ระบุโดยองค์ประกอบ <Source> ของนโยบาย XMLThreatProtection มีเอกสาร XML ที่ชื่อแอตทริบิวต์มีอักขระเกินจำนวนสูงสุดที่ระบุไว้ในองค์ประกอบย่อย <Attribute> ขององค์ประกอบ <NameLimits> ของนโยบาย

ตัวอย่างเช่น หากระบุองค์ประกอบ <Attribute> เป็น 5 ในนโยบาย แต่เพย์โหลดอินพุตมีชื่อแอตทริบิวต์ที่มีมากกว่า 5 อักขระ ระบบจะแสดงข้อผิดพลาดนี้

การวินิจฉัย

  1. ตรวจสอบข้อความแสดงข้อผิดพลาดเพื่อระบุชื่อนโยบาย XMLThreatProtection และหมายเลขบรรทัดที่มีความยาวของชื่อแอตทริบิวต์เกินกำหนด เช่น ชื่อนโยบายคือ XML-Threat-Protection-1 และหมายเลขบรรทัดในเพย์โหลดคือ 3 ในข้อความแสดงข้อผิดพลาดต่อไปนี้

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Attribute
    name length exceeded 5 at line 3(possibly around char 105)
    
  2. ตรวจสอบนโยบายที่ล้มเหลว (ระบุในขั้นตอนที่ 1) และจดบันทึกค่าที่ระบุในองค์ประกอบ <Attribute>

    ในตัวอย่างนโยบาย XMLThreatProtection ต่อไปนี้ มีการตั้งค่า <Attribute> เป็น 5

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>5</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
            <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>request</Source>
        <StructureLimits>
            <NodeDepth>10</NodeDepth>
            <AttributeCountPerElement>2</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>15</Text>
            <Attribute>10</Attribute>
            <NamespaceURI>10</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>10</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    
  3. ตรวจสอบหมายเลขบรรทัดเฉพาะ (ระบุในขั้นตอนที่ 1) ของเพย์โหลดอินพุต แล้วตรวจสอบว่าความยาวของแอตทริบิวต์ที่ระบุมีอักขระมากกว่าตัวเลขที่ระบุในองค์ประกอบ <Attribute> (ระบุในขั้นตอนที่ 2) หรือไม่ หากจำนวนอักขระเกินกว่าค่าแอตทริบิวต์ แสดงว่าเป็นสาเหตุของข้อผิดพลาด

    ต่อไปนี้เป็นตัวอย่างเพย์โหลดอินพุต

    <?xml version="1.0" encoding="UTF-8"?>
    <bookstore>
      <book category="cooking" cuisine="Indian" lang="en">
        <title>Easy Indian Cooking</title>
        <author>Suneeta</author>
        <year>2004</year>
        <price>300.00</price>
      </book>
    </bookstore>
    

    เพย์โหลด XML ที่แสดงด้านบนมีแอตทริบิวต์ 2 รายการ ได้แก่ category และ cuisine โดยมีความยาวของชื่อเป็น 8 และ 7 อักขระตามลำดับ. เนื่องจากชื่อแอตทริบิวต์มีความยาวมากกว่า 5 (ค่าที่ระบุสำหรับองค์ประกอบ <Attribute>) คุณจึงได้รับข้อผิดพลาดต่อไปนี้

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Attribute
    name length exceeded 5 at line 3(possibly around char 105)
    

ความละเอียด

หากนโยบาย XMLThreatProtection มีไว้เพื่อป้องกันเพย์โหลดที่เกินความยาวชื่อแอตทริบิวต์ที่เจาะจง ข้อความแสดงข้อผิดพลาดจะปรากฎขึ้น ในกรณีนี้ คุณไม่จำเป็นต้องดำเนินการใดๆ เพิ่มเติม

แต่หากคุณกำหนดว่าชื่อแอตทริบิวต์ที่ยาวขึ้นนั้นยาวขึ้นได้ ให้แก้ไข <Attribute> เป็นค่าที่เหมาะสมตามข้อกำหนดของคุณ

ตัวอย่างเช่น หากคุณคิดว่าคุณสามารถตั้งชื่อแอตทริบิวต์ได้สูงสุด 10 อักขระ ให้แก้ไขนโยบายดังนี้

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>10</Attribute>
        <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>10</NodeDepth>
        <AttributeCountPerElement>5</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>15</Text>
        <Attribute>10</Attribute>
        <NamespaceURI>10</NamespaceURI>
        <Comment>10</Comment>
        <ProcessingInstructionData>10</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>

AttributeValueExceeded

รหัสข้อผิดพลาด

steps.xmlthreatprotection.ExecutionFailed

เนื้อหาการตอบกลับข้อผิดพลาด

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition [policy_name]: Execution failed. reason: XMLThreatProtection stepDefinition [policy_name]:  Attribute value length exceeded [num] at line [num](possibly around char [num])",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

ตัวอย่างเนื้อหาการตอบกลับข้อผิดพลาด

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Attribute value length exceeded 10 at line 3(possibly around char 111)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

สาเหตุ

ข้อผิดพลาดนี้เกิดขึ้นหากเพย์โหลดของข้อความอินพุตที่ระบุโดยองค์ประกอบ <Source> ของนโยบายมีเอกสาร XML ที่ค่าแอตทริบิวต์เกินจำนวนอักขระที่ระบุไว้ในองค์ประกอบย่อย <Attribute> ขององค์ประกอบ <ValueLimits>

ตัวอย่างเช่น หากระบุองค์ประกอบ <Attribute> เป็น 10 ในนโยบาย XMLThreatProtection แต่เพย์โหลดอินพุตมีค่าแอตทริบิวต์ที่มีอักขระมากกว่า 10 ตัว ระบบจะแสดงข้อผิดพลาดนี้

การวินิจฉัย

  1. ตรวจสอบข้อความแสดงข้อผิดพลาดเพื่อระบุชื่อนโยบาย XMLThreatProtection และหมายเลขบรรทัดที่มีแอตทริบิวต์เกินจำนวนสูงสุด เช่น ชื่อนโยบายคือ XML-Threat-Protection-1 และหมายเลขบรรทัดในเพย์โหลดคือ 3 ในข้อความแสดงข้อผิดพลาดต่อไปนี้

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Attribute
    value length exceeded 10 at line 3(possibly around char 111)
    
  2. ตรวจสอบนโยบายที่ล้มเหลว (ระบุในขั้นตอนที่ 1) และจดบันทึกค่าที่ระบุในองค์ประกอบย่อย <Attribute> ขององค์ประกอบ <ValueLimits>

    ในตัวอย่างนโยบาย XMLThreatProtection ต่อไปนี้ <Attribute> ได้รับการตั้งค่าเป็น 10

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>5</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
            <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>request</Source>
        <StructureLimits>
            <NodeDepth>10</NodeDepth>
            <AttributeCountPerElement>2</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>15</Text>
            <Attribute>10</Attribute>
            <NamespaceURI>10</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>10</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    
  3. ตรวจสอบหมายเลขบรรทัดเฉพาะ (ระบุในขั้นตอนที่ 1) ของเพย์โหลดอินพุต แล้วตรวจสอบว่าความยาวของค่าแอตทริบิวต์ที่ระบุมีอักขระมากกว่าตัวเลขที่ระบุในองค์ประกอบ <Attribute> (ระบุในขั้นตอนที่ 2) หรือไม่ หากจำนวนอักขระเกินกว่าค่าแอตทริบิวต์ แสดงว่าเป็นสาเหตุของข้อผิดพลาด

    ต่อไปนี้เป็นตัวอย่างเพย์โหลดอินพุต

    <?xml version="1.0" encoding="UTF-8"?>
    <bookstore>
      <book category="cooking" cuisine="South Indian" lang="en">
        <title>Easy Indian Cooking</title>
        <author>Suneeta</author>
        <year>2004</year>
        <price>300.00</price>
      </book>
    </bookstore>
    

    เพย์โหลด XML ที่แสดงด้านบนในบรรทัดที่ 3 มีแอตทริบิวต์ (ประเภทอาหาร) ที่มีความยาวของค่า 12 อักขระ เนื่องจากความยาวของค่าแอตทริบิวต์มากกว่า 10 (ค่าที่ระบุสำหรับองค์ประกอบ <Attribute>) คุณจึงได้รับข้อผิดพลาดต่อไปนี้

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Attribute
    value length exceeded 10 at line 3(possibly around char 111)
    

ความละเอียด

หากนโยบาย XMLThreatProtection มีไว้เพื่อป้องกันเพย์โหลดที่เกินความยาวของค่าแอตทริบิวต์ที่เจาะจง คุณจะเห็นข้อความแสดงข้อผิดพลาด ในกรณีนี้ คุณไม่จำเป็นต้องดำเนินการใดๆ เพิ่มเติม

อย่างไรก็ตาม หากคุณกำหนดว่าอนุญาตให้ใช้ค่าแอตทริบิวต์ที่ยาวกว่าได้ ให้แก้ไข <Attribute>องค์ประกอบย่อยขององค์ประกอบ <ValueLimits> ให้เป็นค่าที่เหมาะสมตามข้อกำหนดของคุณ

ตัวอย่างเช่น หากคุณคิดว่าคุณสามารถระบุแอตทริบิวต์ได้สูงสุด 15 อักขระ ให้แก้ไขนโยบายดังนี้

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>10</Attribute>
        <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>10</NodeDepth>
        <AttributeCountPerElement>5</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>15</Text>
        <Attribute>15</Attribute>
        <NamespaceURI>10</NamespaceURI>
        <Comment>10</Comment>
        <ProcessingInstructionData>10</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>

TextExceeded

รหัสข้อผิดพลาด

steps.xmlthreatprotection.ExecutionFailed

เนื้อหาการตอบกลับข้อผิดพลาด

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition [policy_name]: Execution failed. reason: XMLThreatProtection stepDefinition [policy_name]:  Text length exceeded [num] at line [num](possibly around char [num])",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

ตัวอย่างเนื้อหาการตอบกลับข้อผิดพลาด

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Text length exceeded 15 at line 4(possibly around char 66)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }

สาเหตุ

ข้อผิดพลาดนี้จะเกิดขึ้นหากเพย์โหลดของข้อความอินพุตที่ระบุโดยองค์ประกอบ <Source> ของนโยบาย XMLThreatProtection มีเอกสาร XML ที่มีความยาวข้อความขององค์ประกอบเกินจำนวนอักขระที่ระบุไว้ในองค์ประกอบย่อย <Text> ขององค์ประกอบ <ValueLimits> ของนโยบาย

ตัวอย่างเช่น หากระบุองค์ประกอบ <Text> เป็น 15 ในนโยบาย แต่เพย์โหลดอินพุตมีข้อความมากกว่า 15 อักขระ ระบบก็จะแสดงข้อผิดพลาดนี้

การวินิจฉัย

  1. ตรวจสอบข้อความแสดงข้อผิดพลาดเพื่อระบุชื่อนโยบาย XMLThreatProtection และหมายเลขบรรทัดที่มีแอตทริบิวต์เกินจำนวนสูงสุด ตัวอย่างเช่น ชื่อนโยบายคือ XML-Threat-Protection-1 ในข้อความแสดงข้อผิดพลาดต่อไปนี้ และหมายเลขบรรทัดในเพย์โหลดคือ 4

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Text length
    exceeded 15 at line 4(possibly around char 66)
    
  2. ตรวจสอบนโยบายที่ล้มเหลว (ระบุในขั้นตอนที่ 1) และจดบันทึกค่าที่ระบุในองค์ประกอบย่อย <Text> ขององค์ประกอบ <ValueLimits>

    ในตัวอย่างนโยบาย XMLThreatProtection ต่อไปนี้ มีการตั้งค่า <Text> เป็น 15

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>5</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
            <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>request</Source>
        <StructureLimits>
            <NodeDepth>10</NodeDepth>
            <AttributeCountPerElement>2</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>15</Text>
            <Attribute>10</Attribute>
            <NamespaceURI>10</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>10</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    
  3. ตรวจสอบหมายเลขบรรทัดเฉพาะ (ระบุในขั้นตอนที่ 1) ของเพย์โหลดอินพุต แล้วตรวจสอบว่าความยาวของค่าแอตทริบิวต์ที่ระบุมีอักขระมากกว่าตัวเลขที่ระบุในองค์ประกอบ <Text> (ระบุในขั้นตอนที่ 2) หรือไม่ หากจำนวนอักขระเกินกว่าค่าแอตทริบิวต์ แสดงว่าเป็นสาเหตุของข้อผิดพลาด

    <food>
      <name>Veg Sandwich</name>
      <price>$5.95</price>
      <description>Vegetarian Sandwich with onions, tomatoes and lettuce</description>
      <calories>650</calories>
    </food>
    

    เพย์โหลด XML ที่แสดงด้านบนในบรรทัดที่ 4 มีข้อความที่มีความยาว 53 อักขระ เนื่องจากความยาวของค่าแอตทริบิวต์มากกว่า 15 (ค่าที่ระบุสำหรับองค์ประกอบ <Text>) คุณจึงได้รับข้อผิดพลาดต่อไปนี้

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Text length
    exceeded 15 at line 4(possibly around char 66)
    

ความละเอียด

หากนโยบาย XMLThreatProtection มีไว้เพื่อป้องกันเพย์โหลดที่เกินความยาวข้อความที่กำหนด ก็คาดว่าจะมีข้อความแสดงข้อผิดพลาด ในกรณีนี้ คุณไม่จำเป็นต้องดำเนินการใดๆ เพิ่มเติม

แต่หากคุณพิจารณาว่าอนุญาตให้ใช้ข้อความที่ยาวกว่าได้ ให้แก้ไข <Text>องค์ประกอบย่อยขององค์ประกอบ <ValueLimits> ให้เป็นค่าที่เหมาะสมตามข้อกำหนดของคุณ

ตัวอย่างเช่น หากคุณคิดว่าคุณสามารถมีค่าแอตทริบิวต์ได้สูงสุด 60 อักขระ ให้แก้ไขนโยบายดังนี้

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>10</Attribute>
        <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>10</NodeDepth>
        <AttributeCountPerElement>5</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>60</Text>
        <Attribute>15</Attribute>
        <NamespaceURI>10</NamespaceURI>
        <Comment>10</Comment>
        <ProcessingInstructionData>10</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>

CommentExceeded

รหัสข้อผิดพลาด

steps.xmlthreatprotection.ExecutionFailed

เนื้อหาการตอบกลับข้อผิดพลาด

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition [policy_name]:
        Execution failed. reason: XMLThreatProtection stepDefinition [policy_name]:
        Comment length exceeded [num] at line [num](possibly around char
        [num])",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

ตัวอย่างเนื้อหาการตอบกลับข้อผิดพลาด

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Comment length exceeded 10 at line 2(possibly around char 48)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

สาเหตุ

ข้อผิดพลาดนี้จะเกิดขึ้นหากเพย์โหลดของข้อความอินพุตที่ระบุโดยองค์ประกอบ <Source> ของนโยบาย XMLThreatProtection มีเอกสาร XML ที่มีความยาวของความคิดเห็นเกินจำนวนอักขระที่ระบุไว้ในองค์ประกอบย่อย <Comment> ขององค์ประกอบ <ValueLimits> ของนโยบาย

ตัวอย่างเช่น หากระบุองค์ประกอบ <Comment> เป็น 10 ในนโยบาย แต่เปย์โหลดอินพุตมีความคิดเห็นที่ยาวเกิน 10 อักขระ ระบบจะแสดงข้อผิดพลาดนี้

การวินิจฉัย

  1. ตรวจสอบข้อความแสดงข้อผิดพลาดเพื่อระบุชื่อนโยบาย XMLThreatProtection และหมายเลขบรรทัดที่มีความยาวเกิน เช่น ชื่อนโยบายคือ XML-Threat-Protection-1 และหมายเลขบรรทัดในเพย์โหลดคือ 2 ในข้อความแสดงข้อผิดพลาดต่อไปนี้

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Comment length exceeded 10 at line 2(possibly around char 48)
    
  2. ตรวจสอบนโยบายที่ล้มเหลว (ระบุในขั้นตอนที่ 1) และจดบันทึกค่าที่ระบุในองค์ประกอบย่อย <Comment> ขององค์ประกอบ <ValueLimits>

    ในตัวอย่างนโยบาย XMLThreatProtection ต่อไปนี้ มีการตั้งค่า <Comment> เป็น 10

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>5</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
            <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>request</Source>
        <StructureLimits>
            <NodeDepth>10</NodeDepth>
            <AttributeCountPerElement>2</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>15</Text>
            <Attribute>10</Attribute>
            <NamespaceURI>10</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>10</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    
  3. ตรวจสอบหมายเลขบรรทัดเฉพาะ (ระบุในขั้นตอนที่ 1) ของเพย์โหลดอินพุต และตรวจสอบว่าความยาวของความคิดเห็นที่ระบุมีอักขระมากกว่าตัวเลขที่ระบุในองค์ประกอบ <Comment> (ระบุในขั้นตอนที่ 2) หรือไม่ หากจำนวนอักขระเกินกว่าค่าแอตทริบิวต์ แสดงว่าเป็นสาเหตุของข้อผิดพลาด

    ต่อไปนี้เป็นตัวอย่างเพย์โหลดอินพุต

    <food>
      <!--This is somewhat a long comment-->
      <name>Veg Sandwich</name>
      <price>$5.95</price>
      <description>Vegetarian Sandwich with onions, tomatoes and lettuce</description>
      <calories>650</calories>
    </food>
    

    เพย์โหลด XML ที่แสดงด้านบนในบรรทัดที่ 2 มีความคิดเห็นที่มีความยาวของค่า 31 อักขระ. เนื่องจากความยาวของความคิดเห็นมีมากกว่า 10 (ค่าที่ระบุสำหรับองค์ประกอบ <Comment>) คุณจึงได้รับข้อผิดพลาดต่อไปนี้

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Comment length
    exceeded 10 at line 2(possibly around char 48)
    

ความละเอียด

หากนโยบาย XMLThreatProtection มีไว้เพื่อป้องกันเพย์โหลดที่เกินความยาวความคิดเห็นที่ระบุ ก็คาดว่าจะมีข้อความแสดงข้อผิดพลาด ในกรณีนี้ คุณไม่จำเป็นต้องดำเนินการใดๆ เพิ่มเติม

อย่างไรก็ตาม หากคิดว่าคุณอนุญาตให้ใช้ความคิดเห็นที่ยาวกว่านี้ได้ ให้แก้ไข<Comment>องค์ประกอบย่อยขององค์ประกอบ <ValueLimits> ให้เป็นค่าที่เหมาะสมโดยอิงตามข้อกำหนดของคุณ

ตัวอย่างเช่น หากคุณคิดว่าคุณสามารถระบุแอตทริบิวต์ได้สูงสุด 40 อักขระ ให้แก้ไขนโยบายดังนี้

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>10</Attribute>
        <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>10</NodeDepth>
        <AttributeCountPerElement>5</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>15</Text>
        <Attribute>15</Attribute>
        <NamespaceURI>10</NamespaceURI>
        <Comment>40</Comment>
        <ProcessingInstructionData>10</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>

PIDataExceeded

รหัสข้อผิดพลาด

steps.xmlthreatprotection.ExecutionFailed

เนื้อหาการตอบกลับข้อผิดพลาด

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition [policy_name]:
        Execution failed. reason: XMLThreatProtection stepDefinition [policy_name]:
        Processing Instruction data length exceeded [num] at line
        [num](possibly around char [num])",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

ตัวอย่างเนื้อหาการตอบกลับข้อผิดพลาด

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Processing Instruction data length exceeded 30 at line 2(possibly around char 109)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

สาเหตุ

ข้อผิดพลาดนี้จะเกิดขึ้นหากเพย์โหลดของข้อความอินพุตที่ระบุโดยองค์ประกอบ <Source> ของนโยบาย XMLThreatProtection มีเอกสาร XML ที่คำสั่งการประมวลผลข้อมูลมีอักขระเกินจำนวนสูงสุดที่ระบุไว้ในองค์ประกอบย่อย <ProcessingInstructionData> ขององค์ประกอบ <ValueLimits> ของนโยบาย

ตัวอย่างเช่น หากระบุองค์ประกอบ <ProcessingInstructionData> เป็น 10 ในนโยบาย XMLThreatProtection แต่เพย์โหลดอินพุตมีคำสั่งการประมวลผลที่มีอักขระมากกว่า 10 ตัว ระบบจะแสดงข้อผิดพลาดนี้

การวินิจฉัย

  1. ตรวจสอบข้อความแสดงข้อผิดพลาดเพื่อระบุชื่อนโยบาย XMLThreatProtection และหมายเลขบรรทัดที่มีความยาวของวิธีการประมวลผลเกินเกณฑ์ เช่น ชื่อนโยบายคือ XML-Threat-Protection-1 และหมายเลขบรรทัดในเพย์โหลดคือ 2 ในข้อความแสดงข้อผิดพลาดต่อไปนี้

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Processing
    Instruction data length exceeded 30 at line 2(possibly around char 109)
    
  2. ตรวจสอบนโยบายที่ล้มเหลว (ระบุในขั้นตอนที่ 1) และจดบันทึกค่าที่ระบุในองค์ประกอบย่อย <ProcessingInstructionData> ขององค์ประกอบ <ValueLimits>

    ในตัวอย่างนโยบาย XMLThreatProtection ต่อไปนี้ มีการตั้งค่า <ProcessingInstructionData> เป็น 30

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>5</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
            <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>request</Source>
        <StructureLimits>
            <NodeDepth>10</NodeDepth>
            <AttributeCountPerElement>2</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>15</Text>
            <Attribute>10</Attribute>
            <NamespaceURI>10</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>30</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    
  3. ตรวจสอบหมายเลขบรรทัดเฉพาะ (ระบุในขั้นตอนที่ 1) ของเพย์โหลดอินพุต แล้วตรวจสอบว่าความยาวของข้อมูลวิธีการประมวลผลที่ระบุไว้มีอักขระมากกว่าตัวเลขที่ระบุในองค์ประกอบ <ProcessingInstructionData> (ระบุในขั้นตอนที่ 2) หรือไม่ หากจำนวนอักขระเกินกว่าข้อมูลวิธีการในการประมวลผล นั่นเป็นสาเหตุของข้อผิดพลาด

    ต่อไปนี้เป็นตัวอย่างเพย์โหลดอินพุต

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <?xml-stylesheet type="text/xsl" href="mobilephones.xsl"?>
    <mobilephones>
      <mobilephone>
          <name>iPhone</name>
          <price>$600</price>
      </mobilephone>
      <mobilephone>
          <name>Samsung</name>
          <price>$500</price>
      </mobilephone>
    </mobilephones>
    

    เปย์โหลด XML ที่แสดงด้านบนในบรรทัดที่ 1 มีองค์ประกอบข้อมูลวิธีการประมวลผล (type="text/xsl" href="mobilephones.xsl"?)มีความยาว 40 อักขระ.) เนื่องจากความยาวนี้มากกว่า 30 (ค่าที่ระบุสำหรับองค์ประกอบ <ProcessingInstructionData>) คุณจึงได้รับข้อผิดพลาดต่อไปนี้

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Processing
    Instruction data length exceeded 30 at line 2(possibly around char 109)
    

ความละเอียด

หากนโยบาย XMLThreatProtection มีไว้เพื่อป้องกันเพย์โหลดที่เกินความยาวข้อมูลวิธีการประมวลผลที่เจาะจง ข้อความแสดงข้อผิดพลาดจะคาดหมายได้ ในกรณีนี้ คุณไม่จำเป็นต้องดำเนินการใดๆ เพิ่มเติม

อย่างไรก็ตาม หากพิจารณาแล้วว่าอนุญาตให้ใช้องค์ประกอบข้อมูลวิธีการประมวลผลที่ยาวขึ้นได้ ให้แก้ไของค์ประกอบย่อย <ProcessingInstructionData> ขององค์ประกอบ <ValueLimits> ให้เป็นค่าที่เหมาะสมโดยอิงตามข้อกำหนดของคุณ

ตัวอย่างเช่น หากคุณคิดว่าสามารถมีความยาววิธีการประมวลผลข้อมูลได้สูงสุด 50 อักขระ ให้แก้ไขนโยบายดังนี้

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>10</Attribute>
        <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>10</NodeDepth>
        <AttributeCountPerElement>5</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>15</Text>
        <Attribute>15</Attribute>
        <NamespaceURI>10</NamespaceURI>
        <Comment>40</Comment>
        <ProcessingInstructionData>50</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>

PITargetExceeded

รหัสข้อผิดพลาด

steps.xmlthreatprotection.ExecutionFailed

เนื้อหาการตอบกลับข้อผิดพลาด

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition [policy_name]:
        Execution failed. reason: XMLThreatProtection stepDefinition [policy_name]:
        Processing Instruction target length exceeded [num] at line [num](possibly around
        char [num])",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

ตัวอย่างเนื้อหาการตอบกลับข้อผิดพลาด

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Processing Instruction target length exceeded 10 at line 2(possibly around char 114)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

สาเหตุ

ข้อผิดพลาดนี้จะเกิดขึ้นหากเพย์โหลดของข้อความอินพุตที่ระบุโดยองค์ประกอบ <Source> ของนโยบาย XMLThreatProtection มีเอกสาร XML ที่เป้าหมายวิธีการของกระบวนการมีอักขระเกินจำนวนสูงสุดที่ระบุไว้ในองค์ประกอบย่อย <ProcessingInstructionTarget> ของ<NameLimits>องค์ประกอบของนโยบาย

ตัวอย่างเช่น หากระบุองค์ประกอบ <ProcessingInstructionTarget> เป็น 10 ในนโยบาย XMLThreatProtection แต่เพย์โหลดอินพุตมีเป้าหมายคำแนะนำกระบวนการที่มีอักขระมากกว่า 10 ตัว ระบบจะแสดงข้อผิดพลาดนี้

การวินิจฉัย

  1. ตรวจสอบข้อความแสดงข้อผิดพลาดเพื่อระบุชื่อนโยบาย XMLThreatProtection และหมายเลขบรรทัดที่มีเป้าหมายวิธีการประมวลผลเกินขีดจำกัด เช่น ชื่อนโยบายคือ XML-Threat-Protection-1 และหมายเลขบรรทัดในเพย์โหลดคือ 1 ในข้อความแสดงข้อผิดพลาดต่อไปนี้

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Processing
    Instruction target length exceeded 10 at line 2(possibly around char 114)
    
  2. ตรวจสอบนโยบาย XMLThreatProtection ที่ล้มเหลว (ระบุในขั้นตอนที่ #1) และบันทึกค่าที่ระบุในองค์ประกอบย่อย <ProcessingInstructionTarget> ขององค์ประกอบ <NameLimits>

    ในตัวอย่างนโยบาย XMLThreatProtection ต่อไปนี้ มีการตั้งค่า <ProcessingInstructionTarget> เป็น 10

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>10</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>request</Source>
        <StructureLimits>
            <NodeDepth>10</NodeDepth>
            <AttributeCountPerElement>5</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>20</Text>
            <Attribute>15</Attribute>
            <NamespaceURI>40</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>30</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    
  3. ตรวจสอบหมายเลขบรรทัดเฉพาะ (ระบุในขั้นตอนที่ 1) ของเพย์โหลดอินพุต และตรวจสอบว่าความยาวของเป้าหมายคำสั่งการประมวลผลที่ระบุมีอักขระมากกว่าตัวเลขที่ระบุในองค์ประกอบ <ProcessingInstructionTarget> (ระบุในขั้นตอนที่ 2) หรือไม่ หากจำนวนอักขระเกินขีดจำกัดของขนาดเป้าหมาย นั่นจะเป็นสาเหตุของข้อผิดพลาด

    ต่อไปนี้เป็นตัวอย่างเพย์โหลดอินพุต

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <?xml-stylesheet type="text/xsl" href="mobilephones.xsl"?>
    <mobilephones>
      <mobilephone>
          <name>iPhone</name>
          <price>$600</price>
      </mobilephone>
      <mobilephone>
          <name>Samsung</name>
          <price>$500</price>
      </mobilephone>
    </mobilephones>
    

    เพย์โหลด XML ที่แสดงด้านบนในบรรทัดที่ 2 มีชื่อเป้าหมายวิธีการประมวลผล "xml-stylesheet"" โดยมีความยาว 14 อักขระ เนื่องจากชื่อเป้าหมายของวิธีการประมวลผลยาวกว่า 10 (ค่าที่ระบุสำหรับองค์ประกอบ <ProcessingInstructionTarget>) คุณจึงได้รับข้อผิดพลาดต่อไปนี้

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Processing
    Instruction target length exceeded 10 at line 2(possibly around char 114)
    

ความละเอียด

หากนโยบาย XMLThreatProtection มีไว้เพื่อป้องกันเพย์โหลดที่เกินความยาวเป้าหมายคำสั่งของกระบวนการที่เจาะจง ข้อความแสดงข้อผิดพลาดจะคาดหมายได้ ในกรณีนี้ คุณไม่จำเป็นต้องดำเนินการใดๆ เพิ่มเติม

อย่างไรก็ตาม หากคิดว่าเป้าหมายคำสั่งของกระบวนการยาวกว่านี้ได้ ให้แก้ไข <ProcessingInstructionTarget>องค์ประกอบย่อยขององค์ประกอบ <NameLimits> ให้เป็นค่าที่เหมาะสมตามความต้องการของคุณ

ตัวอย่างเช่น หากคุณคิดว่าคุณสามารถกำหนดเป้าหมายวิธีการประมวลผลได้ไม่เกิน 25 อักขระ ให้แก้ไขนโยบายดังนี้

  <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>5</Attribute>
        <NamespacePrefix>15</NamespacePrefix>
    <ProcessingInstructionTarget>25</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>10</NodeDepth>
        <AttributeCountPerElement>2</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>15</Text>
        <Attribute>10</Attribute>
        <NamespaceURI>40</NamespaceURI>
        <Comment>10</Comment>
        <ProcessingInstructionData>10</ProcessingInstructionData>
    </ValueLimits>
  </XMLThreatProtection>

NSURIExceeded

รหัสข้อผิดพลาด

steps.xmlthreatprotection.ExecutionFailed

เนื้อหาการตอบกลับข้อผิดพลาด

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition [policy_name]: Execution failed. reason: XMLThreatProtection stepDefinition [policy_name]:  Namespace uri length length exceeded [num] at line [num](possibly around char [num])",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

ตัวอย่างเนื้อหาการตอบกลับข้อผิดพลาด

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Namespace uri length exceeded 10 at line 2(possibly around char 97)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

สาเหตุ

ข้อผิดพลาดนี้จะเกิดขึ้นหากเพย์โหลดของข้อความอินพุตที่ระบุโดยองค์ประกอบ <Source> ของนโยบาย XMLThreatProtection มีเอกสาร XML ที่ URI ของ Namespace มีอักขระเกินจำนวนสูงสุดที่ระบุไว้ในองค์ประกอบย่อย <NamespaceURI> ขององค์ประกอบ<ValueLimits>ของนโยบาย

ตัวอย่างเช่น หากระบุองค์ประกอบ <NamespaceURI> เป็น 10 ในนโยบาย แต่เพย์โหลดอินพุตมี URI ของเนมสเปซที่มีอักขระมากกว่า 10 ตัว ระบบจะแสดงข้อผิดพลาดนี้

การวินิจฉัย

  1. ตรวจสอบข้อความแสดงข้อผิดพลาดเพื่อระบุชื่อนโยบาย XMLThreatProtection และหมายเลขบรรทัดที่มีความยาวเกิน URI ของเนมสเปซ เช่น ชื่อนโยบายคือ XML-Threat-Protection-1 และหมายเลขบรรทัดในเพย์โหลดคือ 2 ในข้อความแสดงข้อผิดพลาดต่อไปนี้

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Namespace
    uri length exceeded 10 at line 2(possibly around char 97)
    
  2. ตรวจสอบนโยบายที่ล้มเหลว (ระบุในขั้นตอนที่ 1) และจดบันทึกค่าที่ระบุในองค์ประกอบย่อย <NamespaceURI> ขององค์ประกอบ <ValueLimits>

    ในตัวอย่างนโยบาย XMLThreatProtection ต่อไปนี้ มีการตั้งค่า <NamespaceURI> เป็น 10

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>5</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
            <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>request</Source>
        <StructureLimits>
            <NodeDepth>10</NodeDepth>
            <AttributeCountPerElement>2</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>15</Text>
            <Attribute>10</Attribute>
            <NamespaceURI>10</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>10</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    
  3. ตรวจสอบหมายเลขบรรทัดเฉพาะ (ระบุในขั้นตอนที่ 1) ของเพย์โหลดอินพุต และตรวจสอบว่าความยาวของ URI ของเนมสเปซที่ระบุมีอักขระมากกว่าตัวเลขที่ระบุในองค์ประกอบ <NamespaceURI> (ระบุในขั้นตอนที่ 2) หรือไม่ หากจำนวนอักขระเกินความยาว URI ของเนมสเปซ นั่นจะเป็นสาเหตุของข้อผิดพลาด

    ต่อไปนี้เป็นตัวอย่างเพย์โหลดอินพุต

    <?xml version = "1.0" encoding = "UTF-8"?>
      <profile:user xmlns:profile = "www.google.com/profile">
      <profile:name>Rama Krishna</profile:name>
      <profile:company>Google</profile:company>
      <profile:phone>(91) 9876543210</profile:phone>
    </profile:user>
    

    เพย์โหลด XML ที่แสดงด้านบนในบรรทัดที่ 2 มี URI ของเนมสเปซ www.google.com/profile โดยมีความยาว 22 อักขระ เนื่องจากความยาว URI ของเนมสเปซมากกว่า 10 (ค่าที่ระบุสำหรับองค์ประกอบ <NamespaceURI>) คุณจึงได้รับข้อผิดพลาดต่อไปนี้

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Namespace
    uri length exceeded 10 at line 2(possibly around char 99)
    

ความละเอียด

หากนโยบาย XMLThreatProtection มีจุดประสงค์เพื่อป้องกันเพย์โหลดที่เกินความยาว URI ของเนมสเปซที่ระบุ ก็น่าจะมีข้อความแสดงข้อผิดพลาด ในกรณีนี้ คุณไม่จำเป็นต้องดำเนินการใดๆ เพิ่มเติม

อย่างไรก็ตาม หากคุณกำหนดว่าสามารถอนุญาตให้ใช้ URI ของเนมสเปซที่ยาวกว่าได้ ให้แก้ไของค์ประกอบย่อย <NamespaceURI> ขององค์ประกอบ <ValueLimits> ให้เป็นค่าที่เหมาะสมโดยอิงตามข้อกำหนดของคุณ

ตัวอย่างเช่น หากคุณคิดว่าคุณสามารถมีความยาว URI ของเนมสเปซได้สูงสุด 30 อักขระ ให้แก้ไขนโยบายดังนี้

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>5</Attribute>
        <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>10</NodeDepth>
        <AttributeCountPerElement>2</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>15</Text>
        <Attribute>10</Attribute>
        <NamespaceURI>30</NamespaceURI>
        <Comment>10</Comment>
        <ProcessingInstructionData>10</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>

NSPrefixExceeded

รหัสข้อผิดพลาด

steps.xmlthreatprotection.ExecutionFailed

เนื้อหาการตอบกลับข้อผิดพลาด

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition [policy_name]:
        Execution failed. reason: XMLThreatProtection stepDefinition [policy_name]:
        Namespace prefix length exceeded [num] at line [num](possibly
        around char [num])",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

ตัวอย่างเนื้อหาการตอบกลับข้อผิดพลาด

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Namespace prefix length exceeded 10 at line 2(possibly around char 105)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

สาเหตุ

ข้อผิดพลาดนี้เกิดขึ้นหากเพย์โหลดของข้อความอินพุตที่ระบุโดยองค์ประกอบ <Source> มีเอกสาร XML ที่คำนำหน้า Namespace มีอักขระเกินจำนวนสูงสุดที่ระบุไว้ในองค์ประกอบย่อย <NamespacePrefix> ขององค์ประกอบ <NameLimits> ของนโยบาย

ตัวอย่างเช่น หากระบุองค์ประกอบ <NamespacePrefix> เป็น 10 ในนโยบาย XMLThreatProtection แต่เพย์โหลดอินพุตมีเนมสเปซนำหน้าที่มีอักขระมากกว่า 10 ตัว ระบบจะแสดงข้อผิดพลาดนี้

การวินิจฉัย

  1. ตรวจสอบข้อความแสดงข้อผิดพลาดเพื่อระบุชื่อนโยบาย XMLThreatProtection และหมายเลขบรรทัดที่มีความยาวของคำนำหน้า URI ของเนมสเปซเกินมา ตัวอย่างเช่น ชื่อนโยบายคือ XML-Threat-Protection-1 และหมายเลขบรรทัดในเพย์โหลดคือ 2 ในข้อความแสดงข้อผิดพลาดต่อไปนี้

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Namespace
    prefix length exceeded 10 at line 2(possibly around char 105)
    
  2. ตรวจสอบนโยบายที่ล้มเหลว (ระบุในขั้นตอนที่ 1) และจดบันทึกค่าที่ระบุในองค์ประกอบย่อย <NamespacePrefix> ขององค์ประกอบ <NameLimits>

    ในตัวอย่างนโยบาย XMLThreatProtection ต่อไปนี้ มีการตั้งค่า <NamespacePrefix> เป็น 10

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>10</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
            <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>request</Source>
        <StructureLimits>
            <NodeDepth>10</NodeDepth>
            <AttributeCountPerElement>5</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>20</Text>
            <Attribute>15</Attribute>
            <NamespaceURI>40</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>30</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    
  3. ตรวจสอบหมายเลขบรรทัดเฉพาะ (ระบุในขั้นตอนที่ 1) ของเพย์โหลดอินพุต แล้วตรวจสอบว่าความยาวของคำนำหน้าเนมสเปซที่ระบุมีอักขระมากกว่าตัวเลขที่ระบุในองค์ประกอบ <NamespacePrefix> (ระบุในขั้นตอนที่ 2) หรือไม่ หากจำนวนอักขระเกินขีดจำกัดคำนำหน้าเนมสเปซ นั่นเป็นสาเหตุของข้อผิดพลาด

    ต่อไปนี้เป็นตัวอย่างเพย์โหลดอินพุต

    <?xml version = "1.0" encoding = "UTF-8"?>
    <userprofile:user xmlns:userprofile = "www.googlecom/profile">
      <userprofile:name>Rama Krishna</userprofile:name>
      <userprofile:company>Google</userprofile:company>
      <userprofile:phone>(011) 123-4567</userprofile:phone>
    </userprofile:user>
    

    เพย์โหลด XML ที่แสดงด้านบนในบรรทัดที่ 2 มีคำนำหน้าเนมสเปซ userprofile ที่มีความยาวอักขระ 11 ตัว เนื่องจากความยาวของคำนำหน้า URI ของเนมสเปซมากกว่า 10 (ค่าที่ระบุสำหรับองค์ประกอบ <NamespacePrefix>) คุณจึงได้รับข้อผิดพลาดต่อไปนี้

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Namespace
    prefix length exceeded 10 at line 2(possibly around char 105)
    

ความละเอียด

หากนโยบาย XMLThreatProtection มีจุดประสงค์เพื่อป้องกันเพย์โหลดที่เกินความยาวคำนำหน้า URI ของเนมสเปซ ข้อผิดพลาดจะเกิดขึ้น ในกรณีนี้ คุณไม่จำเป็นต้องดำเนินการใดๆ เพิ่มเติม

อย่างไรก็ตาม หากคุณกำหนดว่าอนุญาตให้มีคำนำหน้า URI ของเนมสเปซที่ยาวขึ้นได้ ให้แก้ไของค์ประกอบย่อย <NamespacePrefix> ขององค์ประกอบ <NameLimits> ให้เป็นค่าที่เหมาะสมโดยอิงตามข้อกำหนดของคุณ

ตัวอย่างเช่น หากคุณคิดว่าคุณสามารถมีความยาวคำนำหน้า URI ของเนมสเปซได้ไม่เกิน 15 อักขระ ให้แก้ไขนโยบายดังนี้

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>5</Attribute>
        <NamespacePrefix>15</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>10</NodeDepth>
        <AttributeCountPerElement>2</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>15</Text>
        <Attribute>10</Attribute>
        <NamespaceURI>40</NamespaceURI>
        <Comment>10</Comment>
        <ProcessingInstructionData>10</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>

NSCountExceeded

รหัสข้อผิดพลาด

steps.xmlthreatprotection.ExecutionFailed

เนื้อหาการตอบกลับข้อผิดพลาด

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition [policy_name]:
        Execution failed. reason: XMLThreatProtection stepDefinition [policy_name]:
        Namespace count exceeded [num] at line [num](possibly around char [num])",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

ตัวอย่างเนื้อหาการตอบกลับข้อผิดพลาด

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Namespace count exceeded 3 at line 2(possibly around char 234)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

สาเหตุ

ข้อผิดพลาดนี้จะเกิดขึ้นหากเพย์โหลดของข้อความอินพุตที่ระบุโดยองค์ประกอบ <Source> ของนโยบาย XMLThreatProtection มีเอกสาร XML ที่จำนวนเนมสเปซที่ใช้ในองค์ประกอบเดียวเกินจำนวนที่ระบุไว้ในองค์ประกอบย่อย <NamespaceCountPerElement> ของ<StructureLimits>องค์ประกอบของนโยบาย

ตัวอย่างเช่น หากระบุองค์ประกอบ <NamespaceCountPerElement> เป็น 3 ในนโยบาย แต่เพย์โหลดอินพุตมีองค์ประกอบที่มีเนมสเปซมากกว่า 3 รายการ ระบบจะแสดงข้อผิดพลาดนี้

การวินิจฉัย

  1. ตรวจสอบข้อความแสดงข้อผิดพลาดเพื่อระบุชื่อนโยบาย XMLThreatProtection และหมายเลขบรรทัดที่มีจำนวนเนมสเปซเกินมา เช่น ชื่อนโยบายคือ XMLThreat-Protection-1 และหมายเลขบรรทัดในเพย์โหลดคือ 2 ในข้อความแสดงข้อผิดพลาดต่อไปนี้

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Namespace count
    exceeded 3 at line 2(possibly around char 234)
    
  2. ตรวจสอบนโยบายที่ล้มเหลว (ระบุในขั้นตอนที่ 1) และจดบันทึกค่าที่ระบุในองค์ประกอบย่อย <NamespaceCountPerElement> ขององค์ประกอบ <StructureLimits>

    ในตัวอย่างนโยบาย XMLThreatProtection ต่อไปนี้ มีการตั้งค่า <NamespaceCountPerElement> เป็น 3

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>10</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
            <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>request</Source>
        <StructureLimits>
            <NodeDepth>10</NodeDepth>
            <AttributeCountPerElement>5</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>20</Text>
            <Attribute>15</Attribute>
            <NamespaceURI>40</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>30</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    
  3. ตรวจสอบหมายเลขบรรทัดเฉพาะ (ระบุในขั้นตอนที่ 1) ของเพย์โหลดอินพุต แล้วตรวจสอบว่าจำนวนเนมสเปซที่ระบุในองค์ประกอบเดียวสูงกว่าจำนวนที่ระบุในองค์ประกอบ <NamespaceCountPerElement> (ระบุในขั้นตอนที่ 2) หรือไม่ หากจำนวนของเนมสเปซเกินขีดจำกัดจำนวนเนมสเปซต่อองค์ประกอบ นั่นเป็นสาเหตุของข้อผิดพลาด

    ต่อไปนี้เป็นตัวอย่างเพย์โหลดอินพุต

    <?xml version = "1.0" encoding = "UTF-8"?>
    <hellos xmlns:h="https://www.w3schools.com/greeting1" xmlns:a="https://www.w3schools.com/greeting2" xmlns:b="https://www.w3schols.com/greeting3" xmlns:c="https://www.w3schools.com/greeting4">
        <a:hello1>world1</a:hello1>
        <b:hello2>world2</b:hello2>
        <c:hello2>world2</c:hello2>
        <h:hello2>world2</h:hello2>
    </hellos>
    

    เพย์โหลด XML ที่แสดงด้านบนในบรรทัดที่ 2 มีเนมสเปซมากกว่า 3 รายการ เนื่องจากจำนวนเนมสเปซมากกว่า 3 (ค่าที่ระบุสำหรับองค์ประกอบ <NamespaceCountPerElement>) คุณจึงได้รับข้อผิดพลาดต่อไปนี้

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Namespace
    count exceeded 3 at line 2(possibly around char 234)
    

ความละเอียด

หากนโยบาย XMLThreatProtection มีจุดประสงค์เพื่อป้องกันเพย์โหลดที่มีเนมสเปซเกินจำนวนเนมสเปซที่เจาะจงในองค์ประกอบเดียว ระบบจะแสดงข้อความแสดงข้อผิดพลาด ในกรณีนี้ คุณไม่จำเป็นต้องดำเนินการใดๆ เพิ่มเติม

อย่างไรก็ตาม หากคุณกำหนดว่าอนุญาตให้ใช้เนมสเปซได้มากกว่านี้ ให้แก้ไของค์ประกอบย่อย <NamespaceCountPerElement> ขององค์ประกอบ <StructureLimits> ให้เป็นค่าที่เหมาะสมโดยอิงตามความต้องการของคุณ

ตัวอย่างเช่น หากคุณคิดว่าคุณมีเนมสเปซได้สูงสุด 5 รายการในองค์ประกอบเดียว ให้แก้ไขนโยบายดังนี้

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>10</Attribute>
        <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>10</NodeDepth>
        <AttributeCountPerElement>5</AttributeCountPerElement>
        <NamespaceCountPerElement>5</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>20</Text>
        <Attribute>15</Attribute>
        <NamespaceURI>40</NamespaceURI>
        <Comment>10</Comment>
        <ProcessingInstructionData>30</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>

InvalidXMLPayload

รหัสข้อผิดพลาด

steps.xmlthreatprotection.ExecutionFailed

เนื้อหาการตอบกลับข้อผิดพลาด

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition [policy_name]:
        Execution failed. Reason: [error_description]",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

ตัวอย่างเนื้อหาการตอบกลับข้อผิดพลาด

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: Syntax error while parsing XML prologue",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

สาเหตุ

ข้อผิดพลาดนี้จะเกิดขึ้นหากเพย์โหลดของข้อความอินพุตที่ระบุโดยองค์ประกอบ <Source> ของนโยบาย XMLProtectionPolicy ไม่ใช่เอกสาร XML ที่ถูกต้อง

การวินิจฉัย

  1. ตรวจสอบข้อความแสดงข้อผิดพลาดเพื่อระบุชื่อนโยบายที่เกิดข้อผิดพลาด ในตัวอย่างต่อไปนี้ ชื่อนโยบายคือ XML-Threat-Protection-1

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: Syntax error while parsing XML prologue
    
  2. ตรวจสอบเพย์โหลดอินพุตและตรวจสอบว่าเอกสาร XML ที่ส่งผ่านในเพย์โหลดเป็นเอกสาร XML ที่มีรูปแบบถูกต้องจริงหรือไม่

    ต่อไปนี้เป็นตัวอย่างเพย์โหลดอินพุต

    <?xml version="1.0" encoding="UTF-8"?>
    <bookstore>
      <book category="cooking">
        <title lang="en">Easy Indian Cooking</title>
        <author>Suneeta</author>
        <year>2004</year>
        <price>300.00</price>
      </book>
    <bookstore>
    

    ในเพย์โหลด XML ที่แสดงด้านบน บรรทัดที่ 9 ไม่ได้ปิดองค์ประกอบรูทอย่างถูกต้องเนื่องจากไม่มี / เนื่องจาก XML นี้มีรูปแบบไม่ถูกต้อง คุณจึงได้รับข้อผิดพลาด:

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: Syntax error while parsing XML prologue
    

ความละเอียด

ตรวจสอบว่ามีการส่งเปย์โหลด XML อินพุตที่ถูกต้องไปยังพร็อกซี API ที่มีนโยบาย XMLThreatProtection

หากต้องการแก้ไขข้อผิดพลาดตัวอย่างที่อธิบายไว้ข้างต้น ให้แก้ไขเพย์โหลด XML ของอินพุตดังนี้

<?xml version="1.0" encoding="UTF-8"?>
<bookstore>
  <book category="cooking">
    <title lang="en">Easy Indian Cooking
    <author>Suneeta</author>
    <year>2004</year>
    <price>300.00</price>
  </book>
</bookstore>

SourceUnavailable

รหัสข้อผิดพลาด

steps.xmlthreatprotection.SourceUnavailable

เนื้อหาการตอบกลับข้อผิดพลาด

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition[policy_name]: Source[var_name] is not available"
        "detail": {
            "errorcode": "steps.xmlthreatprotection.SourceUnavailable"
        }
    }
}

ตัวอย่างเนื้อหาการตอบกลับข้อผิดพลาด

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Source requests is not available",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.SourceUnavailable"
        }
    }
}

สาเหตุ

ข้อผิดพลาดนี้เกิดขึ้นหากตัวแปร message ที่ระบุไว้ในองค์ประกอบ <Source> ของนโยบาย XMLThreatProtection มีลักษณะดังนี้

  • อยู่นอกขอบเขต (ใช้ไม่ได้ในขั้นตอนเฉพาะเจาะจงที่มีการใช้นโยบาย)
  • ไม่ใช่ค่าที่ถูกต้องค่าใดค่าหนึ่ง request, response หรือ message

เช่น ข้อผิดพลาดนี้เกิดขึ้นหากองค์ประกอบ <Source> ในนโยบายมีการตั้งค่าเป็นตัวแปรที่ไม่มีอยู่ในโฟลว์ที่มีการใช้นโยบาย

การวินิจฉัย

  1. ระบุชื่อนโยบาย XMLThreatProtection และชื่อของตัวแปรแหล่งที่มาจากข้อความแสดงข้อผิดพลาด เช่น ข้อความแสดงข้อผิดพลาดต่อไปนี้ ชื่อนโยบาย XMLThreatProtection คือ XML-Threat-Protection-1 และตัวแปรแหล่งที่มาคือ requests:

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Source requests
    is not available
    
  2. ตรวจสอบนโยบาย XMLThreatProtection ที่ล้มเหลวและตรวจสอบค่าที่ระบุสำหรับองค์ประกอบ <Source> ที่ระบุไว้ในขั้นตอนที่ 1

    ในตัวอย่างนโยบาย XMLThreatProtection ต่อไปนี้ องค์ประกอบ <Source> ได้รับการตั้งค่าเป็น requests

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>10</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
            <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>requests</Source>
        <StructureLimits>
            <NodeDepth>10</NodeDepth>
            <AttributeCountPerElement>5</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>20</Text>
            <Attribute>15</Attribute>
            <NamespaceURI>40</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>30</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    

    ค่าที่ถูกต้องสำหรับองค์ประกอบ <Source> คือ request, response หรือ message. เนื่องจาก requests ไม่ใช่ค่าที่ถูกต้องและไม่อยู่ในกระบวนการที่มีการเรียกใช้นโยบาย คุณจึงได้รับข้อผิดพลาด

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Source requests
    is not available
    

ความละเอียด

ตรวจสอบว่าตัวแปรที่ตั้งค่าในเอลิเมนต์ <Source> ของนโยบาย XMLThreatProtection ที่ล้มเหลวมีการตั้งค่าเป็น request, response หรือ message และอยู่ในโฟลว์ที่นโยบายใช้งาน

หากต้องการแก้ไขนโยบายตัวอย่างที่แสดงข้างต้น ให้แก้ไของค์ประกอบ <Source> ให้ใช้ตัวแปร request เนื่องจากมีอยู่ในขั้นตอนการขอ

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>10</Attribute>
        <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>10</NodeDepth>
        <AttributeCountPerElement>5</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>20</Text>
        <Attribute>15</Attribute>
        <NamespaceURI>40</NamespaceURI>
        <Comment>10</Comment>
        <ProcessingInstructionData>30</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>

NonMessageVariable

รหัสข้อผิดพลาด

steps.xmlthreatprotection.NonMessageVariable

เนื้อหาการตอบกลับข้อผิดพลาด

{
    "fault": {
        "faultstring": "Variable var_name does not resolve to a Message"
        "detail": {
            "errorcode": "steps.xmlthreatprotection.NonMessageVariable"
        }
    }
}

ตัวอย่างเนื้อหาการตอบกลับข้อผิดพลาด

{
    "fault": {
        "faultstring": "Variable message.content does not resolve to a Message",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.NonMessageVariable"
        }
    }
}

สาเหตุ

ข้อผิดพลาดนี้เกิดขึ้นหากมีการตั้งองค์ประกอบ <Source> ในนโยบาย XMLThreatProtection เป็นตัวแปรที่ไม่ใช่ประเภท Message

ตัวแปรประเภทข้อความจะเป็นตัวแทนของคำขอและการตอบกลับ HTTP ทั้งหมด ตัวแปรโฟลว์ Apigee Edge ในตัว request, response และ message เป็นประเภทข้อความ ดูข้อมูลเพิ่มเติมเกี่ยวกับตัวแปรข้อความได้ที่ข้อมูลอ้างอิงตัวแปร

การวินิจฉัย

  1. ระบุชื่อตัวแปรที่แปลงไปเป็นตัวแปรประเภทข้อความจากข้อความแสดงข้อผิดพลาด ตัวอย่างเช่น ในข้อความแสดงข้อผิดพลาดต่อไปนี้ ชื่อตัวแปรคือ message.content

    Variable message.content does not resolve to a Message
    
  2. ตรวจสอบนโยบาย XMLThreadProtection ทั้งหมดในพร็อกซี API ที่เกิดความล้มเหลวและระบุนโยบาย XMLThreadProtection ที่ระบุเอลิเมนต์ <Source> ด้วยชื่อตัวแปรที่ระบุไว้ในขั้นตอนที่ 1 ด้านบน

    ในตัวอย่างนโยบาย XMLThreatProtection ต่อไปนี้ มีการตั้งค่า <Source> เป็น message.content

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>10</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
            <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>message.content</Source>
        <StructureLimits>
            <NodeDepth>10</NodeDepth>
            <AttributeCountPerElement>5</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>20</Text>
            <Attribute>15</Attribute>
            <NamespaceURI>40</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>30</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    

    เนื่องจากตัวแปร message.content ไม่ใช่ประเภทข้อความ คุณจึงได้รับข้อผิดพลาด:

    Variable message.content does not resolve to a Message
    

ความละเอียด

ตรวจสอบว่าได้กำหนดองค์ประกอบ <Source> ในนโยบาย XMLThreatProtection ที่ล้มเหลวเป็นตัวแปรโฟลว์ประเภท Message ที่อยู่ในโฟลว์ที่มีการดำเนินการนโยบาย

หากต้องการแก้ไขนโยบาย คุณสามารถแก้ไของค์ประกอบ <Source> เพื่อระบุตัวแปรที่เป็นประเภทข้อความได้ เช่น ใน XMLThreatProtection ที่ล้มเหลว คุณสามารถระบุองค์ประกอบ <Source> เป็น message ได้ดังนี้

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>10</Attribute>
        <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>message</Source>
    <StructureLimits>
        <NodeDepth>10</NodeDepth>
        <AttributeCountPerElement>5</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>20</Text>
        <Attribute>15</Attribute>
        <NamespaceURI>40</NamespaceURI>
        <Comment>10</Comment>
        <ProcessingInstructionData>30</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>