September 2010
M T W T F S S
« Aug    
 12345
6789101112
13141516171819
20212223242526
27282930  

Archive for the 'Share Point' Category

23
Mar

User cannot be found

User cannot be found.   at Microsoft.SharePoint.SPUserCollection.GetByID(Int32 id)
   at Microsoft.SharePoint.Publishing.CommonUtilities.LookUpUser(SPWeb web, String userLookupValue)
   at Microsoft.SharePoint.Publishing.CommonUtilities.GetUserFieldValue(SPListItem item, Guid fieldId)
   at Microsoft.SharePoint.Publishing.PublishingPage.get_Contact()
   at Microsoft.SharePoint.Publishing.Internal.CodeBehind.PageSettingsPage.LoadValues()
   at Microsoft.SharePoint.Publishing.Internal.CodeBehind.BasePageSettingsPage.OnLoad(EventArgs e)
   at Microsoft.SharePoint.Publishing.Internal.CodeBehind.PageSettingsPage.OnLoad(EventArgs e)
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

An odd thing can happened in SharePoint. If you add a user named Joe Smith to a server, then add that user to SharePoint. Later you need to completely remove that user. So you delete the user from the server and you completely remove the user from sharepoint. (removed them from the user collection, not just the site)

One day comes and low and behold you need to add Joe Smith to the server again. You create a new user account for Joe on the server and add Joe to SharePoint. The only issue is that SharePoint doesnt resurrect the user from SharePoint. It creates a new one. And now when you are in a page that was originally created by the 1st Joe Smith you get the error above. Yippy.

If you run the SQL below you will find the two Joe Smith accounts.

SELECT * FROM UserInfo WHERE tp_Login = ‘MYSERVER\Joe.Smith’

You will get results like this

 

No User SQL

No User SQL

 The field tp_ID is the SharePoint UserID. The field sp_Deleted tells SharePoint if the user has been deleted. When you manually flag a user as deleted, all you have to do is to put the user’s ID in the tp_Deleted field. Notice that the user 19 has 19 in the tp_Deleted field.

So to resurrect the user 19 I need to kill user 16 since they both have the same username. The way I do that is simple

UPDATE UserInfo SET tp_Deleted = 16 WHERE tp_ID = ‘16′
UPDATE UserInfo SET tp_Deleted = 0 WHERE tp_ID = ‘19′
 

The SQL above will set user 16 to deleted by adding 16 to their tp_Deleted field. Changing user 19’s tp_Deleted field to 19 makes them active and all pages will work when you try and view page properties.

 

 

 

 

I hope this help anyone who runs into the same issue. I was a pain to try and diagnose why it wouldnt work and I think there is a fix for it coming from MS. But this server is on SP1 and it still does it.
NOTE: This sinerio will work if you just delete a user from SharePoint completely and need to edit their pages. Just put a "0" in the tp_deleted.
05
Nov

Adding style to Rad Editor for Moss

I recently had to use the Rad Editor for Moss to fix a problem with enabling Javascript in content pages of a publishing site. But once you do you quickly find out that Rad wraps their control in a iFrame and a new <html><body> tag. This as you know kills all the style from your parent site. If you want WYSIWYG you need to reenable your styles.

Quick fix - Go to the directory C:\Program Files\Common Files\Microsoft Shared\web server extensions\wpresources\RadEditorSharePoint\5.2.3.0__1f131a624888eeed\Resources and add a file called “CssEditor.css”. Add the style from your site that you need (body, a, line-height, color, etc..). When the Editor renders in design mode it will pick the file up and add it to the inner head tag.

Ta Da.

 Now what if you have multiple sites and want css files for each of them or even diffent style for different page layouts? Hmm no answer yet on that one.

Telerik Link

25
Jan

Andrew Connell talking around Florida.

This is a treat for anyone living in Florida and working on Share Point MOSS 2007. Andrew Connell is doing some speaking engagements around Florida in January and February 2008.

Tampa Office Geeks (Tampa, FL)

Building a High Performance Solutions on MOSS 2007

» January 29, 2007 @ 6p - 8p
Performance should be one of the top areas of focus on everyone’s mind when embarking on a Internet facing MOSS 2007 site. In this session we’ll look at the built-in caching capabilities added to the latest release of the SharePoint platform, including disk-based and page output caching. In addition we’ll take a look at various hot-button issues developers should be aware of when developing components for a public site built on MOSS 2007. Topics include object model techniques, how to properly manage memory to avoid the dreaded OutOfMemory exception, key sizing numbers to keep in mind when architecting your implementation and minimizing the page payload to speed up those page load times. After this session, you’ll be armed with the power to create high performance and scalable solutions in MOSS 2007.

Sarasota Developer User Group (Sarasota, FL)

 

Building & Incorporating Custom Applications on the SharePoint Platform

