Search

Latest Community DotNetNuke Blog Posts

Mitchel Sellers DotNetNuke Blog
Thursday, July 02, 2009 4:16:00 PM

After doing this blog for almost three years I have came to a conclusion that I need to take a step back, and re-focus a bit and manage the content a bit more.  To do this, I am making a few changes, don't worry not only will you keep getting the same quality of content, but you will start seeing more content and a better organization system behind the scenes.  Overall this is a three step process, each phase of the changes will be outlined below.

Changes to Blogging on MitchelSellers.com

The first stage of change here is working to solidify the types of articles that will continue to be published via the communication channel.  I will continue blogging about .NET and DotNetNuke technical topics, as well as product reviews.  Therefore trying to stay with a more technical focus.

In addition to this, as part of becoming a C# MVP, you will start to see more C# articles here as well.

New Blog at IowaComputerGurus.com

The second stage of change is the introduction of a new blog on the company website, IowaComputerGurus.com.  This blog will become the new home for the best practices, case study, and "doing business" blog articles.  Trying to focus a bit on the proper implementation/leveraging of both the .NET and DotNetNuke platforms from a business perspective.  These articles will be less technical in nature and are geared more towards doing business, we hope to include success stories of DotNetNuke implementations as well.

NOTE: if you are an existing IowaComputerGurus customer and would like your project featured in a case study on the new blog, please e-mail me msellers@iowacomputergurus.com.

Tutorials Aggregation

The final stage of change will come from a future "tutorial aggregation" system.  This will be a new place for the storage of items that are currently being posted to this blog that are much more directly "tutorial" related; items such as the DotNetNuke installation, upgrade, backup and restore tutorials.  Right now, although very popular articles these are a bit harder for individuals to identify and access.

The exact plan and home of this new system is unknown, therefore, all blogs of this nature that are created will be tagged with the "Tutorials" tag, so they can still be easily identified.

Comments/Suggestions Appreciated

As with any change, some people will not like the direction that things are going, I welcome comments and suggestions on better ways to manage this information.  Otherwise, stay tuned for future blogs and announcements.

 

DotNetNuke Consultant Blog - Arrow Consulting & De
Thursday, July 02, 2009 12:26:43 PM
I’m very excited to announce our new website at www.ArrowDesigns.com. We’ve spent several months tweaking it and getting it just right and I’m really proud of what we have. Check it out and drop me a line to let me know what you think – ryan atsign arrowdesigns dot com. Some of the highlights: Software Consulting Web Design [...]
The Mighty Blog
Thursday, July 02, 2009 8:10:00 AM

There are quite a few events coming up in Florida in the next few months. They are all free, and most will give you the opportunity to win free stuff just for showing up. Awesome!  If you find yourself in or around any of these events, I strongly recommend you stop by.  I have been to most of them, and they are great.

All of the following information came from the Orlando DotNetNuke® Users Group (ODUG) website.  See our events page.

July 9 - Orlando DotNetNuke® Users Group
Will Strohl (nobody) will be talking about the Core DNN Blog Module.

July 14Orlando PASS
Chad Miller will be discussing Powershell with SQL Server.

July 15Space Coast .Net User Group
Oleg Sych will be presenting on VSTS and TFS.

July 16Orlando .Net User Group
Joe Healy (Microsoft Developer Evangelist) will be speaking about the developer features in IE8.

July 16Space Coast SQL User Group
Don King and Clay Seifert will be each presenting a different session. They will be speaking about SQL Server 2005 Clustering and SQL Server Analysis Services, respectively.

July 21Lakeland .Net User Group
This user group will be holding a session entitled “Lakeland’s .Net Speaker Idol” and it promises to be a fun time, where you will see speakers compete against each other for prizes.

August 4Orlando DotNetNuke® Users Group
DNN author, Darren Neese will be showing the new features in the DNN skinning engine.

August 18Space Coast .Net User Group
Topic and speaker TBA. (sorry…)

August 20Orlando .Net User Group
Christopher Bennage (MVP) will be showing the attendees SilverArcade.

August 20Space Coast SQL User Group
Joe Healy (Microsoft Developer Evangelist) shows the group SQL Server 2008 enhancements from a developers perspective.

