I am trying to only allow the the Default web page to be viewed by authenticated users. I also want to grab a few of the fields from the Users Details and cutomize the Default page:
I added to the Sub Page_Load
Code:
If Not (TypeOf Context.User Is SitePrincipal) Then
Response.Redirect("/ARSurvey/Webmodules/Accounts/Login.aspx")
Else
lblGreeting.Text = context.User.Identity.Name
End If
If I use the check for context.user.identity.isauthenticated check then instead of my is siteprincipal check then I can view the page. The problem comes in when I attempt to pull user details using
Code:
Dim currentUser As New AccBusiness.User( _
CType(Context.User, SitePrincipal))
I get a cast error.
What am I missing, why can I use the CType(context.user.... in the MyAccounts page but when I use it in Default I get a cast error.
I just do can not figure out what I am missing here.