Author: xram net Created: 3/5/2010 7:11 PM RssIcon
Focused on DotNetNuke, .Net, Windows, and computer repair with smatterings from the rest of the technology ecosystem.
By xram net on 10/8/2009 5:14 AM

I’ve been playing with RocketDock for two weeks now, and even with the stacks plugin, it just wasn’t cutting it.  I don’t know what it is about docks, but I can’t seem to get used to them.  The concept is fantastic, but after living with ctrl-alt shortcuts since Windows 3, the start menu paradigm since 95, and especially since Vista’s start menu search debuted, getting used to such a mouse-centric control just doesn’t click in my brain.  Oh well—there are many other cool programs to play with.  Like…

my desk

Synergy+ (and the original Synergy).  I’ve started to use my laptop as the left screen in a 3-monitor setup, and it’s money.  Being able to control everything via one keyboard and mouse is a great way to stop wasting time going from one machine to the other.  The only problem so far is the mouse intermittently forgetting to come back, but swapping out my old switch for a gig-e switch helped immensely.

Speaking of Newegg, CamelCamelCamel (sounds like a Balmerism!) now has a Firefox plugin that automagically gives you a price history graph for Amazon, Newegg, and some other stores.  Very cool.  Almost as cool as…

camelmagic

Personas!  This nifty plugin makes changing Firefox skins as easy as it should have been a long time ago.  With Chrome getting into the skinning game, it’s about time I can change the look of Firefox without needing to restart.  It reminds me of the old Winamp skins, and I especially love the ability to preview a new persona via mouseover.  Great implementation, Mozilla!  I found this via a new blog I’m reading, FireFoxFacts.com.  Which I’m reading using…

Brief!  This is the first RSS reader I’ve found that works with Firefox’s built-in Live Bookmarks and displays the posts the way I’d like to see them.  I guess I have no excuse now for not staying up to date on my friends’ blogs.  I might hate checking twitter and facebook updates, but I love reading blogs.  Something about people putting actual time into communicating…

And, ASP.NET 4.0 is going to be great.  I’m already looking forward to “clean client-side ‘id’ names (no more ctrl_ mangled names – ASP.NET 4 gives you complete control over the client id), and CSS based rendering instead of table based rendering for the built-in server controls.”  What?  Maybe this also means no more random “Microsoft-knows-best” CSS to override either…

The best part about all of these programs?  You guess it: FREE.  Enjoy!

By xram net on 9/30/2009 3:38 PM

I thoroughly enjoyed reading Charlie Brooker’s scarily accurate take on Macolytes and their constant attempt to woo PC users to the dark side.  He does a fair bit of Microsoft bashing at the same time, trashing the horrible Windows 7 House Party ad.  I really prefer the Censored Version—because we all know what they’re really talking about.

At least it’s not the typical rehashed Mac vs. PC bashfest we’ve all come to know and despise.  As someone who gets to fix both, when asked which one I recommend, my question is, “Which one are you more productive on?”  They both do the same things.  Differently, but computers aren’t supposed to be ends in and of themselves.  They are means to an end.  Can you produce a completed TPS report faster on a PC?  If your job is to make TPS reports, GREAT—you should definitely use a PC.  If you can write CSS faster on a Mac and your job is to design websites, then guess what: I see a Mac in your future.

For the record, I applied to be a Windows 7 Party host, mostly because you get a free copy of Windows 7 Ultimate.  It seems as though the accepted hosts have already been notified, so I guess I’ll have to settle for a $30 copy of Wi7 Pro

By xram net on 9/15/2009 12:23 PM

Out of the box (err, zip file), DotNetNuke 5 is a no-go if you’re running it as a subdirectory in a site that’s running ASP.NET 3.5.  A little looking around the DNN forums indicated this was a known problem, with users posting errors such as:

[InvalidCastException: Unable to cast object of type 'System.Web.Configuration.ScriptingAuthenticationServiceSection' to type 'System.Web.Configuration.ScriptingAuthenticationServiceSection'.]
   System.Web.Configuration.ScriptingAuthenticationServiceSection.GetConfigurationSection() +39
   System.Web.Security.AuthenticationService.EnsureConfigLoaded() +64
   System.Web.Handlers.ScriptModule.ShouldSkipAuthorization(HttpContext context) +82
   System.Web.Handlers.ScriptModule.AuthenticateRequestHandler(Object sender, EventArgs e) +52
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

