Wednesday, April 04, 2007

SharePoint ASPMenu control is prompting for user credentials if it finds draft documents on the public site

I am working on an MOSS internet project at the moment, and today I came across a strange behaviour in development where users get prompted for their credentials.

Background
Basically I setup a staging environment and did a full deployment through an ISA firewall to a destination server. I then setup anon security on the destination site. After making some changes to pages in development, I then ran a deployment to copy across changed files since the last deployment. One of the things I noticed (and I wasn't aware of this) was that during a content deployment, it is not only the published files that get deployed, but also Draft pages. It doesn't seem to matter whether it is a full deployment or only the deployment of changes - draft content still gets sent across (which is bad).

Now I have a couple of Master pages, each of which contains 3 content placeholder ids (PlaceHolderLeftNavBar, PlaceHolderMain, PlaceHolderAdSpace). The page layout used only overwrites the PlaceHolderMain and PlaceHolderAdSpace regions (i.e. no reference to PlaceHolderLeftNavBar at all). In this case, my main master page outputs the ASPMenu control in the PlaceHolderLeftNavBar space. My other master page contains the 3 content placeholders, but does not put anything into the PlaceHolderLeftNavBar area (and as the page layout doesn't reference this id also, nothing gets rendered in the left nav area).

The Experienced Problem
On the destination server, when the master page with the ASPMenu left nav gets used, if there is any draft pages that it finds, it prompts for credentials, instead of just hiding them. If I switch master pages so that the ASPMenu is no longer rendered on the page, the user does not get prompted.

If anyone knows why this is and knows how to fix it, please post a comment.

No comments: