You are here: Home

Do you use SharePoint Audiences? Beware of AD changes!

Posted by gruz
No Comments »

I really like using SharePoint Audiences to target pieces of content or pieces of pages to specific people based either on what active directory groups they are a member of, or based on specific criteria about the user, such as which city they work in. For example, it makes a lot of sense to show the latest news postings for each city on the homepage as targeted news items for members from each city.

Recently though we found one day that audience targeted items were no longer showing for specific people.  After a bit of troubleshooting, we discovered that one of the active directory domain groups that we were using was in an Organizational Unit (OU) that had been renamed.  It was a very simple change for the network guys, but they had no idea that it would break things in SharePoint — why should it?

After a bit more research, it appears that whenever a profile import occurs in SharePoint and the corresponding membership import occurs, SharePoint stores all the domain group membership in a database table in the SSP database called MemberGroup.  This table stores all the groups with a corresponding count and the group's canonical name.  When the group's canonical name changes in active directory SharePoint finds the new group and adds it as a duplicate entry into the table, and orphans the old record.  However, the audience rules still point to the old record, which is no longer valid and the audience compiles without any members.

To make matters worse — when you then go into your audience rules to correct the problem, there are now multiple groups to select from, with only 1 group being the correct group. The problem is that there is absolutely no way to tell from the interface which one is correct unless the actual name of the group changed.

I've looked into the Audience and Membership API's but find nothing that will help.  I contacted Microsoft just to find out that it is a "known issue" without any sort of timeframe as to when it will be fixed.  The support rep actually suggested that I just clean out the table in the SSP, but when I asked if database operations like that were supported he had to retract that suggestion.

If anyone else finds a solution, please let me know.  Otherwise I'll continue guessing which group names are correct while I watch the never ending fountain of hot fixes for a solution.

 

Workflow Gotcha – Can't use Surveys

Posted by gruz
No Comments »

We recently created a survey to gather feedback from users, and thought it would be a great idea to add a simple SharePoint Designer Workflow to the survey that kicks off automatically that simply sends an email back to the user thanking them for their submission.  It was very easy to create the workflow and attach it to the survey but once we tried it out we kept seeing the following error:

Failed on Start (retrying)

Well, according to the following KB article, for some unknown reason, workflow is not supported on surveys even though the interface through the browser and SharePoint Designer doesn't indicate any problems with it

http://support.microsoft.com/kb/926370

No longer able to create a DVWP with a DataSource that pulls data from another site collection.

Posted by gruz
No Comments »

In WSS v2 we were able to open FrontPage, add a DataView WebPart, enter the location for another site collection in our farm in the Data Source settings and then format the DVWP to show content from lists and libraries on the other site.  Although the concept is the same, WSS v3 (& MOSS) no longer works quite the same way!

 After adding the datasource for the source site collection, SharePoint Designer shows 5 types of data that you can pull in:

  • Database Connections
  • XML Files
  • Server-side Scripts
  • XML Web Services
  • Linked Sources

You no longer see SharePoint Lists or SharePoint Libraries.  You only get to use those datatypes if the source list is within the same site collection as the page you are adding the DVWP to.  It took quite a while fighting with SharePoint designer trying to get these lists to show up before I found the answer that it is no longer possible from the Microsoft Office Online site: Add another SharePoint site to the Data Source Library.

 ARGH!  Why remove this functionality?!  It breaks all DVWP's that were created in WSSv2 using it!

The work-around?  Use the SharePoint Web Services, or the RSS webpart….  Any others?

As a reminder, the Lists web service can be found here:  http://{site}/_vti_bin/Lists.asmx

<Monty />

 

SharePoint File Restore Utility

Posted by gruz
No Comments »

I've seen many questions lately about how to restore an accidentally deleted file from a SharePoint Document Library.  Although this becomes much less of an issue with the SharePoint 2007 Recycle Bin, it's not as easy to do with SharePoint 2003.

Since we do a database backup every night, the best way that I've found to restore a single file, or a small set of files is to use the SharePoint Database Explorer from James Edelen, which can be found here: http://mindsharpblogs.com/james/archive/2005/01/20/189.aspx

