I am setting up forms authentication.
In my code I keep getting this error. Any ideas?
Error....
Server Error in '/LandOLots' Application.
--------------------------------------------------------------------------------
Specified cast is not valid.
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: Specified cast is not valid.
Source Error:
Line 45: ' Fires upon attempting to authenticate the use
Line 46: If Request.IsAuthenticated Then
Line 47: Dim fiIndentity As FormsIdentity = CType(User.Identity,
FormsIdentity)
Line 48: If fiIndentity Is Nothing Then Exit Sub
Line 49: Dim fatTicket As Security.FormsAuthenticationTicket =
fiIndentity.Ticket()
Source File: c:\inetpub\wwwroot\LandOLots\Global.asax.vb Line: 47
Stack Trace:
[InvalidCastException: Specified cast is not valid.]
LandOLots.Global.Application_AuthenticateRequest(O bject sender, EventArgs
e) in c:\inetpub\wwwroot\LandOLots\Global.asax.vb:47
System.Web.SyncEventExecutionStep.System.Web.HttpA pplication+IExecutionStep.Execute()
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously)
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET
Version:1.1.4322.2032