August 29Jacksonville Code Camp
The Jax Code Camp crew overcame some very challenging obstacles last year. I was extremely impressed.  I expect them to put on a great event again this year.

September 5Tallahassee Code Camp
Tallahassee Code Camp was a great time last year.  They always have some great presenters on-hand.

September 10Space Coast SQL User Group
Jack Corbett will be presenting a yet to be determined topic.

November 5Orlando DotNetNuke® Users Group
DNN Blog Project Team Lead, Antonio Chagoury, will be presenting “Mashing Up Your DotNetNuke Using RESTful APIs.”

Brian Scarbeau
Wednesday, July 01, 2009 5:42:32 PM

Today marks the day when the Orlando DotNetNuke User group officially has 200 members.

image

It was a year and half ago that I started this group with about 7 members who came and met on a Saturday morning to discuss issues relating to the best open source web portal, DotNetNuke. Will Strohl was there along with a co-worker. Will has been a great member and now great leader of the group.

More recently, Will was in charge of putting together the Day of DotNetNuke held last month at the Microsoft Office in Tampa, FL.

Many members are benefitting from this user group and I wish it continued grown and success.

 

Technorati Tags: ,

Peter Donker
Wednesday, July 01, 2009 3:42:05 PM

After the good news for OpenForce US for this year (see this post) I am very pleased to have been selected to present at OpenForce EU as well. The sessions are entitled "Advanced Module Development in DNN", and "Extension Software Protection in DNN".

More...
ChrisHammond.com
Tuesday, June 30, 2009 1:09:38 AM

So tonight after work and before the St. Louis .Net User Group meeting I ran to Borders to see if I could find my book on the shelf. Well guess what, I did!

My book at Border's

I was pretty stoked to find it, but was shocked to only see the DNN4 book on the shelf, not any of the other DNN books. Well after digging around for a while I found them on another section, so I took the opportunity to organize a little :D Here’s the result.

DotNetNuke Books at Border's

DNN Creative Magazine
Monday, June 29, 2009 6:26:00 PM
July 2009

Welcome to issue 46 of DNN Creative Magazine

Issue 46 - DotNetNuke ASCX Skinning and Open Web Studio Tutorials

In this issue we look at the professionals method for creating DotNetNuke skins, ASCX skinning.

We did some quick research via twitter for the preferred method of skinning with the DotNetNuke professionals in the community and 100% of the skinners preferred the ASCX method for skinning.

ASCX skinning provides you with several benefits over the other methods of skinning in DotNetNuke. The main benefit is that it is much quicker to create a skin in DotNetNuke using the ASCX method.

Further benefits include you can make changes live on the website without re-parsing or re-installing the skin, you can instantly see edits and changes you make to your skin code, you can view at a glance all of a skin tokens properties, and a really useful feature is that if you are using Visual Web Developer Express it will suggest the attributes that are available for each of the DotNetNuke tokens.

We demonstrate all of these techniques and show you how to get started with ASCX skinning in DotNetNuke.

Accompanying the skinning, we have part four in our series on the Open Web Studio Tutorials. In this episode we demonstrate how to add personalisation to the knowledgebase module using InterModule Communications and creating a ‘my saved articles’ module. We also demonstrate how to create a Tooltip using JQuery, how to change the “fetching data” message, how to enable Rich Text / HTML articles and how to create a multi-category selection for each knowledgebase article.

Finally, we have a podcast covering the latest DotNetNuke News as well as more tips and tricks.



This issue comes complete with 11 Video Tutorials and 1 Podcast!

Tutorials:

Skinning:

 ASCX Skinning for DotNetNuke Professionals
DotNetNuke ASCX Skinning for Professional Skinners
(6 videos - 58mins)
Module Development Series:
R2i OWS Tutorial Part 4
Personalization, Text Editor, Logging and Reporting in Open Web Studio – Part 4 of 6 – How to Build a Public Knowledge Base with OWS
(5 videos - 58mins)
Podcasts:

DNNCreative Podcast with Lee and Rich
DotNetNuke News, DataSprings Dynamic Forms, DNN 5.1 Professional, Openforce 09, Snapsis PageBlaster
(25mins)

