Server Error in '/' Application.

Unable to cast object of type 'System.Security.Principal.GenericIdentity' to type 'System.Web.Security.FormsIdentity'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidCastException: Unable to cast object of type 'System.Security.Principal.GenericIdentity' to type 'System.Web.Security.FormsIdentity'.

Source Error:


Line 583:
Line 584:	Protected Sub readData()
Line 585:		Dim editorIDentity As FormsIdentity = Context.User.Identity
Line 586:		Dim ticket As FormsAuthenticationTicket = editorIDentity.Ticket
Line 587:		Dim user As String = ticket.Name

Source File: D:\Sites\web_6588224314341181882423922\www\admin\module\module_article_7_0.ascx.vb    Line: 585

Stack Trace:


[InvalidCastException: Unable to cast object of type 'System.Security.Principal.GenericIdentity' to type 'System.Web.Security.FormsIdentity'.]
   module_article_7_0.readData() in D:\Sites\web_6588224314341181882423922\www\admin\module\module_article_7_0.ascx.vb:585
   module_article_7_0.Page_PreRender(Object sender, EventArgs e) in D:\Sites\web_6588224314341181882423922\www\admin\module\module_article_7_0.ascx.vb:323
   System.Web.UI.Control.OnPreRender(EventArgs e) +9884298
   System.Web.UI.Control.PreRenderRecursiveInternal() +90
   System.Web.UI.Control.PreRenderRecursiveInternal() +163
   System.Web.UI.Control.PreRenderRecursiveInternal() +163
   System.Web.UI.Control.PreRenderRecursiveInternal() +163
   System.Web.UI.Control.PreRenderRecursiveInternal() +163
   System.Web.UI.Control.PreRenderRecursiveInternal() +163
   System.Web.UI.Control.PreRenderRecursiveInternal() +163
   System.Web.UI.Control.PreRenderRecursiveInternal() +163
   System.Web.UI.Control.PreRenderRecursiveInternal() +163
   System.Web.UI.Control.PreRenderRecursiveInternal() +163
   System.Web.UI.Control.PreRenderRecursiveInternal() +163
   System.Web.UI.Control.PreRenderRecursiveInternal() +163
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +906


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4700.0