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 http://twitter.com/jcvivian 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.

John

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">
<system.web>
<authorization>
<allow users="*">
</allow>
</authorization>
</system.web>
<location path="_layouts/{Project}/CSS">
<system.web>
<authorization>
<allow users="*">
</allow>
</authorization>
</system.web>

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.