cniknet wrote:
The problem occurs because when you call MyPage.aspx you are not providing a way for the portal detection code to figure out which portal the request is being made for. Change the URL to:
http://localhost/admin/MyPage.aspx?tabid=nnn
where nnn is the ID of any page on the child portal. This will get the data to display and also fix the logout problem.....
This is the kind of problem I expected, that perhaps it was wiping out the authentication because I loaded a page that did not maintain all the settings. However, the tabid=nnn doesn't do as expected for me. It actually loads the page whos tabid I give. I'm not loading a tab from the DB, I am loading a physical ASPX page I wrote.
i changed your suggestion to ...?portalId=nnn and it works! the data is pulled up properly, and it is able to load the UserInfo object as well! However, I still loose the authentication "sometimes" for some reason. I am not sure if it's because I am not handling this page right, or simply that DNN 4.0.2 has a logout bug: see http://forums.asp.net/1017591/ShowPost.aspx
I also added this code to be sure of my login status
If Request.IsAuthenticated then
Response.Write("Auth: Yes")
Else
Response.Write("Auth: No")
End If
Question: is it a breach of security to expose the portalId in the URL?? (my first thought is Yes, until proven otherwise)
Thanks all for the posts! Now if we can figure out the logout prob. :o)