I was working on a project using forms based authentication some time back and without knowing it I hadn't checked an important property when in the proecess of adding a new authentication provider. I then couldn't understand why if I switched forms based authentication off my action menus contained items like Export to spreadsheet and Edit in Datasheet yet when I switched it back on they were missing. What I'd mistakenly forgetten to check was "Enable Client Integration". To rectify do the following:
Central Admin -> Application Management -> Authentication Providers, make sure your default provider has "Enable Client Integration?" = Yes
I had this issue on the last project I worked on, I was working happily in SharePoint designer making a few changes before a release when the css file showed itself as being checked out when it was actually checked in. The error was quite worrying and unhelpful. I searched around the internet and found the answer to the problem is to delete your temporary internet files and to clear your website cache of all files. For me on Server 2003 this was located under
Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\WebsiteCache
After this, everything worked fine again. I think there is an update that Microsoft has released recently to fix this as well.
If you've received an error in SharePoint but cannot view the details, make the following changes in the web.config of your site
customErrors mode="Off"
CallStack="true"
You should now see all details of the exception that occurred.
Whenever I start a new SharePoint project and put server side code in the master page I get this error. The fix to this is quite easy, all you need to do is locate the <PageParserPaths> </PageParserPaths> tags and put the following inbetween:
<PageParserPath VirtualPath="/_catalogs/masterpage/MyMasterPage.Master" CompilationMode="Always" AllowServerSideScript="true" />
All this does basically is allow for server side code on the MyMasterPage.Master page.
I've done quite a bit of styling but in the past I hadn't changed the look of the web part drastically. I was wanting to round the corners of the web part. I came across this blog post which was very helpful and sorted out the rounding issue:
http://madalina.blog.com/2705257/
We just had an issue with the right hand top corner still leaving a border behind (and thus not rounding off). The only change which was needed was settting the alignment to middle vertical-align:middle;
tr.ms-WPHeader TD
{
background-color:transparent;
background-image:url("/_layouts/images/curveRight01.gif");
background-repeat:no-repeat;
background-position:right top;
text-align:center;
vertical-align:middle;
width:35px;
height:33px;
padding-bottom:0px;
margin-bottom:0px;
margin-top:-1px;
overflow:visible;
margin-right:5px;
}
A SharePoint site can often have quite a detailed hierarchy of sites and subsites and to navigate this is sometime I bit daunting for a user. It's nice to add fly out menus for the top nav (or quick launch) to aid navigation.
The first change you need to make is a settings change. Navigate to the subsite which you'd like to change, go to Site Actions - > Site Settings -> Navigation (Under Look and Feel). Your page will look something like this:
Make the following changes and click OK. Note this process needs to be repeated for each sub site in your hierarchy to force the subsites to show below the previous one in the hierarchy.
The parts that make the main difference as you can see, is allowing the display of subsites for the top nav.
In your master page you need to edit the the AspMenu with ID of TopNavigationMenu. The properties that require editing are the StaticDisplayLevels and MaximumDynamicDisplayLevels. I've set my StaticDisplayLevels to 2 which means that my hierarchy is set to 2 levels down and my MaximumDynamicDisplayLevels to 2 which means that my fly outs can go across to 2 levels.
<SharePoint:AspMenu
ID="TopNavigationMenu"
Runat="server"
DataSourceID="topSiteMap"
EnableViewState="false"
AccessKey="<%$Resources:wss,navigation_accesskey%>"
Orientation="Horizontal"
StaticDisplayLevels="2"
MaximumDynamicDisplayLevels="2"
DynamicHorizontalOffset="0"
StaticPopoutImageUrl="/_layouts/images/menudark.gif"
StaticPopoutImageTextFormatString=""
DynamicHoverStyle-BackColor="#CBE3F0"
SkipLinkText=""
StaticSubMenuIndent="0"
CssClass="ms-topNavContainer">
<StaticMenuStyle/>
<StaticMenuItemStyle CssClass="ms-topnav" ItemSpacing="0px"/>
<StaticSelectedStyle CssClass="ms-topnavselected" />
<StaticHoverStyle CssClass="ms-topNavHover" />
<DynamicMenuItemStyle CssClass="ms-topNavFlyOuts"/>
<DynamicHoverStyle CssClass="ms-topNavFlyOutsHover"/>
<DynamicSelectedStyle CssClass="ms-topNavFlyOutsSelected"/>
</SharePoint:AspMenu>
The end result will look like the following:
Note if I wanted Site1.1.1 to go to a further level I'd need to modify MaximumDynamicDisplayLevels to 3.
I've been using the U2U CAML Query Builder quite a bit with the project I'm working on. For a display page, depending on the user logged in I generate different queries as to which members they are allowed to edit. Whilst doing this I noticed that my query as easy as it looked was bringing back all results from a list. Here was my test query:
<Query>
<Where>
<Eq>
<FieldRef Name='Username' />
<Value Type='User'>testuser</Value>
</Eq>
</Where>
</Query>
Turns out I needed to lose the <Query> </Query> tags, then it worked perfectly. Here is some sample code from my project:
SPList lstOrganisation = spWeb.Lists["Organisation"];
SPQuery query = new SPQuery(lstOrganisation.Views["Organisation View"]);
string strQueryString = "<Where><Eq><FieldRef Name='Username' /><Value Type='User'>" + Context.User.Identity.Name.ToString() + "</Value></Eq></Where>";
query.Query = strQueryString;
SPListItemCollection filteredOrganisation = lstOrganisation.GetItems(query);
foreach (SPListItem listitem in filteredOrganisation)
{
if (listitem["Username"] != null)
{
drTemp[3] = GetDropDownSelectedText(listitem["Username"].ToString()).ToString();
drTemp[4] = encryptQueryString(GetDropDownSelectedText(listitem["Username"].ToString()).ToString());
}
}
For the current project I am working on their was a requirement for certain sub sites to have anonymous access whilst others that have specialised content require authentication. This is actually quite an easy task, easier than I thought. Basically go to Site Actions -> Manage Content and Structure. In the page that comes up, select the site you wish to change, and from the context menu select "Advanced Permissions". The list of all users/groups associated with this site will then appear. Choose Settings -> Anonymous Access. On the next page from the option button list, choose "Entire Web Site" and click "OK". Try navigating to this site now. This site will be accessible by all whilst the others will still require authentication.