Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

$4.95 Windows Hosting at Webhost4life.com
  Ads  
Engage Software - Training Partner for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

Portal Webhosting - Hosting For Developers
Red-Gate Software
MaximumASP
SourceGear - Tools for Developers
.: CounterSoft :.
telerik
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Using DNN membership for other apps
Previous Previous
 
Next Next
New Post 5/23/2006 8:18 AM
User is offline Phil Mowrey
4 posts
10th Ranked


Using DNN membership for other apps 

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 5:27 AM
User is offline Phil Mowrey
4 posts
10th Ranked


Re: Using DNN membership for other apps 

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 7:02 AM
User is offline Michael Flanakin
994 posts
www.michaelflanakin.com
7th Ranked




Re: Using DNN membership for other apps 
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 8:31 AM
User is offline Phil Mowrey
4 posts
10th Ranked


Re: Using DNN membership for other apps 

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 8:03 AM
User is offline Michael Flanakin
994 posts
www.michaelflanakin.com
7th Ranked




Re: Using DNN membership for other apps 
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 Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Using DNN membership for other apps
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Gearworx Web Hosting
As a premier provider of Web Hosting, Private/White Label hosting, Server Colocation, Dedicated Server, and other Managed Services, Gearworx offers an array of services designed to more effectively manage strategies driving businesses on the Web. Headquartered in Fremont, California our state of the art tier one data centers and distributed managed services environment enables Gearworx to offer your business enterprise level solutions through simplified processes.
Gearworx Web Hosting
Glanton: Enterprise Intranet Specialists Using DNN
Glanton Solutions are a premier provider of sevices for large corporates lloking to outsource Intranet sites.
www.glanton.com
Jetkey Smart Map
Smart Map is an AJAX powered Google Map module that displays driving directions, proximity search results and data from your own databases. Smart Map reads GPX (GPS data) files, GeoRSS feeds, and KML data. You can pass any querystring parameter to Smart Map and into your own custom queries to control what data displays on the map.
smartmap.jetkey.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP