Archive for 'Technology'

Restoring eMachine T3085 from provided CDs

Posted on 11. Dec, 2008 by .

0

I do believe that eMachines should receive some type of award for requiring the most convoluted process of system restoration of any manufacturer.  To be fair, I don’t believe the intent was for it to be this difficult, but alas, it is.  At least it is on my old T3085.  I recently had the primary drive fail on me, thankfully I had a spare 160 GB drive laying around (what self respecting geek doesn’t have spare parts in random corners of the house?), so I’ve set out to restore the system from the provided CDs.  Here are the steps required to do so:

  • Restore from eMachines Restore CDs.
  • When Ghost reboots, hit F8 and select "VGA Mode".
  • When Windows comes up, hit OK, then when it asks if the display is okay, hit Cancel.
  • Complete the rest of the wizard.
  • Next at the login screen Windows will say it must be activated.  Hit ok.
  • When the activation wizard comes up (which consequently never fully comes up, its a blank dialog), minimize the window.
  • Hit Window-U to bring up Narrator.
  • Click on the "Microsoft Web Site" hyperlink.
  • Now that Internet Explorer is up, download XP SP2 (make sure to get the IT Professionals and Developers version, should be about 266 MB).
  • Install the Service Pack.

I should mention, in a very Pulp Fiction beginning with the end then coming back to the beginning way, that the reason all of this is necessary is because after restoring Windows from the Ghost image Restore CDs, the Windows XP startup comes up.  It asks for your language, time zone, things are going well.  You click Next and it asks for the name of the computer.  You click Next (or Skip, result is the same) and the machine hangs.  Indefinitely.  And you curse.  Throw things.  Kill puppies.

puppy1

Well, don’t kill puppies.  Follow the instructions laid out at the beginning of this post and party like a rock star.

Bookmark and Share

Continue Reading

Back online!

Posted on 03. Dec, 2008 by .

0

To all of my beloved reader, Of Ones and Zeros is back after a temporary service disruption today.  A thousand apologies for any inconvenience this has cause you or your family during this holiday season.  With any luck, there will be no more of these:

500error

Special thanks to Bill Hackley for the embarrassing screenshot!

Bookmark and Share

Continue Reading

Microsoft releases new ASP.NET charting control for … FREE!

Posted on 30. Nov, 2008 by .

0

This past week Scott Guthrie announced a new ASP.NET charting control from Microsoft for free.  Details are in Scott’s blog posting, from the screen shots it looks quite capable.  I’m anxious to have an opportunity to kick the tires on this control, thanks MS!

Bookmark and Share

Continue Reading

Microsoft Wireless Laser Desktop 7000

Posted on 19. Nov, 2008 by .

0

I found it time to retire the venerable Microsoft Wireless Optical Desktop Elite made famous from the cover of Code Complete: A Practical Handbook of Software Construction:

Code Complete

At the time I purchased it, about 3 years ago, I believed it to be the cats meow of keyboards.  And I was probably right.  I usually am ;-) .  Anyway, enough self indulging.  I tired of this keyboard this year, and when I saw the announcement for the Microsoft Wireless Laser Desktop 7000 I had to have one.  But I didn’t have to have one for the original $129.99 asking price.  Recently the price has dropped significantly under that original figure, and I was able to pull the trigger.  Take a moment and marvel at the beauty of this thing:

Wireless Desktop 7000

Ewwww.  You’re drooling.  Here, let me help:

Papertowel

Okay.  Enough gratuitous use of images.  In any event, I have been very pleased with this keyboard all-in-all.  I’ll give you the things I’m not crazy about first though:

  • Out of the box, the rechargeable battery for the mouse didn’t work.  So the theory is this desktop set comes with a mouse charger that you can plop that mouse on and recharge the battery.  Seems like a great idea.  Except when I put in the included rechargeable battery, and put the mouse on the charger, the mouse blinks fast red.  Translation:  Charging error.  Solution?  Drop a normal alkaline AAA in the mouse and throw the charger away.
  • The cool "aero looking" plastic that surrounds the keyboard scratches VERY easily.  So easily in fact that it comes pre-scratched from the factory. 
  • The escape key and other function keys are a bizarre size.  Tiny little things.  Although I still find them easy enough to hit.
  • The space bar is a bit loud.  Not necessarily on its own, but when compared to the amount of noise generated from the other keys on the keyboard, the space bar seems to generate twice as much noise.  Not a big deal, just a small nitpicking thing.  Its NOWHERE NEAR as loud as my Elite was!