Adding <clear /> entries to the top of each section in web.config didn’t help.  But what about that annoying message that pops up in Visual Studio 2008 every time I load a .Net 2.0 app asking me if I want to upgrade it to 3.5?  Maybe…  Yes.  It took all of 4 seconds for VS to rewrite web.config using all 3.5 components, and everything started working fine.

Active Directory Authentication

After getting DNN5 up and running, it was time to get it integrated into our Active Directory.  One of the things I was really looking forward to in upgrading to DNN5 was to be able to use the AD provider without needing to run the AppPool in Classic pipeline mode or needing to register 32-bit .Net DLLs (since it’s running on Windows 2008 x64).  The provider works, but it still gives the same error message that I got running 4.9.5:

Error: is currently unavailable.
DotNetNuke.Services.Exceptions.ModuleLoadException: Access is denied. ---> System.Runtime.InteropServices.COMException (0x80070005): Access is denied. at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) at System.DirectoryServices.DirectoryEntry.Bind() at System.DirectoryServices.DirectoryEntry.get_IsContainer() at System.DirectoryServices.DirectoryEntries.ChildEnumerator..ctor(DirectoryEntry container) at System.DirectoryServices.DirectoryEntries.GetEnumerator() at DotNetNuke.Authentication.ActiveDirectory.Settings.CheckPipelineMode() at DotNetNuke.Authentication.ActiveDirectory.Settings.Page_Load(Object sender, EventArgs e) --- End of inner exception stack trace ---

Oh well.  There are worse things in life than an error message that only I’ll be seeing.  It still lets users log in, so I can’t complain.

By xram net on 9/14/2009 11:57 AM
steal-this-quote

From Jim Jarmusch, but in keeping with the spirit of the quote, I’ve stolen it.  It fits pretty well with my feelings towards copyright and IP law.  I have the utmost respect for those who release significant portions of their work into the public domain and are still able to keep a roof over their heads and bread bacon on their tables.

By xram net on 8/19/2009 11:48 AM

dnnapppool

Are you running DotNetNuke on your own IIS install?  If you are and have been trying to eek the most performance out of it as you can, you may very well run into the problem I’ve come across.

I can’t begin to describe what kind of a headache it has been.  For the longest time (so long my original DNN forum posts regarding the issue are gone), making any changes to a page on any of our DNN 4.9.x sites would show up half of the time you refresh, and half of the time it would show the original content.  Restarting the web app synced the two random out-of-sync views up, but that’s obviously not a long term solution.

I finally ran across this article on DNN’s support pages talking about scheduler issues in multi-threaded IIS configurations and it hit me: running DNN in a web garden with two or more worker processes AND having the module caching set to memory meant that whichever worker process was told to make or delete a page or change content had the correct data in its cache.  The other worker processes, though, were left in the dark and weren’t being told to flush their cache!  Refreshing the browser would cause IIS to randomly assign a worker process to serve up the page, so half of the time it got it right, and half of the time, it got it wrong.  Restarting the web app flushed the caches, which is why that worked.

The solution?  Either turn module caching to disk or turn off the web gardening by setting the maximum number of worker processes back to 1.  The users are much happier now that the ghost in the machine has been exorcized.  Any other performance issues have you uncovered?  I’ll be moving to DNN 5.1 soon, so any suggestions would be greatly appreciated.

By xram net on 8/11/2009 10:05 PM

batteries

How many people just leave their laptops plugged in all of the time and then expect it to work three years later that they decide to start taking it to the beach?  For gratis, this is a must for laptop owners.  I recommend that people let their batteries drain down fairly low once every five or six months to recalibrate the battery’s internal meters, and this software will keep a history of when you’ve done, as well as giving you detailed information on your batteries’ life span and capacity.  I’m sure graphing the capacity over time isn’t far behind, predicting the number of years until it’s finally time to swap in a new battery.

You can find it on lifehacker or directly on BatteryCare’s website.  They also have a page of info about batteries and how to make them last longer.  And don’t forget to buy the author a beer if you find it useful.

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

Quest For Tech - in the search for technology, you are never alone

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

css

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.