View issue 46 to download all of the videos in one zip file




DNN Creative Magazine for DotNetNuke Web Designers
Covering DotNetNuke module video reviews, video tutorials, mp3 interviews, resources and web design tips for working with DotNetNuke.

In 46 issues we have created 441 videos!
DotNetNuke Developer
Monday, June 29, 2009 5:37:25 PM
So it’s been way too long, 6 months to be pretty exact, since we had a new release for Engage: Publish . Well last Thursday it finally came! We released Publish 5.4 on our website, though without announcement because of everything else we have had going...(read more)
AppTheory DotNetNuke Blog
Sunday, June 28, 2009 8:35:00 PM
We had a DotNetNuke client report today that they could not directly access .xml or .swf files that they could previously get to from their portal. So of course the first thing we did verify the files in question were actually on the file system, they were. We knew this particular client had moved hosts recently so we checked al the IIS configurations and the file mime types were registered and allowed to be served so that was not it. We were then made aware that the sites 3rd party URL rewriting had recently been updated. This peaked our interest an after a little digging we discovered that with this particular URL rewriter you had to explicitly ignore file extensions through regular expression matching exposed as a property on the friendly URL provider. After adding the ignores for said extensions everything was back to normal. So if you see anomalies in content being served and you have verified IIS is setup correctly. Then the next place to look on a DotNetNuke installation is typically the portals friendly URL provider.
The Mighty Blog
Sunday, June 28, 2009 3:31:00 PM

I was recently asked how someone could manually delete a module once it is installed. The number of use cases where this would be useful is limited, but it is still a valid scenario that needs to be considered – especially during development.  Here is a walk through of the general steps required to delete a module manually.

  1. Run the Uninstall script (if necessary)
  2. Delete the module files from the DesktopModules and App_Code folder
  3. Grab the DesktopModuleId
  4. Delete the permissions associated with the module
  5. Delete the module from the database
  6. Refresh the site cache to update the UI with your changes

While I have not fully verified these steps to be the same in DNN version 5.x, they should generally be the same.  Here is some guidance to follow each of the defined steps above…

WARNING!  Performing these steps incorrectly could result in your DNN site being broken and/or no longer accessible.  In some cases, this might be permanent.  It is HIGHLY recommended that you perform a complete backup of your database and file system before performing these steps.  Doing so will give you a restore point, should something go wrong.

Run the Uninstall Script

Not all modules require a Data Access Layer (DAL), as some modules only perform utility functions and do not need to save and retrieve information from the database.  The majority of the module out there do have a DAL though, and in turn will have an uninstall script in their folder.  Look for a file named Uninstall.SqlDataProvider in the DesktopModules folder for the module you’re deleting.  Here is a reference path for you to use:

~/DesktopModules//Uninstall.SqlDataProvider

Assuming your module is named “WNSUtility”, the above path would look like this:

~/DesktopModules/WNSUtility/Uninstall.SqlDataProvider

Using the SQL Module in the Host Menu, execute this script.  Be sure to load the script, and then check the checkbox for Run as Script before you execute it.

Please Note:  If you are using a different Data Provider, the file extension for your uninstall script will be different.

Delete the Module Files

Deleting the files from a module is easy.  Find the module directory for your module.  Using the example from above, it would be:

~/DesktopModules/WNSUtility/

Delete all files from that directory, and the directory itself.  You might run into one or more errors do to files being loaded into memory.  Should this happen, you can release the file(s) from memory by recycling the Application Pool, or restarting IIS.

Grab the DesktopModuleId

This is a very important step, as the final two steps would be incredibly difficult without the DesktopModuleId.  There is not always an exact science to finding the DesktopModuleId, but we will need it for the following steps.  In most cases, I simply perform the following query on the database:

SELECT * FROM [dbo].[DesktopModules] 
WHERE [IsAdmin] = 0 
ORDER BY [FriendlyName] 
-- or 
SELECT * FROM {databaseOwner}{objectQualifier}DesktopModules 
WHERE [IsAdmin] = 0 
ORDER BY [FriendlyName] 
 

From the above script, locating the module in question is usually easy.  Simply find the module using its Friendly Name, and then record the DesktopModuleID associated with it.

