简体   繁体   English

异常:System.ServiceModel.AddressAlreadyInUseException:IP 端点 0.0.0.0:808 上已经有一个侦听器

[英]Exception: System.ServiceModel.AddressAlreadyInUseException: There is already a listener on IP endpoint 0.0.0.0:808

Getting an exception when I try to ping net.tcp listening failed当我尝试 ping net.tcp 监听失败时出现异常

C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools>svcutil 
net.tcp://localhost/TNA/TAServices/AuthenticationManager/mex

Results:结果:

Microsoft (R) Service Model Metadata Tool
[Microsoft (R) Windows (R) Communication Foundation, Version 4.6.1055.0]
Copyright (c) Microsoft Corporation.  All rights reserved.

Attempting to download metadata from 'net.tcp://localhost/TNA/TAServices/AuthenticationManager/mex' using WS-Metadata Exchange. This URL does not support DISCO.
Microsoft (R) Service Model Metadata Tool
[Microsoft (R) Windows (R) Communication Foundation, Version 4.6.1055.0]
Copyright (c) Microsoft Corporation.  All rights reserved.

Error: Cannot obtain Metadata from net.tcp://localhost/TNA/TAServices/AuthenticationManager/mex

If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address.  For help enabling metadata publishing, please refer to the MSDN documentation at http://go.microsoft.com/fwlink/?LinkId=65455.


WS-Metadata Exchange Error
    URI: net.tcp://localhost/TNA/TAServices/AuthenticationManager/mex

    Metadata contains a reference that cannot be resolved: 'net.tcp://localhost/TNA/TAServices/AuthenticationManager/mex'.

    There was no endpoint listening at net.tcp://localhost/TNA/TAServices/AuthenticationManager/mex that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

If you would like more help, type "svcutil /?"

After rebooting the system and immediately executing below command would listen重新启动系统并立即执行以下命令后会监听

C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools>svcutil 
net.tcp://localhost/TNA/TAServices/AuthenticationManager/mex

Results:结果:

Microsoft (R) Service Model Metadata Tool
[Microsoft (R) Windows (R) Communication Foundation, Version 4.6.1055.0]
Copyright (c) Microsoft Corporation.  All rights reserved.

Attempting to download metadata from 'net.tcp://localhost/TNA/TAServices/AuthenticationManager' using WS-Metadata Exchange. This URL does not support DISCO.
Microsoft (R) Service Model Metadata Tool
[Microsoft (R) Windows (R) Communication Foundation, Version 4.6.1055.0]
Copyright (c) Microsoft Corporation.  All rights reserved.

Error: Cannot obtain Metadata from net.tcp://localhost/TNA/TAServices/AuthenticationManager

If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address.  For help enabling metadata publishing, please refer to the MSDN documentation at http://go.microsoft.com/fwlink/?LinkId=65455.


WS-Metadata Exchange Error
    URI: net.tcp://localhost/TNA/TAServices/AuthenticationManager

    Metadata contains a reference that cannot be resolved: 'net.tcp://localhost/TNA/TAServices/AuthenticationManager'.

    The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:04:59.9843782'.

    An existing connection was forcibly closed by the remote host

It wasn't overwritten by another process.它没有被另一个进程覆盖。

But below log shows it was overwritten by some other process not by SMSvcHost但下面的日志显示它被其他一些进程覆盖,而不是被 SMSvcHost

An error occurred in the Activation Service 'NetTcpActivator' of the protocol 'net.tcp' while trying to listen for the site '1', thus the protocol is disabled for the site temporarily. See the exception message for more details.
 URL: WeakWildcard:net.tcp://username.domainname.com/
 Status: FailedToListen
 Exception: System.ServiceModel.AddressAlreadyInUseException: There is already a listener on IP endpoint 0.0.0.0:808. This could happen if there is another application already listening on this endpoint or if you have multiple service endpoints in your service host with the same IP endpoint but with incompatible binding configurations. ---> System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted
   at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.Bind(EndPoint localEP)
   at System.ServiceModel.Channels.SocketConnectionListener.Listen()
   --- End of inner exception stack trace ---
   at System.ServiceModel.Channels.SocketConnectionListener.Listen()
   at System.ServiceModel.Activation.TransportListener.Go(IConnectionListener connectionListener)
   at System.ServiceModel.Activation.TransportListener..ctor(IPEndPoint endPoint)
   at System.ServiceModel.Activation.TransportListener.Listen(IPEndPoint endPoint)
   at System.ServiceModel.Activation.RoutingTable.TcpStart(MessageQueue messageQueue, BaseUriWithWildcard path)
   at System.ServiceModel.Activation.MessageQueue.Register(BaseUriWithWildcard path)
   at System.ServiceModel.Activation.ListenerAdapter.RegisterBindings(IActivatedMessageQueue queue, Int32 siteId, String[] bindings, String path)
 Process Name: SMSvcHost
 Process ID: 4608

