By xram net on
7/28/2009 12:38 PM
DotNetNuke using only Active Directory authentication

I’ve developed a few DotNetNuke 4.9.x sites that use the Active Directory authentication provider, and on the whole, it works quite well. DotNetNuke caches the given username and password, using that to query the domain when a user attempts to log in. On the sites in question, having both the standard DNN and Windows login was confusing to the users, so I disabled the DNN login by going to Admin –> Authentication and unchecking Enabled? under DNN Auth Settings. This cuts out the ability to log in as host, so every time host functionality is needed, the site must be logged into using an AD user with admin privileges, DNN login must be re-enabled, and then you can log back in as host.
However, upon updating my domain password, I noticed that all of the AD-enabled sites broke. Without being able to log in using the DNN login, and with no AD logins working, what was I to do?
Hidden In The Database
The answers are not clear from any of the DNN forums, but it turns out when you enable Active Directory integration for a portal, a module is created to store the configuration. The DNN standard login has no settings of its own. To re-enable DNN login from the database, look through the ModuleSettings table for a ModuleID that has entries prefixed with AD_. There are two other settings for the same module, prefixed with DNN_. The setting we’re looking for is DNN_Enabled, which, if you had DNN login disabled, should be false. Simply changing that back to true should give you back your DNN login ability and get you back onto your site.
Avoiding This Issue In The Future
The best way to avoid this is to create an additional user in your AD with no rights—all it has to do is authenticate as a valid user. I went with dotnetnuke-ad, but you could chose anything. Give is a sufficiently difficult password, and set the password to never expire. This way, you never have to worry about your password changes taking down your DNN site.
|
By xram net on
7/22/2009 10:32 PM

While working on a client’s site, I used an http handler to call a very well thought-out image resizing class I found via CodeProject. I removed the ability to use named keys (lines 42, 51-62, & 276-336), opting instead for controlling width and/or height explicitly. Since it’s a .NET 2.0 app, the Linq code in GetImageDimensions would have had to go anyway. I didn’t realize how much I’ve come to love LINQ until I went back to write some new SQL code for this project… Also, I removed the dimension check to prevent the image from being upscaled—I needed it to work both ways (lines 239-246).
With the code in place, the image resizing worked great. The images resized properly, but after attempting to use a management app located in a subdirectory, I realized that the custom http handlers were being inherited by all of the children, causing all sorts of trouble. Since one of the apps is a virtual directory controlled by the webhost, editing the individual web.config files wasn’t possible. I guess the ASP.NET team had run across this before, because they created the location tag and its inheritInChildApplications attribute.
My first attempt to wrap only the httphandlers section didn’t work, but wrapping the entire system.web section did the trick. Now, all of the sub apps are working well where they’re at, and the images are resizing perfectly.
|
By xram net on
7/6/2009 9:01 PM
We’ve heard that the internet is the great equalizer, giving everyone access to the sum of humanity’s information. Internet access supposedly fosters better decision-making regarding our health, wealth, leisure, and every other aspect of our lives. To anyone who grew up around computers with internet access, this seems obvious. To people who didn’t, though, the apprehension surrounding sitting down at a keyboard can be terrifying: - “What if somebody steals my social security number?”
- “What if I delete all of my files?”
- “What if I get so frustrated that I throw it out the window?!”
At a recent non-profit networking event, a colleague of mine and I met a Philly local non-profit whose mission statement, Eliminating the barriers of computer illiteracy, was too good to pass up. The group, Quest For Tech, is always looking for more teachers who can give a night every week or two to meet with students one-on-one for two hours. For students, it’s a great deal. $75 gets you five 2-hour lessons, picking up at your level of experience. Don’t know how to turn your computer on? That’s okay. Want to learn how to send photos to your children or grandchildren? Not a problem. The teachers (myself included!) are competent and can handle most, if not all, questions that students can throw at them. Want to become a student? Check out Quest For Tech’s website and their Technology Access Program (the class I’m referring to above). Want to teach? Head to their site and look at the volunteer information.
|
By xram net on
5/7/2009 6:19 PM

