本文介绍了Service Reference不会创建App.config文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
将服务引用添加到visual studio项目时,不会生成app.config文件。它显示错误:
When adding the service reference to the visual studio project, app.config file is not generating. It is showing the error:
<br />
<pre lang="xml">Warning Custom tool warning: Cannot import wsdl:binding<br />
Detail: An exception was thrown in a call to a policy import extension.<br />
Extension: System.ServiceModel.Channels.SecurityBindingElementImporter<br />
Error: An unsupported security policy assertion was detected during the security policy import: <sp:SymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"><br />
<wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"><br />
<sp:ProtectionToken><br />
<wsp:Policy><br />
<sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never"><br />
<wsp:Policy><br />
<sp:RequireThumbprintReference /><br />
<sp:WssX509V3Token11 /><br />
</wsp:Policy><br />
</sp:X509Token><br />
</wsp:Policy><br />
</sp:ProtectionToken><br />
<sp:AlgorithmSuite><br />
<wsp:Policy><br />
<sp:Basic128 /><br />
</wsp:Policy><br />
</sp:AlgorithmSuite><br />
<sp:L...<br />
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://xmlns.oracle.com/apps/marketing/leadMgmt/leads/leadService/']/wsdl:binding[@name='SalesLeadServiceSoapHttp'] D:\Visual studio project\WindowsFormsApplication2\WindowsFormsApplication2\Service References\ServiceReference1\Reference.svcmap 1 1 WindowsFormsApplication2<br />
<br />
<br />
Warning Custom tool warning: Cannot import wsdl:port<br />
Detail: There was an error importing a wsdl:binding that the wsdl:port is dependent on.<br />
XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='http://xmlns.oracle.com/apps/marketing/leadMgmt/leads/leadService/']/wsdl:binding[@name='SalesLeadServiceSoapHttp']<br />
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://xmlns.oracle.com/apps/marketing/leadMgmt/leads/leadService/']/wsdl:service[@name='SalesLeadService']/wsdl:port[@name='SalesLeadServiceSoapHttpPort'] D:\Visual studio project\WindowsFormsApplication2\WindowsFormsApplication2\Service References\ServiceReference1\Reference.svcmap 1 1 WindowsFormsApplication2<br />
<br />
Warning Custom tool warning: Cannot import wsdl:binding<br />
Detail: An exception was thrown in a call to a policy import extension.<br />
Extension: System.ServiceModel.Channels.SecurityBindingElementImporter<br />
Error: An unsupported security policy assertion was detected during the security policy import: <sp:SymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"><br />
<wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"><br />
<sp:ProtectionToken><br />
<wsp:Policy><br />
<sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never"><br />
<wsp:Policy><br />
<sp:RequireThumbprintReference /><br />
<sp:WssX509V3Token11 /><br />
</wsp:Policy><br />
</sp:X509Token><br />
</wsp:Policy><br />
</sp:ProtectionToken><br />
<sp:AlgorithmSuite><br />
<wsp:Policy><br />
<sp:Basic128 /><br />
</wsp:Policy><br />
</sp:AlgorithmSuite><br />
<sp:Layout><br />
<wsp:Policy><br />
<sp:Lax /><br />
</...<br />
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://xmlns.oracle.com/apps/marketing/leadMgmt/leads/leadService/']/wsdl:binding[@name='SalesLeadServiceResponseBinding'] D:\Visual studio project\WindowsFormsApplication2\WindowsFormsApplication2\Service References\ServiceReference1\Reference.svcmap 1 1 WindowsFormsApplication2<br />
</pre><br />
<br />
<br />
推荐答案
这篇关于Service Reference不会创建App.config文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!