The remote server returned an error (415) Cannot process the message

The remote server returned an error (415) Cannot process the messageICreatedmyWCFServiceanditwasworkingproperlywheniwasmakingitsservicereferenceinmylocalmachine.AlsoitcanworkwellwithtoolWPFTestClient.ButtheproblemcamewhenIinvoked

大家好,又见面了,我是你们的朋友全栈君。

I Created my WCF Service and it was working properly when i was making its service reference in my local machine. Also it can work well with tool WPF Test Client.
But the problem came when I invoked one of method.

When I was taking its reference in my local machine  I got following error.

The remote server returned an error: (415)Cannot process the message because the content type ‘application/soap+xml;charset=utf-8’  In WCF.

I resolved this issues by adding anotherendpoint ‘mex’ as below in my web.config.

<endpoint address=“mex“ binding=“mexHttpBinding“ contract=“IMetadataExchange“ />

 

after adding above endpoint I got the service reference in my related(include invoked project which need to add above endpoint into app.config file) Client Application. 

 

Please try If you face the similar problem.

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/141593.html原文链接:https://javaforall.net

赞 (0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • LAMP配置-php-fpm.conf

    LAMP配置-php-fpm.confphp-fpm.conf默认包含/usr/local/php72/etc/php-fpm.d/*.confphp-fpm.conf文件内容比较简单;;;;;;;;;;;;;;;;;;;;;;FPMConfiguration;;;;;;;;;;;;;;;;;;;;;;include=/usr/local/php72/etc/php-fpm.d/*.confwww.conf内容才是真正的配置项user=nobodygroup=nobodylisten=127.

    2022年6月6日
  • ByteBuf用法

    ByteBuf用法JDKNIO之ByteBuffer的局限性如下:(1)长度固定,一旦分配完成,它的容量将不能动态扩展和收缩,而需要编码的POJO对象大雨ByteBuffer的容量时,会发生索引越界异常;(2)只有一个标识位置的指针position,读写的是偶需要搜公条用flip()和rewind()等,使用着必须小心的处理这些API,否则很容易导致程序越界异常;(3)ByteBuffer的API功能有限,…

    2022年9月19日
  • shell循环生成连续日期

    shell循环生成连续日期1,给定长度,循环生成日期begin_day=-5end_day=0for((i=${begin_day};i<=${end_day};i++));do day=`date-d”${i}days”+”%Y%m%d”` echo${day}done输出为:2020082520200826202008272020082820200829202008302,给定开始日期和结束日期,循环生成日期。begin_day=”20200801″end_day=”2020

    2022年7月24日
  • Hazelcast_胡沈员介绍

    Hazelcast_胡沈员介绍Hazelcast介绍什么时侯需要用例内存中分布式计算场景分布式消息特性全景DistributedMaps一个结点中分区Hazelcast中的分片也称为分区,Hazelcast默认271个分区。H

    2022年8月1日
  • 忘记 mysql 数据库连接密码(解决方案)「建议收藏」

    由于CSDN的目录只在固定地方显示,并不是很方便阅读,又占空间,所以本文章已同步更新到个人博客上,在个人博客上的文章,有滑动侧边目录栏,阅读体验更加,而且文章的样式也更为丰富,推荐各位同学前往我的个人博客读阅。个人博客地址:http://zwd596257180.gitee.io/blog/2019/04/16/mysql_change_password/…

    2022年4月13日
  • WPA3在2018年为无线安全添砖加瓦

    WPA3在2018年为无线安全添砖加瓦Wi-FiAllianceAnnouncesWPA3,theSuccessortoWi-Fi’sWPA2SecurityProtocolTheWi-FiAlliance–comprising15majorsponsormembers(includingApple,Cisco,Dell,Intel,Microsoft,Qualcomman

    2022年6月8日

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号