Posts

Showing posts from 2009

Thumbnail View of Slides

One thing you lose when you create a data view of a slide library is the ability to just show a thumbnail without some custom work. It's not difficult, just a pain. Here's the code so you don't have to waste time thinking about something that should be built in. Note: This works for ppt and pptx files. You'll have to think to make the rest work! <td class="ms-vb"> <xsl:variable name="fileExt" select="concat('_pp',substring-after(@FileLeafRef, '.pp'))" /> <xsl:variable name="fileName" select="substring-before(@FileLeafRef, '.pp')" /> <img border="0" src="/{@FileDirRef}/_t/{$fileName}{$fileExt}.jpg" /> </td>

Lockdown Your Web Site For Anonymous Users

Need to open access to your SharePoint site for anonymous access, but don't want them browsing your lists and libraries? Just activate the lockdown feature! Set your web site up for anonymous access in Central Admin under Authentication providers. The next step is to log on to your server and open up a command prompt so you can run a stsadm command. If you haven't added it already then you need to make sure the path is set to include C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\BIN. Next run the command: stsadm -o activatefeature -url -filename ViewFormPagesLockDown\feature.xml Now you can go the permissions for your site and edit the permissions to allow access to the entire site. Your users will not be able to get to your lists and libraries to view what is in them, but you can still expose the items for users to get to through web parts on your pages. One last thing to note is that if you already have anonymous access turned on to your site it will...

Corrupt WSS 3 Content Database Recovery

I had the pleasure of working with a client recently on an issue that was described to me only as "there was a problem with the Internet and then SharePoint stopped working." With such an in depth explanation to the problem I knew exactly where to start, the logs! After looking over SharePoint's logs and the event logs, I was seeing errors dealing with the Network Service account not having access to the database and database does not exist type errors. This gave an indication that it could be a corrupt database. Now the setup here for this client is a personal server running Windows 2003 R2 SP2 with WSS 3 SP1 and using Windows Internal Database SP2. The first thing I did was look for the backups. Unfortunately the person that did the install of SharePoint did not configure the backups to run. I went to my second option and asked the IT guy in charge of the network if he had backups scheduled on the server. No luck there either. The next thing I did was run thro...

SharePoint Saturday Follow-up

Thanks to everyone that came out to SharePoint Saturday. Thanks to Eric Shupps for getting everything organized and getting some great speakers out to talk about SharePoint! I appreciate all those that came to listen to my session on using jQuery to make the end user's experience better in SharePoint. There were a few technical issues, but I think everyone was excited to hear about what jQuery can do for them. There are plenty of resources out there for everyone to get quick pieces of code to use in their implementation, but don't think that it is too complicated for you to start writing your own! On the Manning website there is code that can be downloaded for you to test out your jQuery skills against a sample DOM. You should also pick up the jQuery in Action book to go with the sample code so you can follow along and get the best learning experience. The slide decks should be out on the SharePoint Saturday website or you can use this direct link. Over the next few weeks ...

Submitting InfoPath Forms to a SharePoint Library

This was a fun adventure that ended with me solving the problem and Microsoft support not responding. Of all the ways to submit a form to a SharePoint library only one of them works according to MS. The simple way of using a Data Connection with stored credentials was not allowed as MS considered it a security risk. Doing a direct submit to the library is out too! What's the only way? Create your own web service and submit your form to it so it can use elevated privileges to save to the SharePoint library. That and the combination of either one of two things. Not precisely sure which one did it since I did both just to cover all bases. Since I got it to work in my dev environment that was running on a VM with SP2 installed my boss determined, with pressure from our client, that we needed to install SP2 on the production server. A little premature since it hasn't been out that long and there was a least one major thing broken with the update. Yes the fix was simple, but it was a...

First SharePoint SP2 Install in Production

Tonight I'm performing my first SP2 install attempt on a production server. All service packs are downloaded and the installation process begins. Starting the WSS SP2 update now... 10 minutes later: WSS SP2 installed and configured. Shane Young skipped the configuration during his update, so we'll see if I have a different outcome. You check out his steps here . Starting the MOSS SP2 update now... 25 minutes later: MOSS SP2 installed and configured. Testing out the sites to see if anything broke. Looks like no issues to report on the admin site. Public site looks good too! Even the custom templates that were installed seem to be working on the Intranet site. Install went extremely well considering all of the parts that could have broken. Tomorrow bring testing of the new browser support. We were experiencing issues with IE8 on our public site. I'm going to update the master pages tomorrow to see if SP2 fixed our issues.

SharePoint Saturday Dallas

Check it out! SharePoint Saturday is hitting Dallas on July 25th. Come out and listen to different speakers talk about what's going on in SharePoint these days. Here is the official site

SharePoint - Workflow "Failed on Start (retrying)"