web.config web.config

<?xml version="1.0"?>
<configuration>
  <configSections>
    <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data" />
    <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
    <section name="dns" type="System.Configuration.NameValueFileSectionHandler" />
  </configSections>
  <dataConfiguration defaultDatabase="LocalSqlServer" />
  <dns file="dns.config" />
  <system.web>
    <!-- Web Part -->
    <membership>
      <providers>
        <clear />
        <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="LocalSqlServer" applicationName="/MVCFramework" />
      </providers>
    </membership>
    <profile enabled="true" defaultProvider="TableProfileProvider">
      <providers>
        <clear />
        <add name="TableProfileProvider" type="Microsoft.Samples.SqlTableProfileProvider" connectionStringName="LocalSqlServer" table="aspnet_Profile" applicationName="/MVCFramework" />
      </providers>
    </profile>
    <!-- End Web Part -->

    <pages validateRequest="false" enableEventValidation="false" enableViewStateMac="false" maintainScrollPositionOnPostBack="false" controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
      <controls>
        <add namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" tagPrefix="ajaxToolkit" />
      </controls>
    </pages>
    <customErrors mode="Off">
      <error statusCode="403" redirect="Status.aspx" />
      <error statusCode="404" redirect="Status.aspx" />
    </customErrors>
    <httpCookies httpOnlyCookies="true">
    </httpCookies>
    <trace enabled="false" localOnly="true">
    </trace>
    <httpRuntime maxRequestLength="2097151" executionTimeout="220000" requestValidationMode="2.0" />
    <!-- 
            Set compilation debug="false" to insert debugging 
            symbols into the compiled page. Because this 
            affects performance, set this value to true only  
            during development.
        -->
    <compilation debug="true" defaultLanguage="c#" targetFramework="4.0">
      <assemblies>
      </assemblies>
      <buildProviders>
        <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
      </buildProviders>
    </compilation>
    <sessionState mode="InProc" timeout="6000" cookieless="UseCookies">
    </sessionState>
    <authorization>
      <allow users="?" />
    </authorization>

    <httpHandlers>
      <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false" />
      <add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" />
    </httpHandlers>
  </system.web>
  <system.net>
    <settings>
      <servicePointManager expect100Continue="false" />
    </settings>
  </system.net>
  <system.webServer>
    <security>
      <requestFiltering>
        <requestLimits maxAllowedContentLength="1024000000"></requestLimits>
      </requestFiltering>
    </security>
    <validation validateIntegratedModeConfiguration="false" />
    <handlers>
      <remove name="ChartImageHandler" />
      <add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD,POST" path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    </handlers>
    <modules>
      <add name="QueryStringValidation" type="Presentation.Utilities.QueryStringValidation" />
    </modules>
  </system.webServer>

  <system.data>
    <DbProviderFactories>
      <remove invariant="MySql.Data.MySqlClient" />
      <add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.3.7.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
    </DbProviderFactories>
  </system.data>
  <system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="BasicHttpBinding_Framework" closeTimeout="00:50:00" openTimeout="00:50:00" receiveTimeout="00:50:00" sendTimeout="00:50:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="999999999" maxBufferPoolSize="524288" maxReceivedMessageSize="999999999" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
          <readerQuotas maxDepth="32" maxStringContentLength="999999999" maxArrayLength="999999999" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="None"/>
        </binding>
      </basicHttpBinding>
      <netTcpBinding>
        <binding name="NetTcpBinding_Framework" closeTimeout="00:50:00" openTimeout="00:50:00" receiveTimeout="00:50:00" sendTimeout="00:51:00" transactionFlow="false" transferMode="Streamed" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferPoolSize="999999999" maxBufferSize="999999999" maxConnections="10" maxReceivedMessageSize="999999999">
          <readerQuotas maxDepth="32" maxStringContentLength="999999999" maxArrayLength="999999999" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <reliableSession ordered="true" inactivityTimeout="00:50:00" enabled="false" />
          <security mode="None">
            <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
            <message clientCredentialType="Windows" />
          </security>
        </binding>
      </netTcpBinding>
    </bindings>
   <client>
      <endpoint address="net.tcp://localhost/TNA/TAServices/AccountManager.svc" binding="netTcpBinding" bindingConfiguration="NetTcpBinding_Framework" contract="AccountManager.IAccountManager" name="NetTcpBinding_Framework" />
  </client>
    <behaviors>
      <endpointBehaviors>
        <behavior name="ClientBehavior">
          <dataContractSerializer maxItemsInObjectGraph="10000000" />
        </behavior>
      </endpointBehaviors>
    </behaviors>
  </system.serviceModel>
  <location path="Common">
    <system.web>
      <authorization>
        <allow users="?" />
      </authorization>
    </system.web>
  </location>
  <system.web.extensions>
    <scripting>
      <webServices>
        <jsonSerialization maxJsonLength="5000000" />
      </webServices>
    </scripting>
  </system.web.extensions>
