Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsOther Extension...Other Extension...dll with httphandlers to get logged userdll with httphandlers to get logged user
Previous
 
Next
New Post
11/7/2011 5:48 AM
 
Hi all,

i'm new of dnn, hope someone can help me.

I developed a HttpHandler that have to check the portal user logged and store in an oracle schema some info for later usage.
I have published the handler in a dll, put it in the bin directory and mapped the handler in web.config of dnn.

The handler correctly resonde at my url request, correcly see the user is logged or not, but doesn't retrieve the user logged information.

Here the part of the code i use, the problem is that the UserInfo returner are always empty (as the user is not logged into dnn)

if (context.User.Identity.IsAuthenticated)
{
  DotNetNuke.Entities.Users.UserInfo userInfo = DotNetNuke.Entities.Users.UserController.GetCurrentUserInfo();
}


(just to know i: to check if user is logged i even used HttpContext.Current.User.Identity.IsAuthenticated and Thread.CurrentPrincipal.Identity.IsAuthenticated, all of them works correctly but userInfo retrieved are always empty)

Hope someone can tell me what is my mistake or help me telling the correct way to get user logged info.
Thanks in advance
   Denis


 
New Post
11/7/2011 2:11 PM
 
I've done a similar thing - check out IWebLite here: http://iweblite.codeplex.com/releases... - what they did was to reference DotNetNuke.Security.Membership then by calling the MembershipProvider.Instance().GetUserByUserName(portalId, HttpContext.Current.User.Identity.Name)

Hope this helps


Andrew Walker

Learn to make your own beer and wine at homeIf you enjoy making your own beer and/or wine - be sure to check out http://www.ForemostBrewing.com
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsOther Extension...Other Extension...dll with httphandlers to get logged userdll with httphandlers to get logged user


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out