简体   繁体   English

org.xml.sax.SAXParseException:在.net中使用服务时,prolog中不允许使用内容

[英]org.xml.sax.SAXParseException: Content is not allowed in prolog when consuming service in .net

I am getting this error: org.xml.sax.SAXParseException: Content is not allowed in prolog. 我收到此错误: org.xml.sax.SAXParseException:prolog中不允许使用内容。 when consuming a goberment webservice, the thing is that everything was working fine until last friday. 在消费一个goberment网络服务时,问题是一切正常,直到上周五。 the web service is 网络服务是

https://palena.sii.cl/DTEWS/CrSeed.jws?WSDL https://palena.sii.cl/DTEWS/CrSeed.jws?WSDL

and it returns a seed that needs to be signed. 并返回需要签名的种子。 the strange thing is if you consume this service with a test program like .net webservice studio it throws the error, but if you consumes this service with http://www.soapclient.com/soaptest.html it works fine. 奇怪的是,如果您使用像.net webservice studio这样的测试程序来使用此服务,则会抛出错误,但如果您使用http://www.soapclient.com/soaptest.html使用此服务则可以正常工作。

any ideas? 有任何想法吗?

Problem is an Windows Update (KB3147461). 问题是Windows Update(KB3147461)。 2 solutions: 2解决方案:

  1. Uninstall it and try again. 卸载它然后重试。
  2. Is it on Windows 10? 是在Windows 10上吗? Update you application to Framework 4.6. 将您的应用程序更新到Framework 4.6。

After installation of .net 4.6 or above version in server (deployment server). 在服务器(部署服务器)中安装.net 4.6或更高版本之后。 It fixed the issue. 它解决了这个问题。 I spent around 4 days on this issue 我在这个问题上花了大约4天时间

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM