Thursday, September 17, 2009

SharePoint Server Disable LoopbackCheck

This is a scenario I have come across a few times now, especially working on Windows Server 2008 boxes. It seems that this is a security fix that Microsoft introduced since Windows Server 2003 SP1. Basically what it fixes (breaks in SharePoint) is explained below.

1. You create a Web application in SharePoint that uses a host header that you intend to make available to end users. Lets say http(s)://

2. You can browse to this URL file from the other machines or over the Web.

3. You remote into the server to make some changes - and you decide to open a browser and type in the address. You usually get asked to login multiple times and after three tries it will usually show you a blank screen with a 401.1 access denied error. Note that this only happens when you are trying to access the website on the same server as you are logged into.

Enter the DisableLoopBackCheck setting in the Registry. Spencer Harbar wrote up a great article about the same that I ran across as I was writing this post, so I will just pass you on to his splendid explanation and resolution of this problem here.

Tuesday, September 15, 2009

Setting the default Active Directory in SharePoint People Picker

If you need to specify a default Active Directory that a People Picker control should find users from - and not to use any other trusted domains in its search, here is a nifty stsadm command for the following.

"C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\BIN\stsadm" -o setsiteuseraccountdirectorypath -path "DC=www,DC=company,DC=com" -url https://[your site url here]

Exposing SharePoint List Data using Data View Web Part

Recently I had the need to create a new view when a user clicked on a list item. This view was formatted like a HTML page, and looked nothing like the default DispForm.aspx that SharePoint shows you by default. Well, I ended up implementing a nifty solution that my colleague at work had used before.

Instead of replacing or customizing DispForm.aspx for the list (which you need to be really careful about), I actually created a new WebPart page in a document library on that site. I cracked open SharePoint designer and threw a Data View/Form Web Part (or the Swiss Army knife as it is sometimes called) and added a URL Querystring parameter to provide me with the ID of the item I was showing. Then I customized the design of the page inside the XSL to show me the view that I wanted.

The last part was to wire up the click event on the list to this new page. I browsed to DispForm.aspx and opened it up in edit mode. Some of you might wonder how is it possible to edit an administrative page? The answer lies in the querystring parameters you provide it in the URL. If you append a querystring ?PageView=Shared&ToolPaneView=2 to the page, then it will open it up in Edit view. From here on, I just hid the list view Web Part and added a content editor Web Part that contained some javascript to redirect to the page in my document library that had the Data View Web Part with the formatting I needed.

Thursday, September 3, 2009

Microsoft case study on RE/MAX Extranet

Please check out the recently released Microsoft case study on RE/MAX which is a project I was involved in from the beginning and worked on for a little less than a year. It was a great suceess and we used a lot of cool features in MOSS to build the extranet, meet the business needs and exceed expectations. Here is the case study.

SharePoint Guidance v2 released

The second version of the SharePoint guidance was just released recently. Be sure to have a look and to incorporate the guidance and the architectural decisions that can help you in your SharePoint implementation projects. Here is the MSDN site. Here is the project site on codeplex. Enjoy!