We take the nightly backup for the day that the restore has been requested from, and restore the database to any database server.  You can then crack open the restored database with the SharePoint Database Explorer and quickly navigate to the file(s) that need to be restored.  From there you can choose to save the original file back to a file system or even save the document versions out to the file system.  Once you have your files, you can just put them back into SharePoint where they should be.

The nice thing with this strategy is that we are using the same backups that we are creating every night as well as not having to bring the site back up into a working SharePoint environment.  The only limitation we see is not being able to restore list items.

However, remember to only use this utility against a backup of your database, never use it on a production database!

 Thanks James for such an excellent but simple tool!

<Monty />

kick it on SharePointKicks.com

SharePoint Database Log Size

Posted by gruz
No Comments »

I've been working in Virtual Machines testing different upgrade scenarios, and found that I started running out of space on my VM hard drives.  I think many of us have limited harddrive space as we test things in a VM environment, so I needed to find a way to continue testing with the limited space I had to allocate.

A quick check led me to the database log files that had grown so large that some were larger than the databases themselves.  In this testing environment I don't have database maintenance plans to truncate the logs for me, so they just kept growing out of control.  Here's an easy 3 step process that I followed to fix my storage space problem…

1. Truncate the log files:

In SQL Server Management Studio, I created a new query window and executed the following statement against each database:

Backup LOG {Database Name} WITH Truncate_Only

This effectively trucates the log, but does not return the empty space to the operating system yet — We'll get to that in step 3.

2. Set the database recovery model to Simple

In SQL Server Management Studio, right click on the database you are working with, and select properties.  In the Database Properties window, select the Options Page and check the setting for Recovery Model.  Mine was set to Full, which I really didn't need for testing purposes.  Set the Recovery Model to Simple.  This will only allow the log file to grow large enough to capture a single transaction, and then truncate it again.  Note that this is likely not the setting you want in production as you may need the full log files for backup/restore purposes.

3. Shrink the database

In SQL Server Management Studio, right click the database you are working with and select, Tasks, Shrink, then Database.  Then click OK.  This process may take some time, and you may initally see the log file grow a bit before it shrinks it down to almost nothing.

By following these simple steps, I've freed up about half of my hardrive space, and have made my VMs much more usable.

kick it on SharePointKicks.com

WSSv3 Search, Small Business Server & DNS

Posted by gruz
No Comments »

I recently ran into a problem dealing with searching on a server running Small Business Server 2003. It appeared that Search would work for a short time, and then would simply not return any results. Upon further investigation, we found a warning message in the Application Event Log.  The warning was as follows:

 

Source: Windows SharePoint Services 3 Search
Category: Gatherer
Event ID: 2436

Description:
The start address <sts3://[site url]/contentdbid={[GUID]}> cannot be crawled.

Context: Application 'Search index file on the search server', Catalog 'Search'

Details:
             The object was not found.  (0×80041201)

 

At first we were unable to decipher the message correctly, and thought there must be a problem with WSS search finding the index files, or that the index files were created incorrectly. We stopped the Windows SharePoint Services Search service in the Services on Server section under Operations in Central Admin. By stopping the service, you effectively stop the Windows service as well as delete any existing index files.  After stopping the service, we turned right around again and started the service again.  This lets you specify new settings for the search accounts, database and crawl frequency.  Once the service started again we ran into a new error when we tried to perform a search.  The error stated that "Your search cannot be completed because this site is not assigned to an indexer. Contact your administrator for more information."

 

 So..  We had to figure out how to hook the site back up to the search server, which was not as apparent as one would hope.  Rather than a setting for a web application, it is a setting for a content database, as the search will really be running directly against the content database(s) for the site.  in order to find the setting to assign an indexer to the site, you need to click on the Content Databases link from the Application Management section of central admin.

 

From here you can select the content database for the site you are working with and then reconnect it to the search server.

select search server

Your search service will then crawl your site again according to the search frequency you set in the service properties.  However, if you want to force a crawl, you can use STSADM.exe with the following command:

stsadm.exe -o spsearch -action fullcrawlstart

