July 2007 - Posts
I was out of the office on Friday and a little birdie has just reminded me that I missed partaking in the celebrations that are Sysadmin day. On Sysadmin day legend has it Sysadmin's demand more ego massaging than normal to such an extent that it take days for their swollen egos to return to normal and they can actually fit through the door of the machine room.
I am concerned that my failure to partake could end up with my laptop being exchanged with a commodore pet and my phone replaced with something made of Bakelite, so if all of our Sysadmin's out there are reading this , presents have been ordered and will be with you shortly.
b.
We have been suffering some staff problems recently, everybody we hire has a name that is already in use elsewhere in the company. So we have decided to reorganise the Black Marble name space, initial thoughts included post name numbering , but nobody could agree if the numbering base should be zero or one and Richard 0 was not complementary (Rik however liked the idea of being No 2) . The usual list of server/workstation naming suggestions came and went but in the end the solution came when clearing out the freebies cupboard and some of the devs took some old BM Red polo shirts. So next time you are visiting say hello to some of our interns Ensign's Disposable,Expendable and Der Trihs , you will be able to find them crawling around in the Jefferies tubes before being send out as part of a customer landing party.
b.
Update : the sad part is most of our Interns think of STNG as the old Star Trek <sigh> and don't get the joke.
Technorati tags:
Black Marble,
Humour
Incase you haven't found out already Visual Studio 2008 beta 2 is out for download , ours has just finished downloading and I will update on new features over the next few days.
b.
Technorati tags:
Visual Studio
Rik sent me this to illustrate the pain of not having a new server within the last week and has suggested that we may need to move to this if his demands of a bi-weekly addition to the server farm is not met.
b.
Well it was bound to happen , we have split my blog posts off on its own. As ever BM Blogger's is the aggregate blog. I feel all alone in a big empty space , no doubt I will fill it up soon.
enjoy.
b.
Technorati tags:
Black Marble
Scientific American has a interesting article on a Data Center in a box. Basically it is a standard shipping container full of Sun Servers. I am our our IT manager would like one! it should fit on any house's driveway, a stylish addition to any home.
It is an interesting spin on the old IBM data recovery model where they turned up with a duplicate of your system in a truck in event of a major failure. The key change is it is being sold as a greatly cheaper option than a traditional data center. All it needs is power, a water supply (cooling) and I suppose given our current weather, a location not prone to flooding.
After posting yesterday about useful tools for development I stumbled across another little gem of a utility. IE7Pro is much more of a usability-enhancing tool but it has a wonderfully handy tool nestling within - Save Current Tab As Image. If you need to do grabs of pages for documentation or presentations and the page is more than a single screen in length this will transform your life - no more cropping and stitching!
IE7Pro also has a raft of features such as adblocking and mouse gestures, which I will admit to switching off immediately. However, it's inline search (not quite Find As You Type, but pretty close) is jolly useful.
Get IE7Pro
As web development gets more and more complex having the right tools to help you figure out what's going on is essential. I thought I'd do a quick post on the ones I find most useful. In no particular order, then, here they are.
- Virtual PC
This one is a godsend, because as we all know, running multiple versions of Internet Explorer is hard. VPC, now available as a free download from Microsoft, allows me to run the numerous variants of IE our clients require me to test against.
If you just want IE6, Microsoft have a handy downloadable pre-built VPC:
Download Virtual PC
Download the Internet Explorer Compatibility VPC Image
- Firebug for Firefox
Now imitated for other browsers, Firebug is fantastic. A clear and straightforward way to identify the bugs in your pages or styles, it allows you to easily identify which stylesheet rules are being applied and in what order, and to hack 'em on the fly as you test your fixes. Add to that the ability to mangle the page and debug javascript and we have a winner.
Download Firebug

- Chris Pederick's Developer Toolbar for Firefox
Even though Firebug is great, I still use Chris Pederick's trusty developer toolbar for enabling and disabling styles, accessing the W3C validator and other stuff. Couldn't live without it, in fact.
Get Developer Toolbar - Nikhil Kothari's Web Development Helper for IE
Broadly offering the same level of information as Firebug, but without the ability to hack on the fly, this is a handy way of seeing what IE is doing with your page under the hood.
Get Web Development Helper
- Inspector for Safari (for Windows)
I have a trusty Mac Mini that I use for checking Safari as well, but the advent of Safari for Windows has made my life easier, I must admit. How excited was I, then, to find that you get Inspector working with the Windows version. Again, loads of info about the page, although hacking on the fly. Instructions courtesty of David Barkol's blog. A note - as I write this the latest nightly crashes horribly - I am using the nightly from the 21st June and it works well. At some point I will try later builds but right now a stable platform that I can enable easily and consistently is more important.
Enable Web Inspector for Safari on Windows
I'd love to hear from anybody who uses other cool tools that I may not have come across. I'm particularly interested in these kind of things for Opera.
It may surprise some but I am a huge fan of board games, I feel that they can provide a great social event and some of the newer games produced over the last 10 years, are truly sublime.
However I did not expect to see the World bank trying to fight poverty by producing board games, especially commissioning a game around the subject of street addressing.
In November 2006, they called for game proposals on this topic: “Designing and Developing an Educational Game on Street Addressing.”
I wondered about the issues that the Bank were addressing, but after some reading and some thought realized that they are trying to get people to look at economic growth of poorer countries and address key issues which will affect growing business such as being able to have post/supplies delivered reliably and well you can work the rest out.
so my deepest congratulations and in fact my heartfelt thanks go out to the winners 1) I Need A Sign by Ariel Seoane from Uruguay, and 2) URBS & CIVITAS by John Baluci from USA
I think if I had known such a challenge had been put forward and the impact could be as great as it seems , I would have put a lot of effort into helping out. Maybe next time :)
if you would like to know more about the importance of street addressing the World Bank has produced a Report
b.
I spent a while knocking my head against a problem with a SharePoint server farm that's worth posting about. It's also worth a big hats-off to our Technical Support Coordinator at Microsoft Partner Support who dredged up the article that finally pointed us in the right direction.
The problem
I'll post later about our approach to SharePoint installations, but I'll summarise thus: We create multiple user accounts to the SharePoint services - a db access account, an installation account etc etc. In this instance we were building a three server setup - db server, web server, index server. The accounts were created first, logged in as a domain admin. I also installed SharePoint as the domain admin, but didn't run the config wizard.
I then logged in as our installation user, which has local admin rights to the two servers and dbcreator and securityadmin roles in the SQL server. I ran the config wizard on the web server and created the farm, specifying the db access account for (shock!) db access! The web server got to host the central admin site, which was tested and worked.
Before doing anything else I ran the config wizard on the second server and connected to the farm. At this point I had three servers listed in the Central Admin site, and it was time to configure services.
At this point we hit the snag - when I tried to configure the Office Server Search Service to run on the second server I got a SharePoint page telling me access was denied ('The request failed with HTTP status 401: Unathorised'. There was a similar error in the event log with an event ID of 1314, and we also found an event log error with ID 5000.
I bashed my head against this for a while, checking user rights, group memberships and stuff. I checked the DCOM IIS WAMREG activation rights for the users that the app pools were running as and just in case did an aspnet_regiis -ga <username> for those accounts to ensure that all the .Net registrations and rights were correct. No success.
I removed SharePoint and reinstalled the farm with the roles reversed. The fault moved to the other server. I confirmed that I could configure the service on the same server as the central admin site but never on the other server. I looked at the system registry, compared service configurations with a working system and tried manually hacking the config to no effect.
In the end I uninstalled everything, installed the farm clean and unconfigured and called in air support.
The fix
I can't praise our support guy at Microsoft enough. He's incredible - I emailed him and got a phone call within five minutes! We ran through the problem and he consulted his support resources. What he came back with took a few goes to make stick, but it worked, and in fixing SharePoint pointed to the root of the problem.
The solution is to edit the web.config for the Office Server Web Services site. On our system that file is in C:\Program Files\Microsoft Office Servers\12.0\WebServices\Root. The original file looks like this:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<sectionGroup name="microsoft.office.server" type="Microsoft.Office.Server.Administration.OfficeServerConfigurationSectionGroup, Microsoft.Office.Server, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" >
<section name="sharedServices" type="Microsoft.Office.Server.Administration.SharedServiceConfigurationSection, Microsoft.Office.Server, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
</sectionGroup>
</configSections>
<system.web>
<authorization>
<allow roles=".\WSS_ADMIN_WPG" />
<deny users="*" />
</authorization>
<webServices>
<protocols>
<clear />
<add name="AnyHttpSoap" />
<add name="Documentation" />
</protocols>
</webServices>
</system.web>
</configuration>
The solution is to edit the <authorization> section, adding entries to grant access to the user accounts for installation and db access:
<authorization>
<allow roles=".\WSS_ADMIN_WPG" />
<allow users="ondemand\MOSSdba" />
<allow users="ondemand\MOSSsetup" />
<deny users="*" />
</authorization>
However, the gotcha is that SharePoint puts the settings back - don't do an IISreset; don't recycle the app pool. Simply edit the file then go the page to configure the search service and it works. Once you've done that the service will start.
I then found that I couldn't get back into the page because the web.config got reset (grr), but that's not important right now.
The cause
The key in all this is that the two users I added explicit rights for were members of the WSS_ADMIN_WPG group specified inthe original file. This pointed at an issue with the domain - the server was failing to get a list of members for that group.
The servers themselves were built and managed by our customer's hosting provider, so I passed the fault to them. They checked the systems and found a domain fault affecting synchronisation. Result!
I have been having a phase of reading novel's I read years go, this time it is Neuromancer by William Gibson (published 1984). This choice was triggered by it being reviewed on BBC Radio4's A Good Read, the suggestion of Bill Thompson the BBC technology columnist.
I have been surprised by how little it seems to have dated, ok in places the sizes of data streams and the like seem small (how fast capacity moves on), and maybe the way cyberspace is visualized was nearer the mark of today's virtual worlds in Neal Stephenson's Snow Crash (published 1992) but on the whole it seems just as believable as a remember it being when I first read it. Still a worthwhile enjoyable read that has not aged as so much Sci-Fi does.
However, when it comes to books dating it seems that history books suffer the most. Currently I am reading Accidental Empires: How the Boys of Silicon Valley Make Their Millions, Battle Foreign Competition and Still Can't Get a Date, a really interesting book that is making me feel old as many of the systems it talks about I have used; we had a single Tandy TRS80 at school (it replaced our 5 hold punch paper tape teletype!) and my first IT job was for a PC Dealership that sold the IBM PC-AT in the mid 80s.
Accidental Empires was written in the mid 90s (the 2nd edition I have been reading was published 1996) and I think it shows. In the past 10 years the industry has moved on so much, particularly Microsoft's dominance, Bill Gate's role in Microsoft (and as a philanthropist) not to mention the resurrection of Steve Jobs and Apple.
So what does this teach us? Books often say more about their time of publication than the subject they purport to cover whether it is history or the future.
Introduction
I said I would post again when I had something to show in my TFS WorkItem webparts project, well here it is. I have created a pair of web parts, one to list all the work items and the other to display the details of a given item.
For testing I have create a single ASP.NET 2.0 web page that implements a WebPart manager. This needs to be setup to allow connection between the two WebParts. Note: if you use this sample you will probably have to recreate the connection between the web parts on the test page. Click the edit option (dropdown at top right) for either WebPart and use the connect option. When running it should look like this.
I had tried to use an ASP:Repeater control to display the list of workitems. I added a LinkButton to the first column to allow an item to be selected for display. The problem was that this button disappeared on a postback, a viewstate problem I could not resolve. I therefore swapped from a Repeater to a DataGrid which did not suffer this problem as it has a specific ButtonColumn type. However I left the Repeater code in the projects as it is nice worked example of how to programmatically add a Repeater, also I think it is potentially more flexible (if it worked!)
The details WebPart just does a list of all the fields in the WorkItem, this is because each type of WorkItem can have it's own fields. This does not look that great as there is data the user does not need to see, but without the creating a display for each workitem type I cannot see another solution.
Test Harness
If you look in the tester's web.config you will see the TFS section where you can specify TFS server, UID, Domain etc. The server must be filled in (and is shown on the list web part as a reminder as to what you set it to) but if the others are blank the user current authenticated identity in he browser should be used, if the other fields are filled in these are used instead.
Both these authentication models work fine in the test harness.
SharePoint 2007
After I got the tester working I moved the DLLs onto my test SharePoint 2007 VPC, now this is not a simple operation, but this VPC had already had the changes I specified in my last post, so was fairly quick to do. In summary the steps are:
- TFS Client API DLLs in the GAC
- The SharePoint virtual server web.config edit to give full error messages, run a full trust, have my DLLs marked as safe and the TFS entries from the tester web site added.
- Copy my TFS webpart DLL to the SharePoint virtual server bin directory
- Copy the two .webpart files in the project to the SharePoint virtual server wpcatalog directory
- Add the CSS styles for the controls to SharePoint CSS file - but if you miss this out they still look OK.
Now my VPC was not in our main domain, so for testing I initially used hard coded UID and Domain in the web config. Once this was all done I could add the two WebParts to a page and used the connection option on the edit menu to wire them together, and low and behold it all worked.
I then added my test MOSS server to our domain, made sure the authentication was set to Windows and a valid TFS user account was set as the owner of the site.
I then removed the UID settings from the web.config and tried again, it failed. After debugging I could see my HttpContext.Current.User.Identity and Microsoft.SharePoint.SPContext.Current.Web.CurrentUser objects were the correct user, but the System.Net.CredentialCache.DefaultCredentials always returned what appeared to be blank credentials, a problem as this is the one used by TFS authenticate. Unfortunately neither of the others can be cast to the ICredentials interface required for TFS.
Problem 1: So at this point you are left with hard coded accounts details, not that useful. The options are to throw up a login form, or have the values set by properties on the webpart. I intend to continue to try to find a way around this problem.
Problem 2: As I said my test server is on a VPC and hence 32bit, but our live MOSS2007 servers are all running 64bit. I tried to install my WebParts on our live server, but was stopped as at this time as there are no TFS Client 64bit DLLs, and for some reason the TFS Client DLLs cannot be loaded with WOW64 by the MOSS server. I am trying to find out when we can expect to see 64bit DLLs (or a workaround)
Summary
So not a perfect job, but a good learning experience for both TFS and MOSS
You can download the samples here
In theory to get it running in the test harness you just need to load the soluion in VS.NET 2005:
- Make sure you can reference the TFS DLLs (usually in c:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies)
- Edit the TeamFoundationServer server entry in the test site web.config to point at your TFS server.
- As it is a WebPart based tested when first run a Database will be created in the test site's APP_DATA directory
I am interest to here anyone comments.
After I installed the eScrum template everything seemed fine bar the reports, only the work item report showed anything, in fact on the other reports their parameter combo boxes were empty. The key difference is the workitem report is drawn form the SQL DBs, while all the other reports are drawn from the OLAP warehouse cube.
If you connect to the SQL server and run the command
select * from dbo._WarehouseConfig where id in ('LastPRocessTimeStamp','RunIntervalSeconds')
it should tell you when the last update from the SQL DB to the OLAP Cube happened. In my case it was days ago, before I put eScrum on the system, hence the empty OLAP based reports.
So I ran the tool on Eric Lee's blog that allows to to force an update. After checking the TFS server's application event log I saw that this had caused the Warehouse Controller Application to start and an update occurred. Why it had not started before I have no idea.
One to keep an eye on.
Problem
Today I tried to move VS2005 solution in TFS source control from one Source Control location to another (on the same server) as I had put it in a stupid location to start with.
So I unbound the source control (File -> Source Control -> Change Source Control) and then went into Source Control Explorer and deleted the directory and then committed the pending delete. This removed the files in the source control BUT ALSO the local ones on my disk, due to the workspace mapping. This was not what I expected, you use source control so you always have copy, a safety net, I had just lost all of my copies by using source control!
The immediate fix
So I checked the recycle bin and nothing, so I knew I had to use the TFS Power Tools to sort this out. The command required is
tftp rollback
The problem here is that you have to be in a directory that is mapped in your workspace so it can poll your TFS server to find projects. So I changed directory to my C:\project\myproject and ran the tool. It does a get latest against the server then shows a dialog where you can find the changeset to rollback to. I selected the one with the project deletes and hit go and it errored. It said
Postponing undelete to wait for the filename C:\projects\myproject no longer be occupied.
It turns out that as the changeset included a directory delete tfpt must be able to create the directory, which it could not do as it already existed and I was running the tftp.exe from it.
So I had to change directory to one also in the workspace but not for this solution, and also rename or delete the old directory and then the command worked OK.
Once this was done I was at least back to where I started. I get get all my files, build the project and check in and out.
How it should be done
The way it should have moved the project, assuming I did not care about the change history, is as follows
- In VS2005 load the solution then - file -> source control -> change source control -> unbind the project
- The select the solution or project in solution explorer and - file -> source control -> add selected projects to source control. The key point is here you are asked if you want to use the old location or a new one. This option is not should if you do not go via the file menu. Pick a new location.
- Once it is moved this way the old branch can be removed. Note that you will have to map the old location to the local disk in the workspace so that the delete options become enabled.
Hope this saves someone a bit of time.
When developing SharePoint add-in try to remember if you put a previous version of the DLL in the GAC or not. I have just wasted a couple of hours trying to work out why a new version of a DLL is not being read from a site collection's bin directory, when there was an old version in the GAC.
Of course this would not have been an issue if I had been checking the version number properly! A good argument for pair programming to avoid these stupid blind spots
More Posts
Next page »