Okay, now for the good stuff, things I like:

  • Cannot be overstated – the thing is by far the best looking keyboard I have owned to date.  Goes superbly with my Vista desktop.  Very important.
  • This thing is comfortable.  I have been a latecomer to the whole curved setup of keyboards, but I purchased one of the Microsoft Wireless Laser Desktop 3000 kits for at work several months back and ever since I’ve found the normal "flat" keyboards just plain uncomfortable to type on.  Furthermore, my typing speed seems to go up significantly on a curved keyboard.
  • I really like the amount of pressure that each key requires.  The Elite required a ridiculous amount of key pressure and I would find my fingers quite fatigued at the end of the day.  I have not had any such problem with the Laser 7000.
  • This is by far the best looking keyboard I have owned to date.
  • People have complained about the new tiny 2.4 GHz USB receiver, but I actually like it.  I’m tired of the big honking receiver that has come with previous keyboard sets.  The reception is just fine at my desk, mind you my keyboard is within about 4 feet of the receiver, and I have it plugged into a USB port on the front of my desktop.  Haven’t tried plugging it in the back, maybe I would run into problems then, but I doubt it.

Take my advice for what its worth, but if you are a fan of Microsoft hardware, which I undoubtedly am, I think you’ll be very happy with the Wireless Desktop Laser 7000. 

Bookmark and Share

Continue Reading

“The security validation for this page is invalid”

Posted on 18. Nov, 2008 by .

4

I’m currently working on a SharePoint project that makes extensive use of programmatically setting ListItem ACL’s.  There is a List Event Handler which sets ACLs on the ItemAdded event, but then there is an administrative interface that enables administrators to reassign list items to another user which effectively means replacing the ACLs for the ListItem to give another user Contribute.

In any event, I keep encountering the dreadful "The security validation for this page is invalid" error when trying to perform the ACL updates, specifically from web parts (haven’t seemed to have this issue on list event handlers).  Well it appears that I’ve finally come up with the magic combination of fixes.  There are several blog postings out there indicating that you should use "AllowUnsafeUpdates" on your SPWeb object.  This seems to fix things for many people, however, the code I was working on calls "BreakRoleInheritance".  Apparently that bugger ends up reverting the "AllowUnsafeUpdates" flag back to false after you call it!

Here’s the information that Paul Yau shared in a thread on the MSDN forums which took care of my issue, thanks for sharing Paul!

Problem Description:

===============

When you call SPList.BreakRoleInheritance(false) from an HTTP GET request, although you have specified SPWeb.AllUnsafeUpdates=true, you will still be thrown an exception

Updates are currently disallowed on GET requests. To allow updates on a GET, set the ‘AllowUnsafeUpdates’ property on SPWeb.

Cause:

=====

This is by design limitation of SPList.BreakRoleInheritance

BreakRoleInheritance does it work in two steps. First, it needs to revert its permission to have same permission settings as parent (this is a less expensive operation, and give the list a fresh start on its road to unique permission). Later it checks CopyRoleAssignments parameter. If it is false, it takes an extra step to clean up permission on the list. A side effect of step 1 is that it dirties some internal objects in SPWeb, and cause them to be recreated. Unfortunately, the re-creation of those internal objects cause SPWeb.AllowUnsafeUpdates to have a default value which is false. That is, SPWeb.AllowUnsafeUpdates is reset in middle of call to SPList.BreakRoleInheritance, therefore we got the exception.

Resolution:

========

There are two possible workarounds to the issue:

1.       Call SPList.BreakRoleInheritance from a HTTP POST request. That is, we can first have a button on UI and have users to click. In response to users’ click, we call SPList.BreakRoleInheritance. There is a first HTTP GET request by which, SharePoint has a chance to embed some digest to validate requests on return (HTTP POST). Therefore, we no longer need to set SPWeb.AllowUnsafeUpdates=true. This is recommended approach from security perspective.

2.       First call SPList.BreakRoleInheritance(true). Then, use custom code to clean up permission and create your own permission set for the list as needed. The sample code are:

SPWeb web = SPControl.GetContextWeb(this.Context);

SPListCollection lists = web.Lists;

//Guid docLibGuid = lists.Add("Doc Lib Sample 1", "Doc Lib Desc", SPListTemplateType.DocumentLibrary);

//SPList docLib = lists[docLibGuid];

SPList docLib = lists["Doc Lib Sample 1"];

//docLib.ParentWeb.AllowUnsafeUpdates = true;

docLib.BreakRoleInheritance(true); //Exception throw here when the parameters is "false"

web.AllowUnsafeUpdates = true;

SPRoleAssignmentCollection roleAssigns = docLib.RoleAssignments;

for (int i = roleAssigns.Count-1; i >= 0; i–)

{

    roleAssigns.Remove(i);

}

Bookmark and Share

Continue Reading

PNY Attache 1G USB flash survives washing machine

Posted on 18. Nov, 2008 by .

0

I’ve been in the habit the past few weeks of leaving items in my pockets which end up on an adventure through the washing machine.  The latest participant was my PNY Attache 1G USB Flash drive.

attache

I thought for certain it was a goner.  I left it on my desk overnight to dry out and gave it a shot this morning, wha-la!  Came right up with my Portable Apps menu.  Very cool!

Bookmark and Share

Continue Reading

Where is my storage space going?

Posted on 17. Nov, 2008 by .

1