After all this reconfiguring we discovered that our search continued to not return any results.  We finally discovered that the testing we were doing for the site was from a remote computer, and we were running central admin from the server.  We had never tested accessing the site directly from the server.  Once we tried that we figured out that we were unable to resolve the site's url directly from the server.  The site had been added to the server DNS structure, but the server still wasn't able to resolve the address.  Finally we discovered that our server was using the service providers DNS server as the primary server, and itself as the secondary DNS server.  Once we switched these around, we were able to browse the site directly from the server, and the search was then able to correctly crawl and search the contents of the site.  In hind-sight, if we go back to the original warning message – the object that could not be found was not the index — it was the site itself!

This problem was very unique to the setup of Small Business Server and DNS, but a good lesson that for search (and other webparts) the server has to be able to see itself.  We also learned a lot about configuring WSSv3 search, and how to find the hidden connection between Search Servers and Content Databases.  Hopefully this will help if you run across any of the errors we ran into along the way.

 

kick it on SharePointKicks.com

Audience Compilation Recursion Error

Posted by gruz
No Comments »

I just found out today that audience compiling can be quite fragile. We ran into a situation where the audience compiling job in SharePoint Portal Server crashed, and many of our web parts and listings that were targeted to audiences failed to appear.  When we restarted the audience compiling job, it appeared to hang on 1 specific audience.  After a bit of troubleshooting we found the problem:

Audience rule:
User is a member of GroupA

GroupA Active Directory Membership:
GroupB
GroupC

GroupB Active Directory Membership:
GroupA

GroupC Active Directory Membership:
GroupA

This should not be a common occurrence in Active Directory, but due to shifting permissions or a simple mistake, it is easy to create this recursion.  Most times this will not cause any problems for the users, but in the case of the SharePoint audience compilation engine, it hangs in the endless loop as it tries to enumerate the members of each group.

kick it on SharePointKicks.com

Microsoft and EMC Documentum agreement dependant on Vorsite

Posted by gruz
No Comments »

Those corporations that have been using both EMC (Documentum) products as well as Microsoft SharePoint have most likely found it a bit difficult to link the two systems together.  Along your travels you've probably run across Vorsite.  This company has become the leader in integrating these two platforms by creating web parts, protocol handlers, event handlers, etc for SharePoint that tie directly into Documentum.

About a week ago Microsoft produced a press release stating their agreement with EMC to have the 2 systems work together to enhance the content management features of both systems by making sure that they will compliment each other.  My initial thought was to wonder what would happen with my Vorsite integrations that we've setup on SharePoint 2003?

Today I receieved the following email from Vorsite.  Apparently EMC will be licensing the Content Connector technologies that they have created for Microsoft SharePoint 2007.  This is great news to anyone like me who has been working with the Vorsite products, as they will be the same products that are used moving forward into SharePoint 2007.

 ——————-

Seattle, WA – September, 2006 - Vorsite Corporation, the leading expert in connecting content management systems with Microsoftr SharePointr Products and Technologies, is pleased to announce that it has reached a landmark agreement with EMC|Documentum. Under the terms of the agreement, Documentum will be licensing the proprietary Content Connector Technologies for Microsoft SharePoint 2007 developed by Vorsite Corporation for distribution with the EMC product line.

Rano Joshi, Vice President Products and Services noted that, "For organizations facing the challenge of implementing content compliance strategies while maintaining an open collaboration environment, this agreement takes on even greater importance. When looking forward to the release of SharePoint 2007 and the Microsoft Office Server System, organizations are questioning how their conversion to the 2007 version of SharePoint will impact their existing back-end system. With Vorsite, the answer is simple - it won't."

Aaron Nettles, Vorsite CEO added that, "We have worked in close concert with Microsoft over the past 12 months to make sure that we are in line with the new version of SharePoint. In that time, we have been able to fully validate our direction for the new release. If and when an EMC|Documentum client decides to either purchase or upgrade to the new SharePoint Server environment, their established EMC infrastructure will continue to integrate seamlessly with their new SharePoint end-user experience."

For more information on Vorsite's solutions for the integration of Microsoft SharePoint Technologies with EMC|Documentum please contact:

Vorsite Sales
sales@vorsite.com
+1-206-781-1797
—————

<Gruz />

kick it on SharePointKicks.com

Event Handler Settings

Posted by gruz
No Comments »

I recently created an event handler to process forms from a Form Library.  The Event handler is used to handle new items being added to the library, and save a portion of the form to a file share for another application to process.

