locked
XmlException from Session Authentication Module

    Question

  • Following exception is observed in our Production system. Our application is based on ASP.NET MVC using Windows Identity Foundation to federate with ADFS for user authentication:

    Exception: 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 System.IdentityModel.Services.SessionAuthenticationModule.GetKeyId(Byte[] sessionCookie)
       at System.IdentityModel.Services.SessionAuthenticationModule.ReadSessionTokenFromCookie(Byte[] sessionCookie)
       at System.IdentityModel.Services.SessionAuthenticationModule.TryReadSessionTokenFromCookie(SessionSecurityToken& sessionToken)
       at System.IdentityModel.Services.SessionAuthenticationModule.OnAuthenticateRequest(Object sender, EventArgs eventArgs)
       at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep

    Any idea what can cause this exception? Any help in troubleshooting this exception would be helpful.

    Per my initial analysis, this exception occurs when empty FedAuth cookie(s) is submitted from browser to server. However, I am not able to figure out what would cause FedAuth cookie(s) to go empty rather than expired when a user signs-out of application.

    Tuesday, June 7, 2016 7:40 AM

All replies