I hate to say this about the framework I love, but it’s true. Anyone who’s ever spent more than a few minutes developing skins or modules knows it, but so far it hasn’t inspired anyone to step up to the plate and take on refactoring/refining the CSS into a more workable state. Maybe it’s not as big a deal as I think, but I’m tired of looking through the CSS that gets sent downstream and comparing it to other frameworks that do a tremendously better job of producing clean code. I’m not a huge fan of reading other people’s rants if they’re not willing to offer suggestions, so here goes. Please feel free to agree or disagree with any of these points—that’s what comments are for.
Create a consistent CSS naming scheme
Enforce (or at least strongly recommend) that developers use a distinct namespace when creating the CSS for their modules. Take, for instance, the DotNetNuke Blog module. IMO, all of the CSS entries should be proceeded by a distinct selector (i.e. .dnnblog) that all of the blog sub-modules are wrapped in. If I want every blog module on my site to have a certain background image, or use a certain typeface, I should be able to do it in a straight-forward manner.
Zero out default.css
And then add back in any of the available CSS reset files out there. Yahoo’s, Eric Meyers’s, any of them will do. After that, define basic styles: headers, paragraphs, etc., using the minimum amount of CSS. Don’t define font-family anywhere.
If DNN wants the default skin to look polished and awesome, great! Keep it all in the skin.css—that’s what it’s there for. But don’t make me hunt down and override items, especially when I'm banging my head against the wall because a div > div > ul > li is displaying in a different font than div > ul > li (remove the font-family definitions from default.css and the problem disappears).
Create an admin.css
All of the administration classes, both in the control panel up top and in the admin pages, should be rolled into an admin.css file that is only included if you’re logged in as an admin. There is no reason that CSS for the control panel is sent down with every page view. Also, create a dnnadmin class that it’s all wrapped in.
Get it done for DNN v6
The DotNetNuke skinning team lead, Timo Breumelhof, mentioned that this work was deliberately avoided so as not to introduce any breaking changes for existing installations. Considering DNN5 broke existing skins and modules, wouldn’t that have been the perfect time to also break the CSS? I mean, if a developer already has to go back in and update class names, replace depreciated functions, etc., wouldn’t that be the perfect time to do this? No one ever said a cross-version upgrade would go smoothly (heck, even a lot of minor upgrades don’t go smoothly…), but at some point, we’ve got to bite the bullet and move on.
Allow custom classes to be defined in the module settings
For instance, in a certain text module, let me go into the settings and assign a class to that module that would be injected into the container wrapper. This is less important with the text module since I could just go in and wrap my text in a classed div, but say I want two surveys on the same page that look entirely different. True, that can be done now using separate containers, but it seems like it would be a nice advanced option to have.
I’ll be sure to post my portal.css when it’s complete—I’d like to see how much of it I can break apart without breaking DNN.
|
By xram net on
4/14/2009 6:34 PM

