0

我在下面提到的两件事上得到 WCFexception

通信对象 System.ServiceModel.ServiceHost 无法用于通信,因为它处于故障状态。

IP 端点 0.0.0.0:9000 上已经有一个侦听器。确保您没有尝试在应用程序中多次使用此端点,并且没有其他应用程序在此端点上侦听。

如果我们尝试浏览,我们会收到无法显示页面的消息。如果我们重新启动服务器/服务,它将开始工作。我是 WCF 的新手。请帮助我解决问题。

提前致谢。

Please find below the stack trace


Message: HandlingInstanceID: 
An exception of type 'System.ServiceModel.AddressAlreadyInUseException' occurred and was caught.
----------------------------------------------------------------------------
Type : System.ServiceModel.AddressAlreadyInUseException, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : There is already a listener on IP endpoint 0.0.0.0:9000.  Make sure that you are not trying to use this endpoint multiple times in your application and that there are no other applications listening on this endpoint.
Source : System.ServiceModel
Help link : 
Data : System.Collections.ListDictionaryInternal
TargetSite : Void Listen()
Stack Trace :    at System.ServiceModel.Channels.SocketConnectionListener.Listen()
   at System.ServiceModel.Channels.BufferedConnectionListener.Listen()
   at System.ServiceModel.Channels.ExclusiveTcpTransportManager.OnOpen()
   at System.ServiceModel.Channels.TransportManager.Open(TransportChannelListener channelListener)
   at System.ServiceModel.Channels.TransportManagerContainer.Open(SelectTransportManagersCallback selectTransportManagerCallback)
   at System.ServiceModel.Channels.TransportChannelListener.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.ConnectionOrientedTransportChannelListener.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.TcpChannelListener`2.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open()
   at PRWCFWindowsHost.HostEngine.StartPRSyncService() in F:\Source Code\Application\PRApplication\PR_SOURCECODE_VSS_MARCH\PR.root\PR\PRWCFWindowsHost\HostEngine.cs:line 101

TimeStamp : 06/10/2015 08:45:02
FullName : Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
AppDomainName : WindowsHost.exe
ThreadIdentity : 
WindowsIdentity : NT AUTHORITY\SYSTEM
    Inner Exception
    ---------------
    Type : System.Net.Sockets.SocketException, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Message : Only one usage of each socket address (protocol/network address/port) is normally permitted
    Source : System
    Help link : 
    ErrorCode : 10048
    SocketErrorCode : AddressAlreadyInUse
    NativeErrorCode : 10048
    Data : System.Collections.ListDictionaryInternal
    TargetSite : Void DoBind(System.Net.EndPoint, System.Net.SocketAddress)
    Stack Trace :    at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
       at System.Net.Sockets.Socket.Bind(EndPoint localEP)
       at System.ServiceModel.Channels.SocketConnectionListener.Listen()

Message: HandlingInstanceID: 6978b145-1b73-443d-917c-839221b6bab8
An exception of type 'System.ServiceModel.CommunicationObjectFaultedException' occurred and was caught.
-------------------------------------------------------------------------------------------------------
10/06/2015 10:55:23
Type : System.ServiceModel.CommunicationObjectFaultedException, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : The communication object, System.ServiceModel.ServiceHost, cannot be used for communication because it is in the Faulted state.
Source : System.ServiceModel
Help link : 
Data : System.Collections.ListDictionaryInternal
TargetSite : Void Close(System.TimeSpan)
Stack Trace :    at System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Close()
   at WindowsHost.HostEngine.OnStop() in F:\Source Code\Application issue\PRApplication\PR_SOURCECODE_VSS_MARCH\PR.root\PR\WindowsHost\HostEngine.cs:line 84

Additional Info:

MachineName : 
TimeStamp : 06/10/2015 08:55:23
FullName : Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
AppDomainName : WindowsHost.exe
ThreadIdentity : 
WindowsIdentity : NT AUTHORITY\SYSTEM


Message: HandlingInstanceID: 1ca8f69a-8e36-4e99-a5eb-e`enter code here`5f0e5dc7a28
An exception of type 'System.IO.FileNotFoundException' occurred and was caught.
-------------------------------------------------------------------------------
10/06/2015 11:52:33
Type : System.IO.FileNotFoundException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : Could not find file 'C:\ProcessLog.log'.
Source : mscorlib
Help link : 
FileName : C:\RunProcessLog.log
FusionLog : 
Data : System.Collections.ListDictionaryInternal
TargetSite : Void WinIOError(Int32, System.String)
Stack Trace :    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at ITG.PR.BusinessLayer.FileManager.ReadResultSetRebuildLogFile(List`1 lResultSetList, Hashtable PreviousResultSet)
   at ITG.PR.PRWCFService.SyncedService.ReadResultSetRebuildLogFile(List`1 lResultSetList, Hashtable PreviousResultSet) in F:\Source Code\Application\PRApplication\PR_SOURCECODE_VSS_MARCH\PR.root\PR\PRWCFService\SyncedService.cs:line 3094

  FullName : Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
AppDomainName : WindowsHost.exe
ThreadIdentity : IIS APPPOOL\DoAppPool
WindowsIdentity : NT AUTHORITY\SYSTEM
4

1 回答 1

0

我假设您在 Visual Studio 中遇到此错误。转到项目文件的属性。在 Web 选项卡中查找项目 URL。您会找到类似http://localhost:9000/的网址。在此处为http://localhost:11483/提供不同的端口号

于 2015-10-08T06:13:55.600 回答