silverlight wcf 问题在线等

subufan 2014-06-28 06:55:43
在更新WCF引用的时候提示:

HTML文档不包含 WEB 服务发现信息。。。。。

网上说是要添加 <serviceBehaviors>,加了之后仍然有这个问题
但是如果把<serviceBehaviors>name去掉就没问题了。。但是去掉岂不是没绑定上?

去掉之后再调用某些方法会出现:
错误:“远程服务器返回了意外响应 400 Bad Request”
应该是我的数据量超了,如果设置成功就不会有问题啊。。
看看怎么解决

我是不是由地方写的不对。。endpoint 中的contract 怎么确定?。。

web.config:
<system.serviceModel>
<services>
<service behaviorConfiguration="metadataBehavior" name="Microinfo.Map.Services.WCFServices">
<endpoint binding="basicHttpBinding" bindingConfiguration="NewBinding0" contract="Microinfo.Map.Services.IWCFServices"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="metadataBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
<dataContractSerializer maxItemsInObjectGraph="6553600"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="true" />
<bindings>
<basicHttpBinding>
<binding name="NewBinding0" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/>
</binding>
</basicHttpBinding>
</bindings>
</system.serviceModel>


cilentconfig:

<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IWCFServices" maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647">
<security mode="None" />
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:15792/WCF/WCFServices.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IWCFServices"
contract="HydrologicalGisWCF.IWCFServices" name="BasicHttpBinding_IWCFServices" />
</client>
</system.serviceModel>
</configuration>
...全文
147 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
subufan 2015-02-04
  • 打赏
  • 举报
回复
解决了。。用vs2010有时候就会有这样的错误。如果确认配置没错,删了wcf重新引用或者右键.web项目重新生成再更新就好了。。
海涵德 2014-06-28
  • 打赏
  • 举报
回复
你是否使用了“启用了Silverlight的WCF”
  • 打赏
  • 举报
回复
endpoint 中的contract 就是引用你的服务接口,你没有写错。 看这篇文章的 能不能帮到你, http://blog.csdn.net/duanzi_peng/article/details/19037777

8,756

社区成员

发帖
与我相关
我的任务
社区描述
WPF/Silverlight相关讨论
社区管理员
  • WPF/Silverlight社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