Wednesday, January 24, 2007

ASP.NET 2.0 AJAX Extensions v1.0

it's finally released! ASP.NET 2.0 AJAX Extensions v1.0 is ready and waiting for you to make awesome stuff with. Personally i love this extension, hope you do to. Go grab it at http://ajax.asp.net/downloads/default.aspx?tabid=47 Alex, you beat me to it :) P.

Friday, January 19, 2007

Sitecore 5.3: Adding values to the Properties view in the Content Manager

As seen on SDN5 Forum there was a question about properties for the selected item, and specifically to see a count of how many children that item had. Unfortunately that property isn't shown by default, but, you can always add it yourself (gotta l ove sitecore). Here's what you do:
  • Locate SystemMenu Information.xml (it's in sitecore\shell\Applications\Content Manager\Galleries\SystemMenu)
  • Add the following two lines right beneath "<Border def:ID="Template" />"
<Literal GridPanel.Class="scKey" Text="Children:"/> <Literal GridPanel.Class="scValue" def:ID="Children" Text='${Sitecore.UIUtil.GetItemFromQueryString(Sitecore.Context.Database)==null?"unable to list":Sitecore.StringUtil.GetString(Sitecore.UIUtil.GetItemFromQueryString(Sitecore.Context.Database).Children.Count,"unknown").ToString()}' />

That's pretty much it, now you'll get a count of how many children (if any) that exist on a selected item.

"Hacking" sitecore can sometimes really be that simple, ain't it awesome? :)

EDIT: Actually you probably want to swap the database part for something else to make it more robust, either get the DB by name or through the use of Sitecore.Context.ContentDatabase instead.

P.

Thursday, January 18, 2007

Catch 22: SQL 2005 and the "MUST_CHANGE" policy

Gotcha! It's really is a catch 22 situation, and it's damn annoying. DB User X has a password set to Y, and when created that user was created with the default settings - thus automatically checking the little attribute on the user telling the server that the user has to change the password at first login. Let's say you're migrating a solution/db to SQL 2005. In this case you probably don't wanna change the password since this user, along with the associated password, is likely used in an application somewhere somehow.. so, what do you do? you go to the server, find the user in the management studio, and you try to edit it since this user should not have a password policy at all, we know the username and password should be what is set. well, sorry, but if this happened to you then you probably noticed that if you try to uncheck the "Enforce password policy" and/or "Enforce password expiration" and click "ok" you'll be hit with an error saying the changes can't be made due to the "MUST_CHANGE" flag is set on the user.. This really annoyed me a lot, so here's a little workaroud that might help you:
  • Open the management studio and connect to the server with sufficient rights
  • start a blank query
  • run "ALTER LOGIN X WITH PASSWORD = 'Y' UNLOCK" (replace X & Y with username and password of course)

By following the above steps you should now be able to go back to the user and uncheck the checkboxes without any trouble.

To make the changes without using the management studio you can run the following in a query..

To change the password and keep the MUST_CHANGE flag: ALTER LOGIN X WITH PASSWORD = 'Y' UNLOCK MUST_CHANGE

To uncheck the checkboxes for expiration and/or policy (change "OFF" to "ON" to check): ALTER LOGIN X WITH CHECK_EXPIRATION = OFF ALTER LOGIN X WITH CHECK_POLICY = OFF

P.

Monday, January 15, 2007

system archeologist

technology is moving at an incredible rate, we all know that. things we thought we'd be ok with for a while has suddenly turned into yesterday's news.. just take the introduction of .NET as a quality example - everything turned .NET over night, and it was the new hype everyone wanted to master and everyone even said they did. In reality we all know people that still think we'd be better off without .NET, and there will always be people like that. People that strive to prevent changes instead of embracing them. People that take one step back when the path is right there before them. This is the same for other changes, like .NET 1.1 to 2.0, and now 3.0. While the fact that these people exist today and most likely will exist in the future as well is a known fact, the technologies will continue to evolve and introduce new ways of thinking. During the last decade the evolution of code and technologies has been incredible, so just imagine the coming decade.. For these reasons, and more, I think there will be more accepted roles coming our way, and one (maybe the most important one of all) will be the System Archeologist. The System Archeologist will know how 'old' code can interact with 'new' code, how 'old' systems can communicate with 'new' systems and how 'old' architecture relates to 'new' architecture. Perhaps they will be the Architects of today, or maybe they will spring from a totally different source, who knows? This thought kept me up last night, i just couldn't shake it, 'cause the more i think about it the clearer it becomes. Today we embrace the evolution of software 'cause it moves us forward and the bridges aren't yet that many to cross - but what about our children and the number of technologies available to them when they grow old? I'm intrigued, in a conspiracy-theory kinda way.. P.

Monday, January 08, 2007

break in - break out - freak out

so, first day back and well i hoped this year was going to start with a blast, just not the kinda blast that met me walking through the doors to the office (well, actually, what's left of them). if you've ever lost or had your laptop stolen, you know it sucks. big time. now, try that feeling and double it. yep, second time my laptop gets stolen. from the office. gone:
  • millions of lines of code
  • thousands of pictures
  • probably countless of somewhat important documents
  • one hell of a laptop
found:
  • anger
  • dissapointment
i really hope the year started in a better way for you than it did for me.. P.