Posts

Showing posts with the label SharePoint 2007

Shutdown Services Script for Sharepoint

Based on the blog post by Rafelo " Stopping and Restarting WSS 3.0 and Microsoft Office SharePoint 2007 (MOSS) " I wrote a quick cmd script to automate the hunt-and-peck task of shutting each of these SharePoint services down one by one. net stop w3svc net stop iisadmin net stop ssosrv net stop DCLauncher net stop DCLoadBalancer net stop OSearch net stop SPAdmin net stop SPSearch net stop SPTimerV3 net stop SPTrace net stop SPWriter iisreset /stop Why ever would we do this? In my case, I'm refreshing the content in the pre-production environment with the production content - and using a database restore of the related content databases to do this. SQL Server requires exclusive access to the database in order to overwrite it from a backup, so this is a pretty good way to drop all connections from the SharePoint IIS webserver. And here is the script to bring it all back up (in the opposite order) iisreset /start net start SPWriter net start...

c# script to delete very large second stage recycle bin items in sharepoint 2007

In SharePoint 2007, when item versioning is set to no limit for a document library, you could easily have a spiraling content database size.  When you try delete a ginormous item, it'll eventually get stuck in the second stage recycle bin, and you'll never be able to reclaim that database space or file space - a forced purging of the recycle bins through a UI operation will time out eventually, rolling back a huge transaction, probably freezing the site for your users - cue fire and brimstone. The solution is to run the following script off-hours.  Off hours helps minimize any potential blocks SQL server may issue against database pages as it goes around deleting the row content from alldocversions - from what I can tell, many I/O Page Latch locks are issued when SQL is deleting blobs, so to be nice to this script and run it off hours.  Compile it into a c# console application referencing the sharepoint dll. There isn't much for progress reporting included in the script...

sharepoint trick to edit "new item form" by adding to url

