1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
分配给此操作的时间可能已经是更长超时的一部分。这可能由于服务仍在处理操作或服务无法发送回复消息。
12.
13. 访问的时候,提示未激活
13.1多个internalservice,需要移除一个? 但是实际测试,似乎又没有问题了
The requested service, 'net.tcp://localhost/LISA_50_Dev_InternalService/AdminWeb.svc' could not be activated. See the server's diagnostic trace logs for more information.
有可能是项目没有编译,重新编译一下解决方案,确保所需要的dll都成功生成了
13.2 iisrest 这个必须要试一下,非常有效
13.3如果是真的有问题的话,可以参考
svc trace viewer也可以配置在wcf的客户端
14.通过http添加service reference的时候,出现503错误
There was an error downloading 'http://localhost:8082/Service/WindowsServiceManager.svc/$metadata'.
The request failed with HTTP status 503: Service Unavailable.Metadata contains a reference that cannot be resolved: 'http://localhost:8082/Service/WindowsServiceManager.svc'.The HTTP service located at http://localhost:8082/Service/WindowsServiceManager.svc is unavailable. This could be because the service is too busy or because no endpoint was found listening at the specified address. Please ensure that the address is correct and try accessing the service again later.The remote server returned an error: (503) Server Unavailable.If the service is defined in the current solution, try building the solution and adding the service reference again.需要去application中启用http protocol,在高级设置中
15.
[ArgumentException: An item with the same key has already been added.]
System.Runtime.AsyncResult.End(IAsyncResult result) +594083System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +238System.Web.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult ar) +178因为没有在配置文件中配置service和bindings
16.
The message could not be dispatched because the service at the endpoint address 'net.tcp://localhost/Test/AdminWeb.svc' is unavailable for the protocol of the address.
发现是忘记编译wcf项目了,因为是clone的一个新的repository
有时候iisreset也可以解决这个问题
17.
Could not find a base address that matches scheme net.tcp for the endpoint with binding NetTcpBinding. Registered base address schemes are [http].
Step 2: IIS > WCF Host Web Site > Manage Application > advanced Settings > Enabled Protocols > Set the value to HTTP,NET.TCP
18.
An existing connection was forcibly closed by the remote host
System.ServiceModel.Channels.SocketConnection.HandleReceiveAsyncCompleted()
System.ServiceModel.Channels.SocketConnection.BeginReadCore(Int32 offset, Int32 size, TimeSpan timeout, WaitCallback callback, Object state)System.ServiceModel.Channels.SocketConnection.BeginRead(Int32 offset, Int32 size, TimeSpan timeout, WaitCallback callback, Object state)System.ServiceModel.Channels.PreReadConnection.BeginRead(Int32 offset, Int32 size, TimeSpan timeout, WaitCallback callback, Object state)System.ServiceModel.Channels.DelegatingConnection.BeginRead(Int32 offset, Int32 size, TimeSpan timeout, WaitCallback callback, Object state)System.ServiceModel.Channels.DelegatingConnection.BeginRead(Int32 offset, Int32 size, TimeSpan timeout, WaitCallback callback, Object state)System.ServiceModel.Channels.TracingConnection.BeginRead(Int32 offset, Int32 size, TimeSpan timeout, WaitCallback callback, Object state)System.ServiceModel.Channels.SessionConnectionReader.OnAsyncReadComplete(Object state)System.ServiceModel.Channels.TracingConnection.TracingConnectionState.ExecuteCallback()System.Net.Sockets.SocketAsyncEventArgs.OnCompleted(SocketAsyncEventArgs e)System.Net.Sockets.SocketAsyncEventArgs.FinishOperationSuccess(SocketError socketError, Int32 bytesTransferred, SocketFlags flags)System.Net.Sockets.SocketAsyncEventArgs.CompletionPortCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)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 '10675199.02:48:05.4775807'.
System.ServiceModel.Channels.SocketConnection.ConvertTransferException(SocketException socketException, TimeSpan timeout, Exception originalException, TransferOperation transferOperation, Boolean aborted, String timeoutErrorString, TransferOperation timeoutErrorTransferOperation, SocketConnection socketConnection, TimeSpan remainingTime)
System.ServiceModel.Channels.SocketConnection.ConvertReceiveException(SocketException socketException, TimeSpan remainingTime, TimeSpan timeout)System.ServiceModel.Channels.SocketConnection.BeginReadCore(Int32 offset, Int32 size, TimeSpan timeout, WaitCallback callback, Object state)System.ServiceModel.Channels.SocketConnection.BeginRead(Int32 offset, Int32 size, TimeSpan timeout, WaitCallback callback, Object state)System.ServiceModel.Channels.PreReadConnection.BeginRead(Int32 offset, Int32 size, TimeSpan timeout, WaitCallback callback, Object state)System.ServiceModel.Channels.DelegatingConnection.BeginRead(Int32 offset, Int32 size, TimeSpan timeout, WaitCallback callback, Object state)System.ServiceModel.Channels.DelegatingConnection.BeginRead(Int32 offset, Int32 size, TimeSpan timeout, WaitCallback callback, Object state)System.ServiceModel.Channels.TracingConnection.BeginRead(Int32 offset, Int32 size, TimeSpan timeout, WaitCallback callback, Object state)System.ServiceModel.Channels.SessionConnectionReader.OnAsyncReadComplete(Object state)System.ServiceModel.Channels.TracingConnection.TracingConnectionState.ExecuteCallback()System.Net.Sockets.SocketAsyncEventArgs.OnCompleted(SocketAsyncEventArgs e)System.Net.Sockets.SocketAsyncEventArgs.FinishOperationSuccess(SocketError socketError, Int32 bytesTransferred, SocketFlags flags)System.Net.Sockets.SocketAsyncEventArgs.CompletionPortCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)The communication object, System.ServiceModel.Channels.ServerSessionPreambleConnectionReader+ServerFramingDuplexSessionChannel, cannot be used for communication because it is in the Faulted state.
System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout)
System.ServiceModel.Dispatcher.ErrorHandlingReceiver.Close()System.ServiceModel.Dispatcher.ChannelHandler.HandleReceiveComplete(RequestContext context)System.ServiceModel.Dispatcher.ChannelHandler.EndTryReceive(IAsyncResult result, RequestContext& requestContext)System.ServiceModel.Dispatcher.ChannelHandler.AsyncMessagePump(IAsyncResult result)System.ServiceModel.Dispatcher.ChannelHandler.OnAsyncReceiveComplete(IAsyncResult result)System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)System.ServiceModel.Channels.TransportDuplexSessionChannel.TryReceiveAsyncResult.OnReceive(IAsyncResult result)System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)System.ServiceModel.Channels.SynchronizedMessageSource.ReceiveAsyncResult.OnReceiveComplete(Object state)System.ServiceModel.Channels.SessionConnectionReader.OnAsyncReadComplete(Object state)System.ServiceModel.Channels.TracingConnection.TracingConnectionState.ExecuteCallback()System.Net.Sockets.SocketAsyncEventArgs.OnCompleted(SocketAsyncEventArgs e)System.Net.Sockets.SocketAsyncEventArgs.FinishOperationSuccess(SocketError socketError, Int32 bytesTransferred, SocketFlags flags)System.Net.Sockets.SocketAsyncEventArgs.CompletionPortCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)This error can be caused by a number of things. While it was a timing issue in this case, it usually has nothing to do with timings, especially if the error is received immediately. Possible reasons are:
- The objects used as parameters or return types in your contract don't have parameterless constructors and are not decorated with the DataContract attribute. Check the classes used as parameters or return types, but also all the types used by the public properties of those classes. If you implement a constructor with parameters for one of those classes, the compiler will not add the default parameterless constructor for you anymore, so you will need to add that yourself.
- The default limits defined in service configuration are too low (MaxItemsInObjectGraph, MaxReceivedMessageSize, MaxBufferPoolSize, MaxBufferSize, MaxArrayLength).
- Some public properties of your DataContract objects are read-only. Make sure all public properties have both getters and setters.
1. Added these behaviors at both service and client config.
2. Update these values to maximum size in both Client and Server config.
a. maxReceivedMessageSize
b. maxBufferSizec. maxBufferPoolSizeThis generally means that the remote side closed the connection (usually by sending a TCP/IP RST
packet). If you're working with a third-party application, the likely causes are:
- You are sending malformed data to the application
- The network link between the client and server is going down for some reason
- You have triggered a bug in the third-party application that caused it to crash
- The third-party application has exhausted system resources
It's likely that the first case is what's happening.
You can fire up to see exactly what is happening on the wire to narrow down the problem.
Without more specific information, it's unlikely that anyone here can really help you much.
Using TLS 1.2 solved this error.
You can force your application using TLS 1.2 with this (make sure to execute it before calling your service):ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12
19. net.tcp的808端口没有监听
1.windows service没有启动
2. wcf出现内部异常,导致application pool崩溃