Over the past few weeks I have had several instances of where I need to know how where space is being allocated within a site collection.  For instance, one client has seen tremendous growth of the site collection database, but is not sure how/where/why the space is being used.  Another client has also seen rapid content database growth, and would like to make sure the space allocation is legitimate.

On the surface it did not appear that SharePoint had an out-of-the-box solution for this, which seemed criminal.  A few products out there seemed to fill that void:

However, finally, today I came across a solution that IS right there out-of-the-box.  While researching a completely unrelated issue, I discovered the _layouts/storman.aspx file, as referenced here.  The trick is that you must have a site collection quota specified in order to use this feature.  Once you configure a quota you will see "Storage space allocation" located under "Site Collection Administration" in Site Settings:

stormanlink

When you click on "Storage space allocation" you receive a page similar to the following (but without the huge black block protecting the innocent):

storman

You can see that it shows the amount of space used in relation to the configured site quota, and then by default displays the amount of space being consumed by various document libraries in descending size!  Fantastic!

Definitely not as complete as the Nintex or Quest Software solutions, but its great that there is in-fact an out-of-the-box way of achieving this.

Bookmark and Share

Continue Reading

The SharePoint Development Tax

Posted on 04. Nov, 2008 by .

0

Typically when you are talking about SharePoint the conversation revolves around all of the great "out of the box" functionality you receive with the product.  In no way do I intend to argue against that, SharePoint is a fantastic product that does many things very well.

SharePoint as a development platform… well, that’s a whole different story!  Jeffrey Palermo talks about it here, although his primary gripe seems to be that SharePoint has to run on a server OS, which would require using a development VM.  I do all development in VMs regardless, so that isn’t really a deal-breaker for me at all.  Speaking of which, Andrew Connell has a great blog posting on using differencing disks with Microsoft Virtual PC.

Charles Chen argues the opposite in his blog posting, defending SharePoint as a development environment and taking Palermo to task on a point-by-point basis.

One thing I don’t see mentioned by either is what I am going to refer to as the SharePoint Development Tax(tm).  What is this tax?  Is a break given to 95% of working families?  Well, no.  This tax comes in the form of time spent waiting for solutions to deploy, 12 hives to be copied, and app pools to be recycled.  When working with SharePoint as a development environment, several times a day you will need to deploy solutions, which cause app pools to recycle, you may need to copy new assemblies to the GAC, again, requiring app pool recycles.  So what’s so bad about that?  That happens all the time in ASP.NET development, why is it bad for SharePoint?  Well.  The issue is HOW LONG SharePoint takes to recycle.  Sure, you could complain about my development environment, but I am running on a quad-core 2.2 GHz machine with 8 GB RAM, and I give my development VPC 3 GB RAM.  How long does it take?  On average, a solution deployment takes 45-60 seconds.  An app pool recycle takes almost 2 minutes.  I probably go through about 10-20 app pool recycles a day, eating up 20-40 minutes of time, not to mention lost productivity due to falling "out of the zone".  In Joel Spolsky’s famed blog posting 12 Steps to Better Code there are several mentions of how a 15 second break in concentration causes a 15 minute lapse in productivity. 

Perhaps I should quit complaining though… The SharePoint Development Tax has given me lots of extra time to play guitar while watching spinning circle animations!

Bookmark and Share

Continue Reading

Value does not fall within the expected range

Posted on 09. Oct, 2008 by .

0

I’ve been battling this error several times over the past few weeks in varying contexts.  Today’s occurrence was in accessing "Page Settings" of a MOSS Page.  Thanks to YongYS for the following fix:

http://www.bronios.com/index.php/2008/01/18/moss-page-setting-error-value-does-not-fall-within-the-expected-range/

A few weeks ago I was running into this issue after backing up a content database and moving it to another farm.   Thanks to Stefan Gossner to pointing out the error in my ways:

http://blogs.technet.com/stefan_gossner/archive/2008/03/12/common-error-situation-with-when-using-backup-restore-to-transfer-a-database-to-a-new-farm-on-moss-2007.aspx

Bookmark and Share

Continue Reading

IIS and Windows 2003 Mismatched Service Packs

Posted on 11. Sep, 2008 by .

0

I have this nagging feeling that I have been down this road before, so I need to blog it so maybe, just maybe, I won’t waste another hour troubleshooting something I’ve done before.

Scenario:

You browse to Central Admin, or any Site Collection really, and you are prompted incessantly for  your user credentials.  After about 5-8 times, the page comes up.  You are NOT presented with a Forbidden message.

You check your IIS log files, and you see several 401 errors for WebResource.axd.

You remember something about installing SP2 when IIS wasn’t on the box, then installing IIS from a source that did not have the Service Pack slipstreamed.  Hmmm.  Might be relevant.

Solution:

Explained thoroughly by Paul Culmsee on his blog www.cleverworkarounds.com, http://www.cleverworkarounds.com/2007/11/15/darn-iis-and-service-packs/.  If it wasn’t foreshadowed by the last sentence of the Scenario, reinstalling Windows Server 2003 SP2 was the solution.

Bookmark and Share

Continue Reading