Service Reference不会创建App.config文件 [英] Service Reference does not create App.config file

查看:54
本文介绍了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 />

推荐答案

试试这个:什么呢此WCF错误意味着:自定义工具警告:无法导入wsdl:portType [ ^ ]或者:自定义工具警告:无法导入wsdl:portType [ ^ ]
Try this: What does this WCF error mean: "Custom tool warning: Cannot import wsdl:portType"[^] or this: Custom Tool Warning: Cannot import wsdl:portType[^]


这篇关于Service Reference不会创建App.config文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