两个端点共享相同的端点错误消息 [英] two endpoints share the same endpoint error message

查看:143
本文介绍了两个端点共享相同的端点错误消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有一个由IIS 6托管的WCF库,并且一切正常.但是,我需要逐步检查服务中的代码.但是,当我在VS2008中按F5时,出现以下错误消息. .


I have a WCF Library hosted by IIS 6 and it all works fine.  However I need to step through the code in the service.  But when I hit F5 in VS2008 I get the following error message. . .

一个绑定实例已经关联到侦听URI'http://localhost:8888/VtaxDataService'.如果两个端点要共享相同的ListenUri,则它们还必须共享相同的绑定对象实例.

A binding instance has already been associated to listen URI 'http://localhost:8888/VtaxDataService'. If two endpoints want to share the same ListenUri, they must also share the same binding object instance.

我的机器上没有其他东西正在监听该URI.我以为该消息可能是指托管我的服务的网站,但是我在IIS中停止了该网站,但仍然收到该消息.我的app.config粘贴在下面.

nothing else on my machine is listening on that URI.  I thought the message might be referring to the website hosting my service but I stopped the web site in IIS and I still get the message.  My app.config is pasted below.

问题出在哪里,我该如何逐步看待这段代码?
感谢
加里

What is the problem and how can I step through this code?
Thanks
Gary

< system.serviceModel>
<诊断>
< messageLogging logMalformedMessages ="true"; logMessagesAtServiceLevel =''true''
logMessagesAtTransportLevel =''true''<<</filters>
;
< services>
< service behaviorConfiguration =''VtaxDataService.Service1Behavior''
name ="VtaxDataService.VtaxDataService''<
<端点地址=" binding ="wsHttpBinding" contract ="VtaxDataService.IVtaxDataService"; />
.< endpoint address ="mex" binding ="mexHttpBinding" contract ="IMetadataExchange" />
.< endpoint binding ="basicHttpBinding" contract ="VtaxDataService.IVtaxDataService"; />
主机名< host>

< baseAddresses>
< add baseAddress =" http://localhost:8877 /VtaxDataService " />
</baseAddresses<
br>< behavior name ="VtaxDataService.Service1Behavior"<<!< ;!-为避免泄露元数据信息,
请将下面的值设置为false并在部署之前删除上面的元数据终结点->
< serviceMetadata httpGetEnabled ="True"/>
<!-为接收故障中的异常详细信息以进行调试,请将
的以下值设置为true.在部署之前将其设置为false,以避免泄露异常信息->
< serviceDebug includeExceptionDetailInFaults ="False"; />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>

 <system.serviceModel>
    <diagnostics>
      <messageLogging logMalformedMessages="true" logMessagesAtServiceLevel="true"
        logMessagesAtTransportLevel="true">
        <filters>
 
        </filters>
      </messageLogging>
    </diagnostics>
    <services>
      <service behaviorConfiguration="VtaxDataService.Service1Behavior"
        name="VtaxDataService.VtaxDataService">
        <endpoint address="" binding="wsHttpBinding" contract="VtaxDataService.IVtaxDataService" />
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
        <endpoint binding="basicHttpBinding" contract="VtaxDataService.IVtaxDataService" />
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:8877/VtaxDataService" />
          </baseAddresses>
        </host>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="VtaxDataService.Service1Behavior">
          <!-- To avoid disclosing metadata information,
          set the value below to false and remove the metadata endpoint above before deployment -->
          <serviceMetadata httpGetEnabled="True"/>
          <!-- To receive exception details in faults for debugging purposes,
          set the value below to true.  Set to false before deployment
          to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="False" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>

推荐答案

您好,院长,

您的WCF服务已经托管在IIS 6中并且正在侦听在 http://localhost:8877/VtaxDataService 中.当您从Visual Studio运行服务时,它将在WcfSvcHost.exe中承载该服务,并尝试在上述端点上侦听,并且会收到错误消息.

要调试该服务,可以从IIS中删除服务,然后从WcfSvcHost.exe进行调试. .否则,请勿运行服务,添加断点并将进程附加到aspnet_wp.exe(ASP.NET辅助进程).

有关附加到正在运行的进程的更多信息,请参见:
Hi Dean,

Your WCF service is already hosted in IIS 6 and listening at http://localhost:8877/VtaxDataService. When you run service from Visual Studio it hosts the service in WcfSvcHost.exe and tries to listen at above endpoint and you receive error.

To debug the service you can remove your service from IIS and debug from WcfSvcHost.exe. Otherwise, do not run service, add breakpoint and attach process to aspnet_wp.exe (ASP.NET worker process).

For more information on attaching to running process see: http://msdn.microsoft.com/en-us/library/c6wf8e4z.aspx

Thanks,
Jay


这篇关于两个端点共享相同的端点错误消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