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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Using DNN membership for other appsUsing DNN membership for other apps
Previous
 
Next
New Post
5/23/2006 10:18 AM
 

I recently installed DNN 4.02 and setup a quick Intranet.  I like the DNN user, profiles, and roles and would like to somehow integrate the membership with some existing apps I created outside of DNN.  In my apps, I just need to verify the user is on the appropriate role, and get some basic info like name, email, etc.

I tried creating a subfolder under the root of my DNN install containing the existing app, then I created a DNN page linked (to external page) to this directory.  I changed the page load of my test app to include the following:

Imports DotNetNuke.Framework
Imports DotNetNuke.Entities.Users

Partial Class test
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim objUserInfo As UserInfo
objUserInfo = UserController.GetCurrentUserInfo()
TextBox1.Text =
CType(objUserInfo.Username, String)

End Sub
End
Class

After logging in to the DNN site, then clicking the link to my pre-existing app (within the DNN root directory) the texbox is just supposed to show me the username of the current user.  I know I must just be missing something obvious, but I can't seem to access any User Info from my application.  I didn't really want to rebuild my apps as modules to use the DNN framework and like I said, all I need is to verify a role and get basic user info.

Any help would be appreciated.

Phil

 
New Post
5/24/2006 7:27 AM
 

After digging through the forums I found a tip that the admin directory has certain characteristics that allow direct access via an aspx page to the DNN membership.  Sure enough, I moved my subfolder and app under the admin folder, didn't change a line of code, and now it works. 

This is good, but it means the URL to the apps will be ~/admin/myapp/default.aspx

Is there anyway to extend the special characteristics of the admin folder to another folder as well?  That way I wouldn't have to put everything under the admin folder.

Thanks,
Phil

 
New Post
5/25/2006 9:02 AM
 
Where's the post that claimed the admin directory has "special characteristics?" That sounds very odd. Off the top of my head, the only thing that would provide this would be a admin\web.config file, which there is none. Well, either that, or hard-coding some rule that allows things from that directory, which would seem to me to be stupid.

Try to move your app to the DesktopModules directory. See if that works, too. Not that this is a solution, but I'm wondering if other directories have these supposed "special characteristics."

BTW, I'm not saying I don't believe you, I just think it sounds odd.

Michael Flanakin | Microsoft Consulting Services
www.michaelflanakin.com
 
New Post
5/26/2006 10:31 AM
 

The post I read was from sometime back in Jan referring to the admin folder being a "reserved" or "dedicated" directory that you can directly access from the URL. 

Thanks for the suggestion, I did move it to the DesktopModules directory and it also works.  This is good because it means that I'm not restricted to the admin folder.  I haven't yet tried other folders, but I am inclined to believe you that there isn't anything specifically special about the admin folder, however, I still can't get the code running from a new (non-DNN) folder placed in the root directory.

At this point I'm back to my first post, thinking that it must be something obvious that I am missing to access the DNN membership properties.  Is there something special that needs to be done to create a new directory in the root of the application, or something that has to be done to make DNN aware of it?

Thanks for your help, I appreciate your clarification and patience.
Phil

 
New Post
6/5/2006 10:03 AM
 
I actually did a little investigation to see what could be different and I discovered that the Portals\_default\subhost.aspx page checks for four directories: admin, desktopmodules, mobilemodules, and premiummodules. Try moving your file to a custom directory and changing this file to include your root directory name in this case statement (line 17). Let us know if it works!

Michael Flanakin | Microsoft Consulting Services
www.michaelflanakin.com
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Using DNN membership for other appsUsing DNN membership for other apps


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