server: CentOS + Jenkins 2.176.2
Client: Windows 10 x64
When call JenkinsNET.JenkinsClientJobs.UpdateConfiguration() returns with Server Internal Error, but posting the same config xml with postman works.
It seems WriteXml in UpdateConfiguration use UTF8(with BOM) as default encoding, Jenkins server cannot handle BOM. I change default encoding to UTF8(without BOM), update succeed, but all non-ascii characters became garbled.
After chaning WriteXml default encoding to AscII, garbled character was resolved. So should the default encoding be changed to AscII ?