证书更新后WIF令牌发布失败

时间:2013-10-28 23:06:49

标签: ssl service token wif

我们的证书即将到期,我们认为更改它,使用它的服务就像更新证书和使用证书的新指纹更新服务一样简单,但事实并非如此。

现在,这段代码是继承的,我没有写它,所以我想弄清楚这些东西。它就在这里打破:

var issuedToken = channel.Issue(rst) as GenericXmlSecurityToken;

这个东西应该打的所有服务都已经使用新证书进行了更新。任何指针都非常感谢!

抛出异常:

  

发现了System.ServiceModel.CommunicationException     的HResult = -2146233087     Message =接收到https://***ipsts/Service.svc/IWSTrust13的HTTP响应时发生错误。这可能是由于服务端点绑定不使用HTTP协议。这也可能是由于服务器中止HTTP请求上下文(可能是由于服务关闭)。请参阅服务器日志以获取更多详     来源= mscorlib程序     堆栈跟踪:       服务器堆栈跟踪:          在System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException,HttpWebRequest request,HttpAbortReason abortReason)          在System.ServiceModel.Channels.HttpChannelFactory 1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout) at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout) at System.ServiceModel.Channels.SecurityChannelFactory 1.SecurityRequestChannel.Request(消息消息,TimeSpan超时)          在System.ServiceModel.Channels.ServiceChannel.Call(String action,Boolean oneway,ProxyOperationRuntime operation,Object [] ins,Object [] outs,TimeSpan timeout)          在System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall,ProxyOperationRuntime操作)          在System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage消息)       在[0]处重新抛出异常:          在System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg,IMessage retMsg)          在System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData,Int32 type)          在Microsoft.IdentityModel.Protocols.WSTrust.IWSTrustContract.Issue(消息消息)          在Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannel.Issue(RequestSecurityToken rst,RequestSecurityTokenResponse& rstr)          在Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannel.Issue(RequestSecurityToken rst)          在C:\ Development \ Mobile Service \ Mobile Service \ Code \ ECNSecurityTokenService.cs中的Mobile_Service.Code.ECNSecurityTokenService.GetClaimsPrincipalWithUserName(String userName,String password):第59行     InnerException:System.Net.WebException          的HResult = -2146233079          Message =基础连接已关闭:接收时发生意外错误。          来源=系统          堆栈跟踪:               在System.Net.HttpWebRequest.GetResponse()               at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)          InnerException:System.IO.IOException               的HResult = -2146232800               消息=无法从传输连接读取数据:远程主机强制关闭现有连接。               来源=系统               堆栈跟踪:                    在System.Net.Sockets.NetworkStream.Read(Byte []缓冲区,Int32偏移量,Int32大小)                    在System.Net.FixedSizeReader.ReadPacket(Byte []缓冲区,Int32偏移量,Int32计数)                    在System.Net.Security._SslStream.StartFrameHeader(Byte []缓冲区,Int32偏移量,Int32计数,AsyncProtocolRequest asyncRequest)                    在System.Net.Security._SslStream.StartReading(Byte []缓冲区,Int32偏移量,Int32计数,AsyncProtocolRequest asyncRequest)                    在System.Net.Security._SslStream.ProcessRead(Byte []缓冲区,Int32偏移量,Int32计数,AsyncProtocolRequest asyncRequest)                    在System.Net.TlsStream.Read(Byte []缓冲区,Int32偏移量,Int32大小)                    在System.Net.PooledStream.Read(Byte []缓冲区,Int32偏移量,Int32大小)                    在System.Net.Connection.SyncRead(HttpWebRequest请求,布尔userRetrievedStream,布尔probeRead)               InnerException:System.Net.Sockets.SocketException                    的HResult = -2147467259                    消息=远程主机强制关闭现有连接                    来源=系统                    错误码= 10054                    NativeErrorCode = 10054                    堆栈跟踪:                         在System.Net.Sockets.NetworkStream.Read(Byte []缓冲区,Int32偏移量,Int32大小)                    InnerException:

1 个答案:

答案 0 :(得分:0)

似乎连接到ADFS时会抛出异常。我将检查ADFS管理/调试日志,以查看ADFS是否存在任何证书问题,即验证链信任或撤销。我认为,您很可能遇到ADFS无法验证链信任或撤销的问题。

HTH, 阿米特巴蒂亚