In order to follow good programming habits, I figured I should put the fileshare location in a config file somewhere where we can update it in the future without having to crack open the code to modify a hard-coded path location.  I added an AppSettings section to the web.config file for the SharePoint website that I was working with, but found that my code would never pickup the settings.

I know the event handler assembly is added to the GAC, but figured it was running under the application domain for the SharePoint site and would use those settings..  I was wrong.  The problem now is where to put those settings…

I found that the machine.config file under in the C:WINDOWSMicrosoft.NETFrameworkv1.1.4322CONFIG folder has an AppSettings section that is commented out.  If you uncomment the section and add your setting there, they will be available when the event handler is called.

 

kick it on SharePointKicks.com

Quick and Easy SharePoint Surveys

Posted by gruz
No Comments »

Have you ever created a survey on a SharePoint Portal Area and found that your users are not able to fill it out? Basically this is due to how permissions are handled differently between SharePoint Portal and WSS. In WSS you can specify permissions for each list (or survey in this case) whereas in the portal you are only able to grant permissions to the entire portal area.  I've seen some people create an entirely separate area for their survey in order to manage permissions. I've seen others use the wss backdoor to specify different permissions for a survey in the portal, even though the portal interface doesn't support it. 

I believe even more users create a portal listing that directs the end user into the WSS site, which makes the end user then have to click the respond to survey button in order to fill out the survey.  Then many also hack the survey to add a submit button to the bottom so that the user doesn't have to scroll back up to the top to submit it.  Once the end user has submitted the survey, they are lost and are not easily able to navigate back up the the portal area they left.  Needless to say, this is more cumbersome than it really should be.

As a solution , I started to create a new webpart that would display the survey form elements at the portal, and allow that webpart to submit the results to the survey list.  However, my good friend Bil Simser pointed me in the direction of Infotech Canada and their EasyForms webpart, which is exactly what I was about to create. EasyForms allows you to create a survey or any other list and display the entry form anywhere, including the Portal.

To create a quick survey, start with the WSS survey itself.  In this example I've created a survey with just one question… "Do you like Easy Forms?"  with a choice of Yes or No.  I've also made the question require a response.  A word of warning — I've found that sometimes if I use EasyForms without setting at least 1 question/field as required, the form will occasionally appear to work, but the actual answers are not saved.

Once you have the survey created, you can add the EasyForms webpart to a webpart page and configure it.  The first section of the task pane allows you to setup the basic connection to the survey or list.  You can choose to use the existing site or type in the address for any other site.  Once you've selected the site, select the survey or list that you want to use.  This will populate the fields list boxes and allow you to choose to show all the fields / questions, or just a select few of them. Questions or fields requiring a response can not be removed from the display.

You can also choose whether the responses are added as the actual user, or if a specific user account should be used to save the results.  The users that you are allowing to save the form must have reader access to the site as well as add rights to the list or survey.

Once the connection to the list has been created, you can customize the look and feel of the EasyForms webpart itself.  The task pane has an in-line stylesheet editor which opens up a dialog box with the full stylesheet used for the webpart. You can edit this stylesheet to perform any CSS customization to the webpart that you see fit.

You are also able to define what happens when the user submits the form.  When the form is submitted successfully they can either be sent to another page through the Success URL or just be shown a Success Message.  You can also specify what the text of the submit button will be.

The last part of the customization allows you to show an introduction message that appears above the rest of the form as well as a hyperlink to the list or survey that the webpart is connected to.

Once this customization is complete the webpart will display the form with each question or field being displayed with the proper type of form input controls that are required for the list or survey that it is connected to.

If you don't direct the user to another page when the form is submitted successfully, they will see the Success Message defined in the task pane.

One thing I like to do is to only allow users to enter the survey once.  You are able to accomplish this by using the survey functionality and setting the survey options to not allow multiple responses.  If the user tries to submit the form twice, they will see a friendly error stating that they are not allows to respond again to the survey.

For the price of the web part, I find it a perfect solution for allowing input from general portal users into any list or survey hosted within a WSS worksite.  This helps keep the navigation simple for the general end user, as well as giving you more functionality at the portal level.  To add even more functionality I've also added a DataView web part to the same page.  This gives you the ability to give the end user immediate feedback as to the results of the survey or list.

kick it on SharePointKicks.com