找不到引用合同的默认端点元素 - 托管wcf

 李容怡姿齐芷全 发布于 2023-01-11 16:01

我在这个网站上有一个wcf服务http://wswob.somee.com/wobservice.svc

我尝试使用我的winform应用程序来使用该服务.这是我创建服务即时时收到的错误

com.somee.wobservice.IwobserviceClient myservice = new com.somee.wobservice.IwobserviceClient();

错误:

Could not find default endpoint element that references contract
'com.somee.wobservice.Iwobservice' in the ServiceModel client configuration section. This 
might be because no configuration file was found for your application, or because no 
endpoint element matching this contract could be found in the client element.

我搜索并修改了我的app.config文件:



  
    
      
    
  



  




和我在wcf文件夹中的web.config:


    
      
        
          

          
        
      

        
            
                
            
        
    

      
          
              
          
      

      
          
              
                  
              
          
      

      
           
           
      

      
           
              
           
      
   

我不确定哪个部分出错了.我对wcf的体验只有一周......

1 个回答
  • 从库项目中的app.config复制system.serviceModel部分,并将其放在web.config和刷新服务引用中.另见这个答案.找不到默认端点元素

    2023-01-11 16:04 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有