Delete the Module Permissions

This step gets executed in three parts.  As long as there aren’t a lot of instances of the module in your site, these queries should execute quickly, and error free.

Using the DesktopModuleId from the previous step, execute the GetModuleDefinitions stored procedure, taking note of each ModuleDefID.  For each module definition returned, you will next need to execute the GetPermissionsByModuleDefID stored procedure, this time taking note of each PermissionID.  Finally, execute the DeletePermission stored procedure for each PermissionID that was returned.

Delete the Module from the Database

Now, we actually delete the module.  Doing so is very easy.  Like the previous step, we just need to execute a stored procedure using the DesktopModuleID we grabbed a little while ago.  Execute the DeleteDesktopModule stored procedure to delete the module.

Refresh the Site Cache

The final thing to do is to clear the cache on the site to remove the module from all of the user interface, such as the drop down lists.  You just need to clear the cache on the site.  I have blogged about clearing the DNN site cache before.

The Mighty Blog
Saturday, June 27, 2009 9:33:00 PM

DotNetNuke Gear Logo In DotNetNuke®, a favicon of the DNN gear logo is placed as the default favicon.  For some websites, this is no big deal.  However, for any site that requires its own branding, changing the favicon is a really big requirement.  Luckily, DNN makes changing this easy, and flexible.

First of all, in the root of your DNN site, there are two favicons:

  • favicon.ico
  • DotNetNuke.ico

Both files contain the same image, the DNN gear.

You could just overwrite the favicon file with your own.  However, that is technically making a core code change, and if you end up putting a second portal on your DNN instance, both sites will be using the same favicon.  This will likely put you into the same position that you originally were in, in the first place.

The real solution is to put your favicon into the root of your portal directory, saved as favicon.ico.  For example, for the root site, your file name and path might match the following:

~/Portals/0/favicon.ico

When your site is loaded, the DNN framework will automatically grab and send the new favicon to the web browser, instead of the one on the root of your DNN installation.  This will work for each and every portal that you have as part of this single DNN instance.  For example, if you have 50 portals hosted in your DNN instance, each one can have its own unique favicon using this method.

Technorati Tags: ,,,
CTO 2.0 - Antonio Chagoury
Saturday, June 27, 2009 8:32:49 PM

Yesterday afternoon Hal Hayes and I were invited to speak at the SharePoint Technology Conference hosted and organized by the SharePoint User Group DC (SUGDC).

The event was packed with sessions hosted by leaders and top professionals in the Microsoft SharePoint space. I was quite honored to be invited to speak, and if that wasn’t enough, I was speaking more on behalf of DotNetNuke rather than SharePoint.

More...
The Mighty Blog
Saturday, June 27, 2009 5:06:00 PM

The Orlando DotNetNuke® Users Group (ODUG) is not very old.  We are still working toward finishing our second year as a user group.  Our first meeting was February of 2008.  However, it was several months later before we actually were able to claim our status as member of INETA.  Well, a few days ago I was reminded of this, as there was a package that showed up for me at work.

Looking at the package, I was confused since it was from INETA.  I wasn’t expecting any packages, much less one from INETA.  When I opened it, I was greeted with a pleasant surprise.  It was a mounted certificate, celebrating our one year anniversary with the INETA user group program.

For those of you who are not sure what that means… INETA sponsors user groups in a way that most other organizations cannot.  It gives support in a number of ways to user group leaders.  The most notable way they sponsor user groups comes in the form of flying in speakers.  INETA provides two speakers per year, with all of their expenses paid.  So far, we have only used one of these.  INETA flew in Chris Hammond to us earlier this year.  We are already planning to use our 2nd one in December of this year.

I have only one thing to say, “Thank you, INETA!”

The Mighty Blog
Friday, June 26, 2009 10:03:00 PM

I wasn’t really listening to podcasts until a few months ago.  I just really didn’t find anything that truly interested me to the point of putting down my personal 60+ GB of music and streaming my favorite radio stations.  Not to mention, I am a fan of the popular streaming service known as Pandora.  Anyway, I found the DotNetNuke Podcast about that time, and shortly after, DNN Voice was born.  Since I am so passionate about DotNetNuke®, I began listening.  Right now, I only know of those two DNN podcasts.

