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  |  

AppTheory specializes in solutions based on the DotNetNuke platform and has 2 employees on the DotNetNuke Core Team.
  Ads  
Active Modules -- Active Forums for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

Jango Studios - Skins, Modules and Hosting for DotNetNuke
eUKhost.com is commited to offer exceptional UK Windows Web Hosting solutions with quality 24x7 technical support.Our plans support ASP.Net, ASP, ASP.NET Ajax extensions, XML, MSSQL, MySQL, PHP,DNN, multiple domains and Shared SSL as standard.
SmarterTools
The Official Microsoft ASP.NET Website
Portal Webhosting - Hosting For Developers
Red-Gate Software
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Module behaving differently when logged in as host
Previous Previous
 
Next Next
New Post 9/12/2008 3:15 PM
Unresolved
User is offline AndySmith
4 posts
10th Ranked


Module behaving differently when logged in as host 

Hello all,

I am very new to DNN though I've been programming in asp.net for a few years and I'm not understanding how modules behave in DNN. We are using 4.08.04.

I've created a new module in visual studio using the starter kit called TestModule. (File -->  New File --> Dot net nuke dynamic module).

I altered the ViewTestModule.ascx Page_Load fuction to call the following code that displays information about the logged in user:

                DotNetNuke.Entities.Users.OnlineUserInfo mRoles = new DotNetNuke.Entities.Users.OnlineUserInfo();
                DotNetNuke.Security.Roles.RoleController mUserRoles = new DotNetNuke.Security.Roles.RoleController();
                DotNetNuke.Entities.Users.UserInfo mUser = DotNetNuke.Entities.Users.UserController.GetCurrentUserInfo();


                string showroles = string.Empty;
                foreach (string i in mUserRoles.GetRolesByUser(mUser.UserID, mRoles.PortalID))
                {
                    showroles += i.ToString() + ",";
                }


                lblTest.Text = "UserName: " + mUser.Username;
                lblTest.Text += "<br> FullName: " + mUser.DisplayName;
                lblTest.Text += "<br> UserID: " + mRoles.UserID.ToString();
                lblTest.Text += "<br> Roles:  " + showroles;

 

This works fine when I log in as host, the page_load event fires everytime. However if I log out then log in as admin or another user, the page_load event on the user control does not fire. It makes no sense. I tried setting the caching for the module to -1, that didn't help. It seems like the code itself is behaving differently if I'm logged in as "host". Any clues as to what I'm missing here?

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Module behaving differently when logged in as host
 


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.

 


Convert Visitors to Customers
In order to bring value to your users, we must first understand them. VIVIDSITES will help you build a custom web application and interactive marketing tools that your users will thank you for. We marry high-end creative with head banging technology to entertain and convert visitors into paying customers. Call 314.514.0505 or visit us at http://www.vividsites.com to find out how.
- V I V I D S I T E S -
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

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