</configuration>

How should I need to configure windows and web.config file so that the process SMSvcHost would listen first after every boot.我应该如何配置 windows 和 web.config 文件,以便SMSvcHost进程在每次启动后首先侦听。 So that I wouldn't establish another listener by default by some other process on IP endpoint 0.0.0.0:808这样我就不会默认通过 IP 端点 0.0.0.0:808 上的其他进程建立另一个侦听器

As you know, NetTcp binding by default listens to the request on the 808 port.如您所知, NetTcp绑定默认监听 808 端口上的请求。 Therefore, please ensure the port 808 has not been used by another website when hosting the WCF service in IIS.因此,在 IIS 中托管 WCF 服务时,请确保 808 端口未被其他网站使用。 Alternatively, we had better change another port in the site binding configuration.或者,我们最好在站点绑定配置中更改另一个端口。
WCF net.tcp binding 808:* what does this mean? WCF net.tcp 绑定808:*这是什么意思?
Besides, in order to support the NetTcp protocol in IIS, please refer to the below link.此外,为了支持 IIS 中的NetTcp协议,请参考以下链接。
Could not find a base address that matches scheme net.tcp for the endpoint with binding NetTcpBinding. 找不到与绑定 NetTcpBinding 的端点的方案 net.tcp 匹配的基地址。 Base address schemes are [http] 基地址方案是 [http]
Finally, the configuration file of the WCF service doesn't support Nettcp protocol, we should add a service endpoint with NetTcpbinding so that it can work over NetTcp` protocol.最后,WCF 服务的配置文件不支持 Nettcp 协议,我们应该添加一个带有NetTcpbinding so that it can work over NetTcp` 协议上。
Feel free to let me know if there is anything I can help with.如果有什么我可以帮忙的,请随时告诉我。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 IP端点0.0.0.0:13000上已有一个侦听器。 ?? (TCP使用WCF) - There is already a listener on IP endpoint 0.0.0.0:13000. ?? (TCP using WCF) IP端点0.0.0.0:9000上通信对象和侦听器的WCF异常 - WCF exception on communication object & listener on IP endpoint 0.0.0.0:9000 System.ServiceModel.EndpointNotFoundException:没有端点监听 - System.ServiceModel.EndpointNotFoundException: There was no endpoint listening 记录System.ServiceModel时的远程服务跟踪侦听器 - Remote Service Trace Listener while logging System.ServiceModel WCF OData服务器异常500 - 什么是System.ServiceModel.CommunicationObjectAborted? - WCF OData Server Exception 500 - What is System.ServiceModel.CommunicationObjectAborted? &#39;System.ServiceModel.Diagnostics.TraceUtility&#39;的类型初始值设定项引发了异常 - The type initializer for 'System.ServiceModel.Diagnostics.TraceUtility' threw an exception 询问 WebService 时 System.ServiceModel.WasHosting.dll 中的异常 - Exception in System.ServiceModel.WasHosting.dll when asking WebService 'System.ServiceModel.Diagnostics.TraceUtility'在WCF中引发了异常 - 'System.ServiceModel.Diagnostics.TraceUtility' threw an exception in WCF System.ServiceModel.CommunicationException:'服务端点未能侦听 URI'xxx',因为访问被拒绝 - System.ServiceModel.CommunicationException: 'The service endpoint failed to listen on the URI 'xxx' because access was denied 使用Microsoft.Web.Administration.ServerManager修改web.config system.ServiceModel / client / endpoint - Modify web.config system.ServiceModel/client/endpoint with Microsoft.Web.Administration.ServerManager
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM