我们在我们的网站上有一个定制的STS,它们都在Windows Azure中运行。 STS是ASP.NET 4.0,网站是MVC3。在过去的几天里,我开始看到了不少但以下情况除外显示了在我们的诊断日志:Windows Identity Foundation System.Xml.XmlException:文件意外结束
System.Xml.XmlException: Unexpected end of file. at System.Xml.EncodingStreamWrapper.ProcessBuffer(Byte[] buffer, Int32 offset, Int32 count, Encoding encoding) at System.Xml.XmlUTF8TextReader.SetInput(Byte[] buffer, Int32 offset, Int32 count, Encoding encoding, XmlDictionaryReaderQuotas quotas, OnXmlDictionaryReaderClose onClose) at System.Xml.XmlDictionaryReader.CreateTextReader(Byte[] buffer, Int32 offset, Int32 count, Encoding encoding, XmlDictionaryReaderQuotas quotas, OnXmlDictionaryReaderClose onClose) at System.Xml.XmlDictionaryReader.CreateTextReader(Byte[] buffer, Int32 offset, Int32 count, XmlDictionaryReaderQuotas quotas) at Microsoft.IdentityModel.Web.SessionAuthenticationModule.GetKeyId(Byte[] sessionCookie) at Microsoft.IdentityModel.Web.SessionAuthenticationModule.ReadSessionTokenFromCookie(Byte[] sessionCookie) at Microsoft.IdentityModel.Web.SessionAuthenticationModule.TryReadSessionTokenFromCookie(SessionSecurityToken& sessionToken) at Microsoft.IdentityModel.Web.SessionAuthenticationModule.OnAuthenticateRequest(Object sender, EventArgs eventArgs) at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously
我不知道是否有什么问题,这可能最终用户或任何影响正在造成。如果有人能够阐明这种例外情况,以及我将来可以做些什么来防止这种例外情况,我会喜欢它。
这正是它竟然是。在某些页面上,我们有谷歌分析,反伪造令牌等,这会导致域cookie的大小超过某些浏览器(safari,opera等)强加的4096字节限制。实施安全令牌缓存解决了问题。 – Jeff