How many people back up their files? Honestly. Raise your hand if you do. Chances are if your hard drive fails, you are one of the vast majority of computer users who would be up a certain creek without a paddle. Backing up isn't hard to set up, especially now that software like Allway Sync exists. Follow these instructions and relax in the knowledge that your data is safe.
- Visit Allway Sync's download page to download the latest version. Run the installer once the download is finished.
- The default settings are good for this installation—read over it if you like, but most users can click right through.
- Allway Sync will run once the installer is complete and will automatically begin the walk-through for creating a new backup job.
- Hit Control+R to give your backup a descriptive name (e.g. Nightly Documents Backup)
- Choose A Source Folder :: Click Browse on the left-hand side and choose the folder you'd like to backup. Most users would consider backing up their My Documents folder, but also consider other locations of important files such as accounting software or email.
Choose A Destination Folder :: Where do you want to store your files? The dropdown list of locations gives you quite a few options. Not only can you backup to a removable drive or network location, but multiple online storage vendors are also provided so you can backup to an offsite location with ease (OffsiteBox.com gives 50mb for free and Amazon S3 runs $0.15/GB used/mo + $0.10/GB transferred—less than $1.50 a month to maintain 5gb of data for most users).
- If you're backing up to an external hard drive, choose Removeable Drive from the list. Choose the drive from the dropdown list, and make sure that Bind to drive characteristics is checked so that it will continue to backup even if the drive letter changes. Then, in the path textbox, enter a directory for the backups to go into (e.g. f:\backups\)
- If you're backing up to a network location, such as a file server located on your network, choose Network folder. Click Configure, and enter in the connection details. For example, if your file server is called super-file-storage, the UNC path to your directory on there may look like \\super-file-storage\files\myusername\backups\ depending on how it’s configured. If you need to provide a username and password, you can also do that here.
-
Allway Sync’s default action is to synchronize two folders, which you can see by the middle arrow indicator. Since you're configuring it for backups, click on the arrow pointing from your source folder to your backup folder (the highlighted choice in the image). This means that files will only be copied from your source directory to your backup directory, not the other way around. If you want to guard against accidentally deleting a file, uncheck Propagate deletions. This will leave all files in your backup, regardless of whether you delete them in your source folder.
- Now, you're all set to backup! Click Analyze to begin the process. This will tell you that there are substantial differences in the two folders, and that this is normal. Click Ignore.
- Once this is done, click Synchronize. This will perform the backup while showing you the progress. Congratulations—you've just backed up your files! What good is just one backup, however? We need to set this to run automatically so your backups aren’t dependent on you.
From the menu, click Job –> Properties. Under your backup job, click on Automatic Synchronization. The easiest way to set up synchronization is to perform the backup at a specified interval (Through the specified period with a Periodicity of 6 hours). You could also have it run when the computer is idle for a certain amount of time or when file changes are detected. Setting the delay for either to 1 hour will make sure Allway Sync doesn't run too often, but it's really up to you. Make sure you don't leave too many options checked, or you may find that the program runs too often. Hit OK when you’re done.
- For advanced control over when your backups should run, scroll down the list to Use Windows Task Scheduler, then click Configure. Click New, and set your parameters. You may, for instance, want to choose Daily at 12:30 PM if you know your work computer will be on and you'll be at lunch.
- There are a number of other settings that can be configured, such as what files to include or exclude or retaining multiple versions of important files (in case you made edits you later need to undo).
Backups are useless unless you’re sure that you can get the files back. Every once in a while, take a look inside your backup folder to make sure that the files you want backing up are there and that they’re being kept up-to-date.
Hope this helps! Please feel free to ask questions below in the comments. Remember: a few minutes setting this up will save you days of frustration and/or hundreds of dollars when your hard drive does eventually fail.
|
By xram net on
4/7/2009 1:13 PM
 Space! The final frontier, in terms of what users need more of. One of my clients was running a custom-built (read cheap) file server that had a few issues. The chassis and motherboard are from Norco, a company that creates products for people with plenty of time to kill. If you need something dirt cheap (and don’t mind getting your hands cut up on the rough edges), this will do quite nicely. However, the server would randomly reset its BIOS settings across boots, meaning that patching Windows became a fingers-crossed affair to see if the server would come back up gracefully. Also, the expandability was nil as was the warranty. With these issues in mind, I recommended a Dell PowerEdge 2900. I configured it with 2 500gb 7.2k SATA drives in RAID 1 for the system partition, and 6 1TB 7.2k SATA drives in RAID 5 for the file storage. This setup yields 4.54TB of usable space on the storage virtual drive. Future expandability would be handled using a PowerVault that would hook into the PERC 6 controller. I installed this into their rack myself, which wasn’t easy as this thing weighs in at over 100lbs. Getting it onto the versa-rails was a delicate process, but once it’s in place, the whole thing is solid. HD Tune gives good numbers, with 250Mbps sustained. This needs to support roughly 200 users, with quotas managed through Windows 2008 File Server Resource Management. So far, three virtual machines have also been moved on to the server, as the 2ghz quad-core Xeon and 12gb of RAM have more than enough processing power to handle a few low-load VMs such as an XP developers sandbox, a domain controller, and a test web server. What are you buying for file storage? Managed SAN devices? Traditional file servers like this? Going straight to the cloud?
|
By xram net on
3/25/2009 1:01 PM
UkNuke has an authentication module for DNN that allows a developer to use the Facebook Connect to allow users to log in to his/her site. Very cool, except the page they created that is shown to users after returning to your site from the Facebook login page is crowded and a little confusing. How ‘bout some jQuery hiding that’ll give the user two options: I’m new here (shown by default) or I’ve already have a username here (hidden). UkNuke’s installation walk-through seems fairly straight forward, and does a good job at warning developers as to potential pitfalls (don’t log out of your host account!) Has anybody tried this out on a production site? Now that everyone and their mother (except mine) is on Facebook, this seems like the easiest way to attract visitors without the turnoff of having to go through yet another registration procedure (or yarp, as I like to call them).
|
By xram net on
2/16/2009 4:46 PM
 One of my clients was experiencing some odd wireless dropouts on the computer set up the farthest from the router. They mentioned that it started around when they gave their wireless key to a neighbor so he could get online. It seems like a neighborly thing to do, until you consider that this new computer that they have no control over is on the same network as all of their machines, as well as their file server. I told them I was uncomfortable with that setup, but if they wanted to share their access, I would find a way to make it work. They have a WRT54G v8 that I had them purchase from NewEgg, on which I decided to swap out the stock firmware with the open-source DD-WRT firmware. There’s a great walk-through on SimpleHelp.net that covers the additional VxWorks Killer step necessary for the v7 & 8 models. The DD-WRT firmware gives you near-complete control, especially over things like wireless transmit power (the stock setting is between 20-40mw) which I leave set to DD-WRT’s default setting of 70mw. After setting up the wireless network and the security, I went back downstairs to find that the signal was now solidly stable. But what about their neighbors’ access? Using the extremely well-written guide available from Pennock’s World about setting up multiple BSSIDs using DD-WRT, I was able to get multiple wireless networks running off of one router. The rules in the firewall section stop any traffic going between the two networks, while still allowing the second network access to the internet. They can even be set with their own security schemes, so the neighbors can use any old WEP-enabled device while all of the important computers connect via WPA2.
|
By xram net on
2/8/2009 4:57 PM

I’m running Windows 2008 on my Fujitsu S7220, using it to test various blog and CMS solutions, and it’s a great OS. As much as I love XP, I’m really impressed with a lot of the UI improvements that went into Vista (which flowed into 2008 and is improved even more in Windows 7). I don’t hear a ton of talk about it, and I get the feeling that a lot of people who grumble about Vista (Becky!) just haven’t taken the time to learn their new surroundings. One thing I didn’t realize I use all the time was the searchable start menu. No more sorting your start menu to make things easier to find—it’s a built-in quick launch that doesn’t suck. Luckily, for people running XP, there’s hope. LifeHacker featured a download called ViStart (clever…), which gives XP users the useful bits without needing to upgrade. I’m going to slipstream this onto my next XP image—that’s still 90% of all the installations I do at work. Most of the Vista-on-XP programs out there are kinda hokey and just for show, but this one brings some really useful functionality back to the most widely used desktop OS.
|
By xram net on
2/4/2009 8:38 AM

I rebooted my main web server at work the other day after some patching only to find that it wouldn’t come back up remotely. I walked over to my server room to take a look, and sure enough, it was hung at the RAID controller config screen telling me one of the drives had dropped from the array and asking how to proceed. One of the first things I had done coming on to this position was to insist that all of our critical systems had backup plans and were properly RAIDed, so aside from the annoyance of a hard drive failing, I breathed a sigh of relief—something I had spent $500 (of someone else’s money) on was finally paying off!
So, I sit here now, watching the progress bar tick ever closer to complete (at 27% right now, I have a ways to go…) and writing my thoughts on how our next server setup will run. It’s technically already running, but just hasn’t been completely switched over yet. The new server is a Dell Poweredge 2970, with a whole bunch of cores and a whole lotta ram. Using Hyper-V, it’s running two domain controllers (for two different domains), a web server, and an app testing server.
Backing up the web server? Take a snapshot of a virtual drive. Drive fails? Hot swap a new one in (after, of course, being alerted way before it actually goes). I’m not in a huge hurry—we’ve had the new server running for months now, but the old one is still chugging right along, server up pages like it’s its job. And once this array is finished duplicating (50%!), that new drive had better get comfortable cause it could be there for quite a while.
|