Image
Hide columns on NewForm, DispForm, EditForm in SharePoint list To remove columns from appearing on a display, edit item, and new item form in SharePoint lists, e.g.: The goal is to add some JavaScript into a Content Editor Web Part (CEWP) on the above page. To add web parts to any page within Sharepoint : On the URL of the form page you are, add to the end of it: &toolpaneview=2 (i.e. Or remove all the stuff (querystring) stuff at the end of URL and change it to DispForm.aspx?toolpaneview=2 . The page will then change to Edit Mode: From here, add a CEWP, content editor web part, to the page UNDER the form already on the page. This is very important, if will not work if the CEWP is not under the form. Modify the CEWP, open the source editor, and paste in: <script type="text/javascript"> var containers = document.getElementsByTagName("*"); for (var i=0;i<containers.length;i++) { if (containers[i].innerText == ...

Win 7 & SharePoint fix: webdav Explorer (windows explorer view's) slow performances issue

Since upgrading any client to Windows 7, SharePoint's Windows Explorer view got really really slow. Guess what, it has to do with IE 8's (maybe IE7 too) automatic proxy detection, not SharePoint.  You might experience this slowness connecting to any webdav server, including my iPhone's. Here is the fix: In Internet Explorer, open the Tools menu, then click Internet Options. Select the Connections tab. Click the LAN Settings button. Uncheck the “Automatically detect settings” box. Click OK and thank daniel cd  http://social.technet.microsoft.com/Forums/en-US/w7itpronetworking/thread/600a9825-0ba1-4c15-93f6-fc99c64b4930 or chief oddball  http://oddballupdate.com/2009/12/18/fix-slow-webdav-performance-in-windows-7/

Locking down Actions in SharePoint 2007 like Edit in Datasheet, Export to Spreadsheet

Image
Among the many requests we get to compose or decompose some of the basic functionality built into SharePoint 2007 - we get this one a lot.  For some very valid business reasons, Edit in Datasheet or Export to Spreadsheet (Excel / Access) violate some of the metadata rules or workflow customizations that may affect metadata.  I think this is due to the lack of robust field level security tied out to the users or groups in SharePoint.  It's not too hard to build this into SharePoint (most serious web applications have field level security), and I've even helped build field level security into a few widely employed web applications. So maybe its due to something else.  Either way, to disable the functionality, you basically gut SharePoint's webservices from the set of users you want to lock it down for. Go to [your site] > Site Settings > Permissions > Permission Levels Note: to do this for a single list, break permission inheritance at the list, th...

SharePoint 2007 URL Quick List still holds up

I think its funny/slightly sad that very little about this list of URLs have changed since Heather Solomon wrote this information up  in July 2005 - 4.5 years later; this is a relevant and useful administrative list of URLs that are sometimes hidden depending on a few factors in your deployment: Portal and WSS Function Add to the URL Notes Manage List Template Gallery /_catalogs/lt/Forms/AllItems.aspx Manage Site Collection Users /_layouts/1033/siteusrs.aspx To access you must be an admin on the server or a site collection admin for the site. Manage Site Groups /_layouts/1033/role.aspx Manage Users /_layouts/1033/user.aspx Manage Web Part Gallery /_catalogs/wp/Forms/AllItems.aspx Site Usage Report /_layouts/1033/UsageDetails.aspx Site Usage Summary /_layouts/1033/Usage.aspx User Information /_layouts/1033/userinfo.aspx Web Parts Maintenance Page ?contents=1 Add to the end of the page URL Portal Only Function Add to the URL Notes ...

Default Document Content Type always loading as Document

Image
The problem statement is in MOSS 2007, when the user adds custom content types to an existing document library and then set them up to appear in the new document dropdown, MOSS still uses the default Document content type (though after saving, you can edit properties to set the correct content type - how undesirable!). Stephen Muller pointed me in the right direction for a fix, but mine differs slightly from his. Solution: Create a document library and set the default Document Template to None . i.e. do not select Microsoft Word, Microsoft Office Word 97-2003 template, etc. After the document library is created, do this within the Document Library Settings: Create Column s or Add from existing site columns go Advanced Settings > Allow managment of Content Types=Yes,    then Add from existing site content types then Change new button order and default content type and set the new content type up as #1 (for example)

Security and Audit Trail of Workflow Tasks in SharePoint 2007 & Visual Studio 2008

Image
Two requests that are probably part of every SharePoint workflow design: Permit only the users who are assigned a WF tasks to edit (i.e. complete) them Record the user name of the person who completes a task (instead of the System Account) Not suprisingly, neither of these pretty simple, seemingly obvious design concepts can be done out of the box / without some customization.  Also, certain configuration screens might trick you into thinking you can do this directly within the SharePoint UI (you can't; more on this in the deeper blog posts). Part 1: Security of Workflow Tasks in SharePoint 2007 and Visual Studio 2008 Part 2: Audit Trail of Workflow Tasks in SharePoint 2007 and Visual Studio 2008   There are a couple of good blog sources for each of these customizations, but I didn't find any of them to be thoroughly detailed with screenshots, pitfalls, etc.  So what I hope to do in this two part blog post is cover some portions I think those...

SharePoint vs. File Servers

Whenever you talk to someone about the document management features of SharePoint, the question comes up; how does one differentiate and create guidance around when to use a file share versus when to use a SharePoint Document Library.  There are many levels of appreciation of SharePoint's feature set - and kind of like an onion, there are many things that are underneath the surface.  Here are some examples of features that are difficult to implement on a file share: commented version history file metadata / content classification audit tracking data retention policy implementation / enforcement self-service recoverability business processes / workflow Moreover, below are some examples of when to use a file share over SharePoint: audio streaming or video streaming product distribution server & desktop backups Access database storage custom tools distribution, utility executable distribution, script distribution archive file storage Table: Simplified Comp...

Searching your SharePoint sites with Internet Explorer 8

IE8 follows the FF path and has a customizable Search Toolbar that can be plugged into a SharePoint instance. Start by clicking on the “Find More Providers” menu item on the drop down in the IE8 search toolbar area. On the bottom of the Providers screen you can find a link: “ Create your own Search Provider ”. So if you want to add your SharePoint search page to the IE toolbar, follow the on-screen directions; enter SharePoint search result URL after typing TEST - e.g. http://intranet/search/Pages/results.aspx?k=TEST . Now you’re able to use your SharePoint search site directly from your browser credits: this post is nearly verbatim from this blog