appcmd - unable to import httpErrors sectionRSS

2 replies

Last post Jun 10, 2020 01:36 AM by Jalpa Panchal

  • appcmd - unable to import httpErrors section

    Jun 01, 2020 06:22 PM|iisuser1876|LINK

    Exported the httpErrors section  using 

    appcmd list Config "SomeSite" /section:httpErrors /config /xml > httpErrors.xml

    and then trying to import 

    appcmd set Config /in < httpErrors.xml

    getting the following error

    ERROR ( hresult:8007000d, message:The input contained an error element, which may indicate that the operation
    producing the input has failed.
    )

    have heard elsewhere that appcmd scans for the text "error" in the file, and so does not account for <error> tags in the <httpErrors> section. How can I import a large number of httpError -> errors?

  • Re: appcmd - unable to import httpErrors section

    Jun 02, 2020 03:23 AM|Jalpa Panchal|LINK

    Hi,

    Look like when you use appcmd to import the custom error pages section it will cath the word error in the file so it shows this error message.

    as a workaround, you could try to use the below command to set the custom error pages:

    appcmd.exe set config "site1" -section:system.webServer/httpErrors /-"[statusCode='500',subStatusCode='-1']" 
    
    appcmd.exe set config "site1" -section:system.webServer/httpErrors /+"[statusCode='500',prefixLanguageFilePath='C:\errors',path='500.htm']" 
    

    https://serverfault.com/questions/306855/iis7-appcmd-importing-httperror-configuration-gives-an-error

    Regards,

    Jalpa

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue.
    If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
  • Re: appcmd - unable to import httpErrors section

    Jun 10, 2020 01:36 AM|Jalpa Panchal|LINK

    Hi,

    Is your issue solved?

    If your issue is solved then I request you to mark the helpful suggestion as an answer. This will help other people who face the same issue.

    If your issue still exists then try to refer the solution given by the community members.

    If then also you have any further questions then let us know about it.

    We will try to provide further suggestions to solve the issue.

    Thanks for your understanding.

    Regards

    Jalpa.

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue.
    If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.