Maybe you ran into this issue with your SharePoint environment. You set up a workflow on a list or library and then when it executes you get the status of "Failed on Start (retrying)". Well, there are a lot of posts out there that are attempting to help you fix the problem. The all suggest the same solution. Just go to a command line and run Lodctr /R "c:\Windows\Microsoft.Net\Framework\v3.0\Windows Workflow Foundation\perfcounters.ini" This is great unless it doesn't work, because there are no other solutions out there. I ran into this problem. It took a while to figure it out, but after snooping around in the WWF 3.0 folder I found a registry setting file that contained some interesting info. I went to the registry to check the settings out to see if I could learn any more. I found that the settings weren't even in the registry. Now, here is some other information that is pertinant. This server is hosted by another company and they are responsible ...

SharePoint SP2 - Beware! (Update)

Here is some more fun stuff to know about installing SP2 on your SharePoint server. Microsoft just posted some info on the SharePoint team blog ( http://blogs.msdn.com/sharepoint/archive/2009/05/21/attention-important-information-on-service-pack-2.aspx ) that talks about how after installing SP2 your SharePoint license key will expire and your product will revert back to evaluation mode. Everything should still function normally, but after 180 days it will stop working unless you fix the problem. To do this you just need to reenter your product key in Central Admin. MS is working on a hotfix that should be out soon. Hopefully they push out a new install for SP2 as well so no one else has to go through this.

SharePoint 2007 SP2 - Beware!

As you know SP2 was just released not too long ago for Office Servers and the Office Suite. There are some big changes that are incorporated in this update especially for WSS 3.0 and MOSS 2007. It includes an infrastructure change which mean there is no turning back after you install it. Be sure to backup all of you databases and files in case something goes catastrophically wrong and you need to restore everything. I'm in the process of running the update on my development box and have already run into an issue with SSPs . There was an error that occurred during the upgrade and now I can't get to the SSP admin screen. My resolution for that, since it is a dev box, is to delete the SSP and create a new one to associate my web applications with. I'll keep you updated on what I find out and any other issues I run into.

SharePoint Designer, Master Pages and Versions = Headache

How can something so simple can so much pain? Scenario: You open Designer to edit your page. When it finishes loading the Design view says Master Page is invalid and you need to fix it so you can see your page. So you follow the instructions and try to reconnect to the Master Page. Nothing works. Resolution: If your Master Page has not been published and you have the security level to see minor drafts, then you will be effected by this. You have to publish a Major verison to get your page to show correctly. Key is don't allow Minor versions!

Raw XML - Seeing what's returned in your request

One thing that might help you at some point is being able to see the raw XML that is coming back in your request. In SharePoint you don't have an easy way to view it. Here is a simple way to get the data in your web part. First, go to your page and get into edit mode. Another option is to open it in Designer and edit the XSL source there, just quicker in the web. Second, copy this code into your XSL area for your web part. <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl=" http://www.w3.org/1999/XSL/Transform "> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:template match="/"> <xsl:copy-of select="*"/> </xsl:template> </xsl:stylesheet> Save or exit edit mode and reload your page. After your page loads right-click and view source. Your XML will be visible in the page that pops up. Enj...

Check your WSS install!

This entry is provided by Melissa Wilson Assar, a colleague of mine. Melissa writes: "Recently after installing WSS, I checked the event logs to make sure everything was running smoothly. I noticed that there was an error that continualy occured in the Application logs. I checked another WSS install and the same error occurred there. It seems to only be happening with WSS installs. The following error occurred in the Application Event Logs: Event Type: Error Event Source: Windows SharePoint Services 3 Search Event Category: Gatherer Event ID: 2424 Date: 12/8/2008 Time: 11:20:02 AM User: N/A Computer: SP1 Description: The update cannot be started because the content sources cannot be accessed. Fix the errors and try the update again. Context: Application 'Search', Catalog 'index file on the search server Search' For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp . I checked the system event logs and found this error: Event...

Updating a List's "Modified By/Created By" Properties

Here is a piece of code that can be used in Powershell to update the Modified By and Created By properities on a list. This is helpful if you move content using Sushi or other tool and they don't get updated. We tried to use Sushi to update this information, but found that you couldn't do it. [Reflection.Assembly]::Load("Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c") # Change the URL to your site $SPSite = New-Object Microsoft.SharePoint.SPSite(" http://source/presidentscorner/ ") $SPWeb = $SPSite.OpenWeb() $SPList = $SPWeb.Lists["Comments"] $SPListItemCollection = $SPList.Items foreach ($ListItem in $SPListItemCollection) { # Make sure you are updating the correct item in the list if ($ListItem.ID -eq 4) { # Change the User ID and Name to who you want shown. # If the user doesn't exist in the Web collection then added them as a visitor and get their ID. You can then delete them # from the group and e...

SharePoint Branding

Things to set in CSS when creating a branded site based on BlackVertical.master: .html - background-color = color of background you want to see .body - background-color = white. Necessary due to ActiveX control being used for datasheet view on lists. The color you specify for the body will also be used for the spreadsheet. .ms-main - background-color = same color used for .body. This will probably be best to be white. The issue here is that when you get to the admin pages the .html value will come through any transparent layers. add form#aspnetForm - background-color = This will be the same color as your .html style. This will cover the background color of your .body so that you will finally see the color background you were looking for.