wcf两个连接问题

风一样的大叔 2012-08-30 11:34:21
app.config中配置是这样的
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="NoneSecurity" useDefaultWebProxy="false">
<security mode="None"/>
</binding>
</wsHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="CHINAZTT.ZTAM.BLL.ZTAMBehavior"
name="CHINAZTT.ZTAM.BLL.User">
<endpoint address="" binding="wsHttpBinding" bindingConfiguration="NoneSecurity"
contract="CHINAZTT.ZTAM.BLL.IUser" ><!--listenUriMode="Unique"-->
<identity>
<!--http://localhost:8731/User/mex-->
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8731/User" />
</baseAddresses>
</host>
</service>
<service
behaviorConfiguration="CHINAZTT.ZTAM.BLL.ZTAMBehavior"
name="CHINAZTT.ZTAM.BLL.REP.Report">
<endpoint address="" binding="wsHttpBinding" bindingConfiguration="NoneSecurity"
contract="CHINAZTT.ZTAM.BLL.REP.IReport" ><!--listenUriMode="Unique"-->
<!--http://localhost:8732/Report/mex-->
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8732/Report" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="CHINAZTT.ZTAM.BLL.ZTAMBehavior">
<serviceMetadata httpGetEnabled="false" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
<behavior name="">
<serviceMetadata httpGetEnabled="false" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>

<!--把listenUriMode="Unique"写在里面就会报错-->
“/”应用程序中的服务器错误。

远程主机强迫关闭了一个现有的连接。

说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.Net.Sockets.SocketException: 远程主机强迫关闭了一个现有的连接。

源错误:


行 72:
行 73: public System.Collections.Generic.List<CHINAZTT.ZTAM.MODEL.Resource> QueryChild() {
行 74: return base.Channel.QueryChild();
行 75: }
行 76:

源文件: C:\Users\QiuJiaLong\Desktop\CHINAZTT.ZTAM\CHINAZTT.ZTAM.UI.MVC\Service References\ReportBLL\Reference.cs 行: 74


不写这个wcf服务器就启动不了,怎么办?
...全文
114 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
风一样的大叔 2012-09-01
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 的回复:]

你确定不是同步导致的错误?
[/Quote]我现在什么都不确定了
快乐的小二兔 2012-08-31
  • 打赏
  • 举报
回复
你确定不是同步导致的错误?
风一样的大叔 2012-08-31
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 的回复:]

<!--把listenUriMode="Unique"写在里面就会报错-->
你是要干什么啊呢,webconfig 不支持这样的节点啊,还要向啊,或者你节点放做地反了
[/Quote]这个是app.config里加的啊
yonglaixiazaide 2012-08-30
  • 打赏
  • 举报
回复
<!--把listenUriMode="Unique"写在里面就会报错-->
你是要干什么啊呢,webconfig 不支持这样的节点啊,还要向啊,或者你节点放做地反了

62,046

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

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