I have been listening to both podcasts for a while now.  Honestly, I like them both.  They have a different focus, and because of that focus, both are going to have a different fan base. 

DotNetNuke Podcast

DotNetNuke Podcast Address:  http://www.dotnetnukepodcast.com
Host(s):  Lee Sykes and Richard Wooten (cannot find personal blog links)
Background:  Lee Sykes is the original person behind the DNN Creative Magazine website, which sells DNN tutorials and videos.  It has become one of the primary places to get DNN “how to” information on the Internet.  Richard Wooten is also part of DNN Creative, since February of 2008.  Both have been using DNN for a long time, and have a great deal of knowledge in using DNN.

It is fun to listen to the DotNetNuke Podcast.  Lee and Richard have a great chemistry, and it translates well into the podcast.  They basically speak about of the new things that they have heard about in the DNN ecosystem.  It almost feels like they each have a separate list of bullet points.  They talk about community news and information, but it usually not very much of their podcast.  Overall, they have some great information.

I love their summary on their website for each episode.  While it doesn’t look like their is a whole lot of organization to the information, it is well laid out for us to follow along on their site.  There is an RSS feed that is available to you to help you keep track of new episodes.  I have also seen Lee promote the shows on twitter.  Since I check twitter more often than I do my RSS reader, that’s how I usually get informed of the newest episodes.

In their About Us page, they ask for community input for the show.  That is really cool.  I haven’t noticed them mention any of their content coming from this feature though.

Some of their ecosystem “news” is sponsored.  While I understand why, and I don’t disagree with it (I am beginning something similar on my blog), I would much rather hear about ecosystem products and news that they find interesting or are passionate about for personal reasons.  In the end, it is still good information though, so it isn’t a deal breaker at all for me.

I am disappointed that community information doesn’t take a higher priority in the information they pass on to their listeners.  In my opinion, the community information is often more important than the ecosystem information.  Sure, they mention something about community here and there, but it is clearly not as much of a priority as I think it should be.

Something I really do not enjoy is the other tech news that get injected into the podcast, and this is a deal breaker.  The podcast is called “DotNetNuke Podcast”.  When I listen to it, I do not expect or want to hear about other technologies unless they have a relationship to the word “DotNetNuke”.

DNN Voice

DNNVoice Address:  http://www.dnnvoice.com
Host(s):  Chris Hammond and Tom Kraak
Background:  Chris Hammond is a DNN Core Team Member, and the Project Lead for the Wiki Module.  In addition, he is the for Engage Software, the Official DotNetNuke® training provider.  Tom Kraak is an SEO Expert and principle consultant at Seablick Consulting, specializing in the DNN ecosystem.  Like Richard and Lee, Chris and Tom have been using DNN for quite a while and have a great deal of DNN knowledge.

Full Disclosure:  Even though I feel that I am pretty good at being objective, I do feel that it’s only fair to let you know that I have developed a personal relationship with Tom and Chris.  We speak regularly on twitter and the IM, and I have had them speak at our ODUG meetings.  Also, I did give some input to Chris about the podcast for the first few episodes.  So, while I believe that my review here is completely objective, you can use your own judgment and form your own opinion when I am done.

The DNN Voice podcast is very well-structured.  I has a pre-defined format that it follows the same path for nearly every episode.  For those of us that are techies (most of the audience), it gives us the routine that we typically enjoy.  I really like that the various sections have an audible queue to let us know when the next section is coming, and what it is.  Like the radio, it helps us to know when the next segment is coming.

Similar to Richard and Lee, Chris and Tom also have a great chemistry and it comes across well during the podcast.  Both podcasts do a great job of keeping each episode fun in the same way.  It sounds like we are eavesdropping on two friends having a good time talking about technology.

DNN Voice places a much higher emphasis on listener input by making it a prominent link on all pages on the site.  They also make this part of each episode, making it clear to the listener that their input is not only welcome, but they might hear it on the show.

In general, I do not think that we could have a podcast that isn’t sponsored in some way.  We must find a way to justify the time we spend on projects such as this.  DNN Voice’s sponsorship is less transparent than the previous podcast.  It is clear that the podcast has an affiliation with Engage.  Once again, this is not a deal breaker.