» February 19, 2008 @ 6p - 8p
When embarking on the development of a custom application developers face the same things over and over: you need a navigation solution, a security model, a search offering and an easy way to add update / functionality. More advanced applications want a plug in model, a way for site owners and even users to snap in new functionality without a major overhaul to the application. Other applications need to provide auditing capabilities, even alerting mechanisms as well as ways to create scheduled tasks. Before building all of this from scratch, check out WSS v3 as much of this is provided out of the box! Rapidly create new applications leveraging the existing functionality included OOTB in WSS v3. Better yet, don’t like how something works? This platform is incredibly extensible… come see how you can turn it on its head and how to build applications on top of the SharePoint platform.

25
Jan

Wow SharePoint Conference is popular this year, sold out main keynote

Wow here was are over a month away and MS has already sold out the main keynote room for SharePoint conference 2008. Seems like everyone is trying to get on board MOSS 2007 and get ahead as far as they can.

05
Jan

Match databases with applications on MOSS

One of the confusing parts of MOSS is the content DB naming schema. By default it wants you to use a cryptic naming of WSS_Conent_[Random GUID]. I needed to know what DB matched up with what application so I wrote this.

http://waitingimpatiently.com/wp-content/uploads/2008/01/contentdblist.zip

The output is to a file called ConentDB_List.txt in the folder where you run it. The format is below.

Display Name: Agile Portal
   WSS_Content_agiletemplatetest
Display Name: beard.mysite.com
   WSS_Content_beard
Display Name: Cal Test
   WSS_Content_caltest
Display Name: calsandbox.mysite.com
   WSS_Content_calsandbox
Display Name: cmstest
   WSS_Content_cmstest

And Yes you should always avoid the GUID name and name it yourself with a name that means something to you.

24
Nov

Making MOSS 2007 Anonymous

It is relatively easy to make a SharePoint site anonymous for outside users. The easiest way I have found is to just go into any library and use it to get to the parent permissions.

Go to any library and edit the settings.

Edit the permissions.

Manage the permissions of the parent, this will lead you all the way to the top.

Now edit anonymous access.

Anonymous access for the entire site.

Now that you have set anonymous access, a user can still try and get a logged in by dropping the page name off of the url. If you would like the site to be totally anonymous you will need to run this stsadm.exe command from the prompt on the MOSS server. stsadm is located in C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN.

stsadm -o activatefeature -filename ViewFormPagesLockDown\feature.xml -url http://YourUrl:Port -force

24
Nov

Site number limitation in SharePoint MOSS 2007

For some reason Microsoft decided to limit the number of sites in the navigation to 50. If you have a large SharePoint organization or have imported from MS-CMS that you will almost certainly break that. But after a lot of bang my head on the wall I call MS
support and got the answer.

In the web.config for the site you are working on, located in C:\Inetpub\wwwroot\wss\VirtualDirectories\(Your port number), find name=GlobalNavSiteMapProfider. From there change the next 8 lines. Add DynamicChildLimit=”75″ to the end of the each one. You can change it it any number you like but 75 was good for me. Setting it to ‘0′ makes it unlimited. Sorry this is not web friendly.

<add name=”GlobalNavSiteMapProvider” description=”CMS provider for Global navigation” type=”Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider, Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” NavigationType=”Global” EncodeOutput=”true” DynamicChildLimit=”75″/>
<add name=”CombinedNavSiteMapProvider” description=”CMS provider for Combined navigation” type=”Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider, Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” NavigationType=”Combined” EncodeOutput=”true” DynamicChildLimit=”75″ />
<add name=”CurrentNavSiteMapProvider” description=”CMS provider for Current navigation” type=”Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider, Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” NavigationType=”Current” EncodeOutput=”true” DynamicChildLimit=”75″ />
<add name=”CurrentNavSiteMapProviderNoEncode” description=”CMS provider for Current navigation, no encoding of output” type=”Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider, Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” NavigationType=”Current” EncodeOutput=”false” DynamicChildLimit=”75″ />
<add name=”SiteDirectoryCategoryProvider” description=”Site Directory category provider” type=”Microsoft.SharePoint.Portal.WebControls.SiteDirectoryCategoryProvider, Microsoft.SharePoint.Portal, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” DynamicChildLimit=”75″ />
<add name=”MySiteMapProvider” description=”MySite provider that returns areas and based on the current user context” type=”Microsoft.SharePoint.Portal.MySiteMapProvider, Microsoft.SharePoint.Portal, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” DynamicChildLimit=”75″ />
<add name=”MySiteLeftNavProvider” description=”MySite Left Nav provider that returns areas and based on the current user context” type=”Microsoft.SharePoint.Portal.MySiteLeftNavProvider, Microsoft.SharePoint.Portal, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” DynamicChildLimit=”75″ />
<add name=”UsagePagesSiteMapProvider” description=”Provider for navigation in Portal Usage pages” type=”Microsoft.SharePoint.Portal.Analytics.UsagePagesSiteMapProvider, Microsoft.SharePoint.Portal, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” DynamicChildLimit=”75″ />