首页 新闻 会员 周边 捐助

WCF服务报错

0
悬赏园豆:5 [已解决问题] 解决于 2014-07-28 14:58

通信对象 System.ServiceModel.Channels.ServiceChannel 无法用于通信,因为其处于“出错”状态。

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

异常详细信息: System.ServiceModel.FaultException`1[[System.ServiceModel.ExceptionDetail, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]: 通信对象 System.ServiceModel.Channels.ServiceChannel 无法用于通信,因为其处于“出错”状态。

源错误:

执行当前 Web 请求期间生成了未经处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。


堆栈跟踪:

[FaultException`1: 通信对象 System.ServiceModel.Channels.ServiceChannel 无法用于通信,因为其处于“出错”状态。]
   System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) +14489026
   System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) +622
   Workflow.CommonServices.ICommonService.GetCurrentStates() +0
   Workflow.CommonServices.ControllerServiceClient.<>c__DisplayClass28.<InternalGetAllStatus>b__25(ICommonService conn) in c:\SPDB\SourceCode\WorkflowCoreSolution\PresentationLayer\Workflow.CommonServices.ControllerServiceClient\DefaultControllerServiceManager.cs:194
   Workflow.Pool.Connection.ConnectionManager.CallService(Func`1 factory, Func`2 calling) in c:\SPDB\SourceCode\WorkflowCoreSolution\EnterpriseLibrary\WCFConnectionPool\ConnectionManager.cs:309
   Workflow.CommonServices.ControllerServiceClient.<InternalGetAllStatus>d__2a.MoveNext() in c:\SPDB\SourceCode\WorkflowCoreSolution\PresentationLayer\Workflow.CommonServices.ControllerServiceClient\DefaultControllerServiceManager.cs:194
   System.Linq.Buffer`1..ctor(IEnumerable`1 source) +520
   System.Linq.Enumerable.ToArray(IEnumerable`1 source) +103
   Workflow.CommonServices.ControllerServiceClient.DefaultControllerServiceManager.GetAllStates() in c:\SPDB\SourceCode\WorkflowCoreSolution\PresentationLayer\Workflow.CommonServices.ControllerServiceClient\DefaultControllerServiceManager.cs:104
   ManagementPortal.Service.CommonServiceApplications.Page_Load(Object sender, EventArgs e) in c:\SPDB\SourceCode\WorkflowCoreSolution\PresentationLayer\Portal\ManagementPortal\Service\CommonServiceApplications.aspx.cs:22
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   Topcheer.WebControls.CBPage.OnLoad(EventArgs e) in c:\SPDB\SourceCode\WorkflowCoreSolution\EnterpriseLibrary\Topcheer.Web\WebControls\CBPage.cs:182
   BaseUI.BasePage.OnLoad(EventArgs e) in c:\SPDB\SourceCode\WorkflowCoreSolution\PresentationLayer\Class\BaseUI\BasePage.cs:132
   ManagementPortal.Common.ManagementBasePortalPage.OnLoad(EventArgs e) in c:\SPDB\SourceCode\WorkflowCoreSolution\PresentationLayer\Portal\ManagementPortal\Common\ManagementBasePortalPage.cs:131
   System.Web.UI.Control.LoadRecursive() +71
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3178
wcf
孤_的主页 孤_ | 初学一级 | 园豆:13
提问于:2014-07-25 17:35
< >
分享
最佳答案
0

看下服务器上的详细错误信息。

收获园豆:5
Launcher | 高人七级 |园豆:45050 | 2014-07-25 17:37

这就是出错的详细信息了,服务器上的详细错误信息是什么意思?

孤_ | 园豆:13 (初学一级) | 2014-07-25 17:40

@孤_: http://www.cnblogs.com/danielWise/archive/2011/02/25/1964623.html

你能不能友好点?我是在帮你解决问题,我又不是拿了你的工资要给你干活。

Launcher | 园豆:45050 (高人七级) | 2014-07-25 17:56

@Launcher: 不好意思,我就是把出错的详细信息帖出来。

孤_ | 园豆:13 (初学一级) | 2014-07-25 17:57

@Launcher:跪求大神帮个忙行不?日志追踪工具显示 读取管道时出错: 管道已结束。 (109, 0x6d)。这个错误信息。

孤_ | 园豆:13 (初学一级) | 2014-07-28 14:27

@孤_: 难道日志里就只记录了这一种错误?

这篇文章: http://www.cnblogs.com/danielWise/archive/2011/02/25/1964623.html,你就不愿意看一下?看看如何用工具展示日志?

Launcher | 园豆:45050 (高人七级) | 2014-07-28 14:28

@Launcher: 
<E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent">
<System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system">
<EventID>131075</EventID>
<Type>3</Type>
<SubType Name="Error">0</SubType>
<Level>2</Level>
<TimeCreated SystemTime="2014-07-28T03:05:27.0489404Z" />
<Source Name="System.ServiceModel" />
<Correlation ActivityID="{3a83ca5e-96f1-4329-b7ff-89ee913d0bd9}" />
<Execution ProcessName="Workflow.CommonServices.MsgApplication.dll" ProcessID="464" ThreadID="8" />
<Channel />
<Computer>USP-DEV-AP12</Computer>
</System>
<ApplicationData>
<TraceData>
<DataItem>
<TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Error">
<TraceIdentifier>http://msdn.microsoft.com/zh-CN/library/System.ServiceModel.Diagnostics.ThrowingException.aspx</TraceIdentifier>
<Description>正在引发异常。</Description>
<AppDomain>Workflow.CommonServices.MsgApplication.dll.exe</AppDomain>
<Exception>
<ExceptionType>System.IO.PipeException, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
<Message>读取管道时出错: 管道已结束。 (109, 0x6d)。</Message>
<StackTrace>
在 System.ServiceModel.Channels.PipeConnection.FinishSyncRead(Boolean traceExceptionsAsErrors)
在 System.ServiceModel.Channels.PipeConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
在 System.ServiceModel.Channels.TracingConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
在 System.ServiceModel.Channels.ConnectionStream.Read(Byte[] buffer, Int32 offset, Int32 count)
在 System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count)
在 System.Net.Security.NegotiateStream.StartFrameHeader(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
在 System.Net.Security.NegotiateStream.StartReading(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
在 System.Net.Security.NegotiateStream.ProcessRead(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
在 System.Net.Security.NegotiateStream.Read(Byte[] buffer, Int32 offset, Int32 count)
在 System.ServiceModel.Channels.StreamConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
在 System.ServiceModel.Channels.SessionConnectionReader.Receive(TimeSpan timeout)
在 System.ServiceModel.Channels.SynchronizedMessageSource.Receive(TimeSpan timeout)
在 System.ServiceModel.Channels.TransportDuplexSessionChannel.EnsureInputClosed(TimeSpan timeout)
在 System.ServiceModel.Channels.TransportDuplexSessionChannel.OnClose(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout)
在 System.ServiceModel.Channels.ServiceChannel.OnClose(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout)
在 System.ServiceModel.Dispatcher.MessageRpc.CloseChannel()
在 System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessageCleanup(MessageRpc&amp; rpc)
在 System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage8(MessageRpc&amp; rpc)
在 System.ServiceModel.Dispatcher.MessageRpc.ProcessError(Exception e)
在 System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
在 System.ServiceModel.Dispatcher.ChannelHandler.DispatchAndReleasePump(RequestContext request, Boolean cleanThread, OperationContext currentOperationContext)
在 System.ServiceModel.Dispatcher.ChannelHandler.HandleRequest(RequestContext request, OperationContext currentOperationContext)
在 System.ServiceModel.Dispatcher.ChannelHandler.AsyncMessagePump(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.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
在 System.Net.LazyAsyncResult.Complete(IntPtr userToken)
在 System.Net.Security.NegotiateStream.ProcessFrameBody(Int32 readBytes, Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
在 System.Net.Security.NegotiateStream.ReadCallback(AsyncProtocolRequest asyncRequest)
在 System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes)
在 System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult)
在 System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
在 System.ServiceModel.Channels.ConnectionStream.IOAsyncResult.OnAsyncIOComplete(Object state)
在 System.ServiceModel.Channels.TracingConnection.TracingConnectionState.ExecuteCallback()
在 System.ServiceModel.Channels.PipeConnection.OnAsyncReadComplete(Boolean haveResult, Int32 error, Int32 numBytes)
在 System.ServiceModel.Channels.OverlappedContext.CompleteCallback(UInt32 error, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
在 System.Runtime.Fx.IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped)
在 System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
</StackTrace>
<ExceptionString>System.IO.PipeException: 读取管道时出错: 管道已结束。 (109, 0x6d)。</ExceptionString>
</Exception>
</TraceRecord>
</DataItem>
</TraceData>
</ApplicationData>
</E2ETraceEvent>

孤_ | 园豆:13 (初学一级) | 2014-07-28 14:30

@孤_: 这篇文章: http://www.cnblogs.com/danielWise/archive/2011/02/25/1964623.html,你就不愿意看一下?看看如何用工具展示日志?

Launcher | 园豆:45050 (高人七级) | 2014-07-28 14:36
其他回答(1)
0

可以参考这一篇,如果还不行,如果是iis作为服务宿主,将绑定改为wsHttpBinding看看,贴出来的异常很不友好,只能帮到这里了。

JeffWong | 园豆:2328 (老鸟四级) | 2014-07-25 20:24

@JeffWong:跪求大神帮个忙行不?日志追踪工具显示 读取管道时出错: 管道已结束。 (109, 0x6d)。这个错误信息。

支持(0) 反对(0) 孤_ | 园豆:13 (初学一级) | 2014-07-28 14:28
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册