【发布时间】:2010-11-15 05:37:33
【问题描述】:
在创建WCF Web Service for IIS 并在我的 ASP.NET 开发服务器中成功对其进行测试后,当我将服务部署到 另一台机器的 IIS 时,它总是会在使用时触发以下异常:
测试方法 PoolingServiceTest.ProgramTest.MainTaskTest 抛出异常:System.ServiceModel.CommunicationObjectFaultedException: O object de comunicação, System.ServiceModel.Channels.ServiceChannel, não pod ser usado para comunicação porque está no estado Com Falha..
英文:The object cannot be used for communication because it is With Fault (故障)
堆栈跟踪
System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan 超时) System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg,IMessage retMsg) System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData,Int32 类型) System.ServiceModel.ICommunicationObject.Close(时间跨度超时) System.ServiceModel.ICommunicationObject.Close(时间跨度超时) 关闭() System.IDisposable.Dispose()
我能做些什么来避免这种情况?
在客户端代码周围有一个 try catch 块,我得到了一个不同的异常:
[System.ServiceModel.Security.SecurityNegotiationException] {"O chamador não foi autenticado pelo serviço."} System.ServiceModel.Security.SecurityNegotiationException
英文:调用者未经服务验证
【问题讨论】: