Wednesday, 22 July 2009

Anonymous Access SharePoint WCM Site prompting for login in IE only.

Watch out for those SharePoint anonymous access demons, while a new site that I have been working on was going through testing on its way to UAT we encountered an odd bug where only IE 6-8 would request a login box when loading some pages, we traced this down to one Custom control that was pulling an item from a SharePoint list and displaying some images with their description.

As this was not an issue in other browsers we concluded that it was not the control or a case that the images were not published (though we checked to be sure), after a long night and a few tufts of hair lost to frustration I had a look at the html output, there plain as day was the culprit, an image tag with no alt or source, I have come across this before and could kick myself for it but what happened was the developer simply fetched the value of the image field and rendered the html supplied by SharePoint. When no image Url is supplied SharePoint outputs a blank image tag like this <img src=”” alt=””></img>, this tag causes IE to try and authenticate the user(don’t know why never botherd to look any deeper).

So the lesson learnt Don’t trust SharePoint’s Html it can be a Demond in disguise.

Tuesday, 21 July 2009

SharePoint 2010 and the NDA

I have been lucky enough to be working with the next release of SharePoint 2010 through the TAP program and have wondered what I can and can’t say about it, Joel Oleson has recreantly posted a helpful blog in regards to what we can and can’t say(What’s Up? NDA or NOT? Office 2010 Technical Preview vs. SharePoint 2010 Technical Beta), Till the NDA is lifted I won’t be saying much other than so far I have found 2010 to be looking really good and I can’t wait for it to move on to RTM.

For those that are interested.
My SharePoint 2010 environment is all beta/rc at the moment
Windows Server 2k8 R2 RC hyper-v Host with Windows Server 2k8 R2 RC VMs
With SQL 2008 running as the backend database on one.

So far so good, look forward to sharing what I have found in the future.

Friday, 8 May 2009

Finding the language packs installed on a SharePoint Server

I spent a hour or sow looking for a way to find all the installed languages on a server so I could update one of the XML files via a feature (I will post later about Installing a Theme across multiple front end servers targeting multiple languages).

The file I want to modify was SPTHEMES that is located at TEMPLATE\LAYOUTS\{LCID}\SPTHEMES.XML, There is a unique file for each language.
I thought that there must be a class in the OM that would allow me to get the installed languages. After diving in to the SPFarm object, digging in the NewSitePage class and a number of web searches while still getting no where I stumbled on the most simple class. (YaY for Reflector)

SPRegionalSettings and its GlobalInstalledLanguages property.

SPRegionalSettings.GlobalInstalledLanguages is a collection of SPLanguage objects.
each SPLanguage object is a simple data object that contains DisplayName and a LCID propriety.

so with this simple for loop I managed to avoid messing around with searching through the File system.

foreach (SPLanguage language in SPRegionalSettings.GlobalInstalledLanguages)

Sometimes the simple solution takes the longest to find.
Hope this helps someone.

Tuesday, 5 May 2009

A New SharePoint blogger

One of my bosses has started blogging about his experiences skinning SharePoint sites and the work he has done to create a simple CSS frame work that can be used Making SharePoint Beautiful

More than worth a look at some of the secreats behind the magic he has created.

Wednesday, 18 March 2009

SharePoint Best practices conference - UK

Looking forward to the SharePoint Best Practices Conference in London comming up this April

for more info see

Thursday, 5 March 2009

Twitter And Me

Well i have made the jump in to the Twitter pond you can find me at not that there will be mutch looking at my blogging history :P

I am trying out the Blu Client though TweetDeck and the like seem to be better clients i just cant bring my self to install yet another platform, I dont have java installed for the same resion.


FBA Login Page - Images not showing when user is Anonymous

I have been doing a lot of work with FBA and custom membership providers and here is something that is so simple but nearly caught me out.
The Client was happy with the way the login worked but complained that the styling was different from the rest of the site. So one of our designers put together a Simple.Master based on the main master pages styling and a custom CSS.
So we added this to our solution and deployed it to our staging environment.
The login page loaded fine but neither the CSS file nor the images were being pulled through leaving the login page looking worse than before. At first thought I was a little confused as the CSS and the images were stored in a Layouts/{Project Name}/CSS and Images folder and worked fine once a user was logged in. Then I realised exactly where I had gone wrong, The Layouts folder is only accessible to authenticated users, this is not only expected but wanted. So as WSS is based on ASP.Net we can open a path to our CSS and Images folders to allow Anonymous users to see the files and only these files.
We added the following to the Web.Config

<location path="_layouts/{Project}/images">
<allow users="*">
<location path="_layouts/{Project}/CSS">
<allow users="*">

It would have been possible to place the Images in the Images folder but I prefer to keep all Custom files in the layouts/{Project Name} format as it makes it easier for admins to track the changes our solution has made to their servers.
Also to note there is nothing in these folders that would be need to be protected however there are some files in the layouts/{Project Name} that should only be available to authenticated so we could not just open up the entire Folder.

Any way just something small that helped.

Sunday, 25 January 2009

Moving On

It has been a while since my last post.

Thing have been really busy for me as I changed jobs in October.

I am now working for Brightstarr leading their SharePoint development team.

BrightStarr concentrates more on the usability and look and feel customisations as opposed to the backend integration and Business layer side. Their aim is the make the users want to use SharePoint because it is fun and looks good.
So the last few months I have had to brush up on my UI layer, Web 2.0 and what makes a website usable. All in all it has been a great few months and some of the projects that I have been working on really need a second look to see that it is really running on SharePoint with all its out of the box goodness.

Well I hope I will get some time to post some of the Web 2.0 SharePoint things I have been up to with My Sites and some of the interesting front end web parts.