SharePoint Issues post service pack /Cumulative updates or if you add or remove a member to the SharePoint Farm


SharePoint Issues post service pack /Cumulative updates or if you add or remove a member to the SharePoint Farm

I have had those in the SharePoint 2007 years but didn’t expect that with SharePoint 2010 the DEC 2011 cumulative update.

But here is a way to fix it

(run from the command prompt at the 14\bin\ as an administrator) or better, run the SP management PowerShell console as administrator and run the following command)

Note: the command is harmless but the farm might not be accessible during execution.

It performs a forced upgrade and that should clear all errors on Central Administration or any others encountered during the configuration wizard upgrade.

psconfig -cmd upgrade -inplace b2b -force -cmd applicationcontent -install -cmd installfeatures



This phase may take a while (depending on how large it your databases)



Make sure you are able to get to Central administration after this task completes

This has been a life saver in many cases

Best of luck

Advertisements

SharePoint Search for Boolean property values Issues


Very interesting , issue that I came across a few times and wasted some more time each time ( I guess I am getting old)

The Problem :

SharePoint search ( advanced webpart ) does not recognize the syntax for the boolean values

While the search refinement panel does work fine and ale to filter the result set on the boolean value just fine.

but it looks like that problem here is somthing like this.

On you Search

<PropertyDef Name=”CarIsBlue” DataType=”boolean” DisplayName=”Blue Cars only”/>

If you Select

[“Blue Cars Only”      is true ]

you don’t get any .

but the reverse of that works just fine

[“Blue Cars Only”      is false ]

You can detect that by checking the search syntax on the http request (url ) at the result page.

http://MyServer.Domain/SearchPage.aspx?k=CarIsBlue

No Results

and If you select the false option

http://MyServer.Domain/SearchPage.aspx?k=-CarIsBlue

All Results

It is not a problem if documented (I guess) , so here is the Microsoft official documentation

http://msdn.microsoft.com/en-us/library/ms541692.aspx

A Discussion here

http://social.technet.microsoft.com/Forums/en-ZA/sharepoint2010customization/thread/7404d94a-14ab-4383-b133-fcd879768e7c

Temporary solution that works fine

this so called literal can be cast

so

You can define the search property query as a string while it is acutally a boolean.

so ,

In your property definition you can change that to

<PropertyDef Name=”CarIsBlue” DataType=”text” DisplayName=”Blue Cars only”/>

and Ask the users to type is the value (True , true , TRUE , Yes or yes)

that should work fine.

I hope the 2010 (or 201x version)  search engine folks can find a solution

Thanks

MISSING SEARCH 2010 WEBPARTS


Missing Search 2010 webparts

Problem :

After migrating a SharePoint farm from MOSS 2007 to SharePoint 2010 the search webpart gallery is missing the new webparts (mainly the search refinements and people refinement , that what i was looking for .


The missing webparts are :

  • Refinement.webpart
  • PeopleRefinement.webpart
  • QuerySuggestions.webpart


The Solution :

The at the site collection level (Site collection administration) you will need to activate a feature


The feature name is :
Search Server Web Parts

Note : while you might see that feature already activated , (post migration ), you will need to deactivate and reactivate to add the new webparts to the new gallery

Also note :

You can read through this msdn article on how to copy the webparts across multiple site collections.

http://msdn.microsoft.com/en-us/library/ff512796.aspx

Best of luck

Design and Develop SharePoint 2007 64 Bit Workflow


As we all know , there has been a problem with the Microsoft templates that ship with VS 2008 and VSSe.

But I found this great article By Sahil Malik ,  that has a fix.

http://blah.winsmarts.com/2008-7-Authoring_SharePoint_2007_Workflows_using_VS2008.aspx

Simply edit your project to add the two workflow types 

open the .csproj with  Notepad

 At the Project\PropertyGroup element, append , see the sample file.

<ProjectTypeGuids>{14822709-B5A1-4724-98CA-57A101D1B079};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>

 – At the Project element, right below <Import Project = “$MSBuild .. “, add the following element

<Import Project=”$(MSBuildExtensionsPath)\Microsoft\Windows Workflow Foundation\v3.5\Workflow.Targets” />

That worked for me.


Fun MS Windows Fact (not that funny)


Since the 90s DOS  Days I knew about this .

You cannot create a file or folder that is

  1. CON or CON0 – CON9
  2. PRN or PRN0 – PRN9
  3. AUX or AUX0 -AUX9  
  4. NUL  or NUL0 – NUL9
  5. COM or COM0 – COM9
  6. LPT or LPT0 – LPT 9

With this funny error message

[The specified device  name is invalid ]

but 20 years later Microsoft has not given up those reserved words.

The problem , if you are moving files or folders from other non-windows systems to a windows system you can get some copy failures etc

Here is the official ms posting.http://support.microsoft.com/kb/279868

Windows 2008 – 64 Bit Server fails to start all services post Updates


This is a very strange thing that used to happen in the windows 2003 – server world , but never expect it to happen on the windows 2008 world (Longhorne code or above)

Symptoms :

All ( most automatically set ) windows serivces fails to start after you go through a certain windows update. or a failed update ( ie. power failure during install etc. )
The Problem :

The update process fails to set some Registry settings in a clean way.

Solution :

  1. Set Cryptsvc as DependOnService on HTTP driver.
  2. HKLM\CurrentControlSet\Serivces\HTTP and create following value.
  3. Name: DependOnService Value: reg_multi_sz (this is a multi string)
  4. Click DependOnService Set CryptSvc on the value.
  5. Reboot the server

 

Thanks to Antitribu (At serverfault.com) for posting this one.

http://serverfault.com/questions/83806/windows-server-2008-services-wont-start-after-patch

Claims Based Authentication


Claims based authentication is not a new concept , but it was recently adopted by Microsoft and other major software giants as a standard.

The main purpose and use of the CBA , is authentication against cloud services and also to be used with Federated Identity services.

Some core concepts include

STS : Security Token Service .

RP : Relying Party

Identity

Claim

Issuing Authority

  1. Also read more on the WIF ( Windows Identy Foundation ) that is part of .NET 3.5 and 4.0
  2. Also read more on the Geneva Project ( later changed to ADFS 2.0 ) Active Directory Federation Services , if you plan to use your own AD as an account /Identity silo .

That would open up a whole world of

[1] How can I Use my Cloud application , yet use my local AD to do authetication.

[2] how can I extend my application to use open Identiy providers like ( Google ID , Live ID , Amazon ws , Yahoo ID etc. )

I was concerned about how to make this work with the new SharePoint 2010 directly , I noticed that out of the box , no Identiy Provider list to choose from (silly me).  from which I started finding out more about this whole project.

I came across this blog during my researh and I believe it is the most detailed.

It is by Steve Peschka, (great job  Steve)

http://blogs.technet.com/b/speschka/archive/2010/07/30/configuring-sharepoint-2010-and-adfs-v2-end-to-end.aspx

Hope that puts you on the right track.

Best of Luck

Using Multiple ASP SQL Role providers on multiple SharePoint Sites.


I found this problem as I was extending a SharePoint site to use FBA and the client wanted the users of Site 2 in a different database  than that of  Site 1.

Here are some concepts first

You have multiple FBA profile providers , Membership Provider , and Role Provider.

You need to have the following per site

Site1

  • Site1MembershipProvider
  • Site1RoleProvider
  • Site1ProfileProvider

Site2

  • Site1MembershipProvider
  • Site1RoleProvider
  • Site1ProfileProvider

Etc,…

All in one web.Config file / application

While that is obviously not doable without custom provider , yet , you will still have the challenge of dynamically switching the provider at runtime.

Here is the fix no coding needed.

ProfileCommon class only points to the properties under the  Default provider

Yet, you can trick it with the following.

<profile enabled=”true” defaultProvider=”SQLProfile”>

<!–  The “name” attribute of each property entry corresponds, that is the ProfileCommon properties–>

<properties>

<add name=”FirstName” />

<add name=”MiddleName” />

<add name=”LastName” />

<!– Required Sharepoint properties follow… –>

<add name=”PreferredName” defaultValue=”NA” />

<add name=”WorkEmail” defaultValue=”unknown@NA.com” />

<add name=”WorkPhone” type=”System.String” defaultValue=”NA” />

<!– Required for the Custom Profile Site1 –>

<add name=”Site1FirstName”  type=”string” provider =”FBASite1Profile”/>

<add name=”Site1MiddleName” type=”string” provider =”FBASite1Profile”/>

<add name=”Site1LastName”   type=”string” provider =”FBASite1Profile”/>

</properties>

<providers>

<add name=”SQLProfile” type=”System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a” connectionStringName=”AspNetSqlProvider” applicationName=”/” />

<add name=”FBASite1Profile” type=”System.Web.Profile.SqlProfileProvider” connectionStringName=”FBASite1ConnectionString” applicationName=”Site1Application” />

</providers>

<add name=”FBASite2Profile” type=”System.Web.Profile.SqlProfileProvider” connectionStringName=”FBASite2ConnectionString” applicationName=”Site2Application” />

</providers>

<add name=”FBASite3Profile” type=”System.Web.Profile.SqlProfileProvider” connectionStringName=”FBASite3ConnectionString” applicationName=”Site3Application” />

</providers>

</profile>

Accessing the profile through code

Creating a profile

MembershipUser  newUser = Membership.Providers[“Site1Membership”].CreateUser(UsernameTextbox.Text, PasswordTextbox.Text,EmailTextbox.Text, passwordQuestion,passwordAnswer, chkActive.Checked,(object)Guid.NewGuid(), out status);

ProfileCommon pc = (ProfileCommon)ProfileBase.Create(newUser.UserName);

pc.SetPropertyValue(“Site1FirstName”, FirstName.Text);

pc.SetPropertyValue(“Site1MiddleName”, MiddleName.Text);

pc.SetPropertyValue(“Site1LastName”, LastName.Text);

pc.Save();

Reading a profile

MembershipUser user = Membership.Providers[“Site1Membership”].GetUser(username,false);

ProfileCommon pc = (ProfileCommon)ProfileBase.Create(user.UserName);

FirstName.Text = pc.GetPropertyValue(“Site1FirstName”).ToString() ;

MiddleName.Text= pc.GetPropertyValue(“Site1MiddleName”).ToString();

LastName.Text = pc.GetPropertyValue(“Site1LastName”).ToString();

Good Luck .

Generating Unique IDs in Windows SharePoint Services 3.0


My Solution is here

Con s
The major problem with this technique is concurrency .
2 or more users with fast machines and network connections ( or many queued docuemnts) can cause this to deadlock.

Pro s
Easy to do , easy to deply and staple the feature to the site if you want and makes your life easy , as it is an event handler for on the onCreate or onNew.

Final Solution
I have been in this situation a few times, and here is the final working solution.

Why reinvent the wheel when SharePoint already has a Sequence generator that is Thread safe it is called (SharePoint List )

Simply on every Item you need a a new ID , create an Item in the new List , get the ID and give it to your Document List , announcent , or whatever Items you want Unique ID for.

Code is simple but not public.

Thanks and good luck


http://msdn.microsoft.com/en-us/library/cc303696(office.12).aspx#CommunityContent