The main thing I really love about DNN Voice is that it appears to be a much better mix of community and ecosystem information.  This is very important to me.  In my opinion, the ecosystem is only successful and exists because of the community.

Like the DotNetNuke Podcast, DNN Voice makes its announcements for the podcast available through RSS and twitter.  However, DNN Voice takes this a step further by making the show available as a subscription through Zune and iTunes.  Also, while both podcasts offer up a comments mechanism on their site, DNN Voice takes this another step further by allowing their visitors to rate each individual podcast.

In Conclusion

Each podcast definitely has its own focus and specialty.  DotNetNuke Podcast seems to cater to the DNN’er who is mostly concerned about technology in general, and the DNN ecosystem.  DNN Voice appears to have its focus pointing directly at the DNN community member, and still includes more information, but stays within the DNN umbrella. 

I think it’s clear that I prefer DNN Voice over the DotNetNuke Podcast.  However, I cannot say that one is better than the other.  That depends on what you want in a podcast.  They each fill a void in the DNN podcast market.  However, all of the voids are not yet filled… Any new podcasters out there? :)

TressleWorks
Friday, June 26, 2009 6:20:00 PM

I required an enhanced IFrame Module that will "blur" the parameters being passed to the page referenced in the IFrame.  The issue is passing parameters in clear text is considered "bad form" by Web Inpection tools such as HP's WebInspect.  While the DNN site in a intranet site, I guess the need to "blur" the parameters does have merit. 

So I need to revise the IFrame to "blur" the parameters --  I am going to modify the parameters passed in one of two ways -- Base64 encode the value string -- this will make the effort of determining what is passed difficult for a snooper of the HTML source.  The other way will be to Encrypt the data using the standard encryption provided by .Net. 

However is creation of the module turns into a real problem with multiple control definitions for a module.

More...
AppTheory DotNetNuke Blog
Friday, June 26, 2009 10:11:41 AM
Requirements are the cornerstone for the project scope. These have to be clearly defined if you wish to be successful in the execution of your project.
Engage Software
Friday, June 26, 2009 9:52:24 AM

At Engage we do a lot of cool work with websites, and when we hand-off the projects there is always a pang in my heart that I’m sure parents feel when they see their child off to summer camp for the first time. “Will the website survive all the bullies? I hope they don’t learn curse words (bad markup).” One of the major benefits to working with a content management system like DotNetNuke is that you can distribute content administration privileges to users who wouldn’t normally manage a website. The tools DNN provides help to make editing content easy. But this can also lead to a website that looks like it is managed by multiple people with various ideas on what looks good (font sizes, font styles…).

At Engage we utilize a number of tactics to help ensure that websites can be properly maintained after the hand-off from our implementation services to our customers ownership and management of their site. On my personal blog, I outlined some tricks we use to make the FCKEditor (the Rich Text Editor in DNN) really easy and fool-proof for content administrators. Check out how to optimize the FCKEditor for DNN on my personal site. If you’re interested in some of the other tactics (hints: advanced skinning tricks, custom training…) we use, please contact us about how to make your DNN site really hum.

The Mighty Blog
Thursday, June 25, 2009 5:07:00 PM

There may come a time when you will want to programmatically add a user to an existing role in DotNetNuke®.  It’s actually quite easy.  If you take a look at how the core code in DNN does it, just emulate that.  This method of using and reusing the existing DNN core code is what DNN development is supposed to be about, so make sure you don’t reinvent the wheel.

In the source code for DotNetNuke®, there is a controller class for nearly everything that you want to do with the various objects that you work with in DNN every day.  Since I am familiar with the DNN source, I knew where to go.  But many people are not familiar with the source code.  In those cases, you need to either do some searches in the Object Browser, or browse around until you find the code you’re looking for.  Thinking it through logically, you can usually browse right to the code you’re looking for since the core team has done a fantastic job of keeping the code files organized.

Keep all of that in mind, I immediately gravitated to the Security folder of the Components directory.  I did this because roles are part of the security framework in DNN, and all of the entities and objects are in the Components folder.  Inside this folder, I saw and opened the RolesController.vb file.  To make this clear, I opened the following file in the DNN source code:

~/Library/Components/Security/Roles/RoleController.vb

The controller classes are usually what we are looking for when we want to utilize the existing logic in DNN.  So, if I want to manage a role by putting someone into it, I naturally wanted to look for a Role Controller already – before I even opened the source code solution.

One of the methods of the RoleController class is AddUserRole(), and it has a few overloads.  We are only concerned about the root method right now.  This method accepts a few arguments, and when successfully called, it adds an existing user to an existing role.

RoleController.AddUserRole(integer PortalID, integer UserId, _ 
    integer RoleId, date EffectiveDate, date ExpiryDate)
 

Using this method may look self-explanatory, but I will explain it anyway.  When you intend to use this method, you should already have access to an existing UserInfo object, and a RoleInfo object.  Both are regularly available through standard module development.

  • PortalID (integer) – This is the id number representing the portal where the user and role exist.  The SqlDataProvider will use this value to correctly match up the objects.
  • UserId (integer) – This is the id number matching the user that you want to add to a role.  Most often, you would simply access this value from the PortalModuleBase class that your module inherits.
  • RoleId (integer) – The id number of the role can be found from any number of ways.  We can only assume that you already have access to this right now.
  • EffectiveDate (date) – This is the date that you want the role assignment to begin.  Usually, the current date is what you’re intending to pass to this argument.  This argument accepts a null value.
  • ExpiryDate (date) – This should be the date that you want the role assignment to expire, and as a result, the user will be removed from it.  This argument accepts a null value.

In more recent versions of DNN, there is also another value which we do not pass to the method.

  • CreatedByUserID (integer) – This is a value implemented for auditing purposes, to let us know who added the person to the role.

Let’s assume that we have a UserID of 123 and a RoleID of 10.  Going further, we will also assume that this is a first instance of a portal, equaling a PortalID of 0.  The most common role assignments do not pass an EffectiveDate or an ExpiryDate.  We will use this as an example as well.  Here is how we would call the method:

' we are assuming that you already have an intRoleId from your logic
RoleController.AddUserRole(Me.PortalID, Me.UserId, intRoleId)
' ... or ...
' Here we assume a role assignment for 30 days, beginning now
RoleController.AddUserRole(Me.PortalID, Me.UserId, intRoleId, DateTime.Now, DateTime.Now.AddDays(30))
 

That’s all there is to it! :) Easy, right?

The Mighty Blog
Thursday, June 25, 2009 3:58:00 PM

The trend recently seems to be that comments and topics are brought up on twitter, and they end up growing to be something more outside of it – especially in the world of DotNetNuke® that I have immersed myself in.  Today was no different.  A fellowDNN twibe member and also a member of the Orlando DotNetNuke® Users Group ODUG), Mike van der Meulen, gave me a friendly jab about using my blog, W3Schools, and RezHub.  They each have a different demographic. 

AppTheory DotNetNuke Blog
Thursday, June 25, 2009 11:11:00 AM
The nice thing about Amazon Web Services Elastic Cloud Computing is the ability to setup testing instances. You only need these instances to be available part of the time. The problem with launching new bundles is that sysprep is run and the instance is renamed each time a launch occurs.
RSS URL

About Us

Why DotNetNukeBlogs.com? Our goal is to be the premier aggregator of DotNetNuke related materials. DotNetNukeBlogs.com was started by DotNetNuke Core Team member Chris Hammond with the intention to provide a place for the leaders in the DotNetNuke Community to push their content to those needing it most, the users.

Stay tuned as we continue to grow. If you're a DotNetNuke Expert be sure to get your feed added into our aggregate system.

You can read more about us here

Built On DotNetNuke

This site is built with and supports the DotNetNuke open source project.
DotNetNuke Powered!

Resources

DotNetNuke.com The DNN mothership.

Community-Credit.com A place to aggregate all of your community contributions and recieve recognition for these contributions.

DotNetNuke Training from Engage Software

Copyright (c) 2009 DotNetNuke Blogs On DNN, For DNN

DotNetNuke and DNN are trademarks of DotNetNuke Corporation