SharePoint Domain Users Can't Login--get Access Denied
Submitted by sami on Fri, 08/22/2008 - 14:12I ran a script to break inheritance and suddenly no domain users could get into the site.
The solution was to do an IISReset.
Another option is to check that the NT AUTHORITY\Authenticated Users have access to the site still.
Using Team Foundation Server? Need to restore a deleted file?
Submitted by sami on Wed, 08/20/2008 - 15:41I bet the first thing you found was this unhelpful, complex method (surprise!) from Microsoft using tf.exe.
http://msdn.microsoft.com/en-us/library/y7505w2x.aspx
Happily, Clark Sell has an easier way: http://blogs.msdn.com/csell/archive/2006/04/11/573571.aspx
In Tools -> Options -> Source Control -> Visual Studio Team Foundation Server check "Show deleted items in the Source Control Explorer". Once checked you will be able to use the undelete features from within the IDE rather than tf.exe by right clicking on the item in source control you want to undelete and selecting "Undelete".
Thanks to Clark Sell for saving me from Microsoft documentation.
Error when accessing Page Settings
Submitted by sami on Fri, 08/15/2008 - 15:51My site was giving this error on certain pages when I went into Edit mode then clicked Page and then Page Settings:
Value does not fall within the expected range. at Microsoft.SharePoint.Library.SPRequestInternalClass.GetMetadataForUrl(String bstrUrl, Int32 METADATAFLAGS, Guid& pgListId, Int32& plItemId, Int32& plType, Object& pvarFileOrFolder)
at Microsoft.SharePoint.Library.SPRequest.GetMetadataForUrl(String bstrUrl, Int32 METADATAFLAGS, Guid& pgListId, Int32& plItemId, Int32& plType, Object& pvarFileOrFolder)
at Microsoft.SharePoint.SPWeb.GetMetadataForUrl(String relUrl, Int32 mondoProcHint, Guid& listId, Int32& itemId, Int32& typeOfObject, Object& fileOrFolder)
at Microsoft.SharePoint.SPWeb.GetFileOrFolderObject(String strUrl)
at Microsoft.SharePoint.Publishing.CommonUtilities.GetFileFromUrl(String url, SPWeb web)
at Microsoft.SharePoint.Publishing.PublishingPage.get_Layout()
Remove My Site Link in SharePoint
Submitted by sami on Wed, 08/13/2008 - 13:42I wanted to get rid of the My Site and My Links navigation elements at the top of the SharePoint sites.
1. Log into Central Administration.
2. Find Shared Services Administration and select the web site under that which you want to turn off My Sites for.
3. In the "User Profiles and My Sites" group, click on the "Personalization services permissions" link.
4. To remove the functionality for most of your users, select NT AUTHORITY\Authenticated Users.
5. Click "Modify Permissions: Shared Service Rights" from the top menu.
6. Uncheck “Use personal features”. Click OK to save.
You'll need to close and open your browser to see the changes.
Thanks to: http://stevepietrek.com/2007/12/11/disable-mysite-and-mylinks-in-moss-20...
The RSS Viewer web part is missing from the "Add Web Part" menu
Submitted by sami on Wed, 08/13/2008 - 12:12The RSS Viewer web part was not displaying as an option when I tried to add it to a page. Even if I chose the "Advanced" option there was no mention of it.
In order to use the RSS Viewer on a publishing site, you need to go to your top level site, select "Site Actions"-->"Site Settings"-->"Modify All Site Settings".
Under "Site Collection Administration", click "Site Collection Features" and enable "Office SharePoint Server Enterprise Site Collection features".
Thanks to the post here: http://www.sharepointu.com/forums/p/2995/8085.aspx#8085
UPDATE: This fix did not work on the next server I tried it on. There was one more step I had to do.
1. In SharePoint Central Administration, go to Operations.
2. Under "Upgrade and Migration" select "Enable Features On Existing Sites".
3. Select the checkbox (there's only one... smashing UI design) and click OK. I had 3 applications with very few sites and it took about 5 minutes.
SharePoint gives a 503 Service Unavailable Error
Submitted by sami on Tue, 08/12/2008 - 15:11I got this error and saw nothing in the event viewer and did an IISReset--still no luck.
Turns out the application pool wasn't started. I'm not sure what made it stop. I'm hoping whatever it was is human and will admit it. :-)
Hiding people.aspx in Sharepoint
Submitted by sami on Tue, 08/12/2008 - 11:31Great post on how to do this is here:
http://forums.technet.microsoft.com/en-US/sharepointgeneral/thread/21768...
Except for the fact that it puts an emoticon in the tags. Here it is without those:
<asp:Content contentplaceholderid="PlaceHolderMain" runat="server">
add this line
<Sharepoint:SPSecurityTrimmedControl runat="server" PermissionsString="ManagePermissions">
then directly before that sections closing tag (it happens to be the last line in the file) which looks like this
</asp:Content>
add in the closing tag for the SPSecurityTrimmedControl i.e.
</Sharepoint:SPSecurityTrimmedControl>
Batch file for retracting and deploying solutions
Submitted by sami on Tue, 08/12/2008 - 09:52Just pass this the arugments of "action url WSPfilename" and save yourself some typing.
=========================
:begin
@echo off
set action=%1
set url=%2
set name=%3
@set PATH=C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN;
echo %1%
echo %Path%
IF .%1==.retract STSADM.EXE -o retractsolution -immediate -name %name% -url %url%
IF .%1==.delete STSADM.EXE -o deletesolution -name %name%
IF .%1==.add STSADM.EXE -o addsolution -filename %name%
IF .%1==.deploy STSADM.EXE -o deploysolution -name %name% -url %url% -immediate -allowGACDeployment
:END
How to change a web part's behaviour when a page is in edit mode
Submitted by sami on Tue, 08/12/2008 - 09:09WebPartManager wpm = WebPartManager.GetCurrentWebPartManager(this.Page);
if (wpm.DisplayMode.AllowPageDesign)
{
this.Controls.Add(new Literal("edit mode"));
}
else
{
this.Controls.Add(new Literal("not edit mode"));
}
Thanks to http://www.neilrichards.net/blog/?cat=12 I was able to use this to allow a user to append a querystring on to the URL to prevent a redirect.
Handy way to get to web parts maintenance page
Submitted by sami on Tue, 08/12/2008 - 09:01If you ever need to remove a troublesome web part that is preventing you getting to the page, try adding "?contents=1" to the querystring. That should take you to the Web Parts Maintenance Page where you can manually remove the web part.
Thanks to my colleague Harry for this one.



