错误信息是:
在 ServiceModel 客户端配置部分中找不到名为“NetbiterServiceReference.nbws”和合同“NetbiterServiceReference.nbws”的端点元素。
我的app.config
文件如下所示:
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="nbws.cfcSoapBinding">
<security mode="Transport" />
</binding>
<binding name="nbws.cfcSoapBinding1" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="https://../nbws.cfc"
binding="basicHttpBinding" bindingConfiguration="nbws.cfcSoapBinding"
contract="NetbiterServiceReference.nbws" name="nbws.cfc" />
</client>
</system.serviceModel>
在我的代码中,我确实喜欢这样,并且给出了上面的错误消息。
nbwsClient proxy = new nbwsClient();
然后我做了所有这些组合,但结果相同:
nbwsClient proxy = new nbwsClient("NetbiterServiceReference.nbws", "https://../nbws.cfc");
nbwsClient proxy = new nbwsClient("nbws", "https://../nbws.cfc");
nbwsClient proxy = new nbwsClient("nbws.cfc", "https://../nbws.cfc");
任何想法,将不胜感激!