Unknown's avatar

Posts by Simon Doy

I am an avid SharePoint enthusiast who works as an Independent SharePoint Consultant based in Leeds, United Kingdom. I am one of the organisers of the Yorkshire SharePoint User Group in the United Kingdom. I have been designing and building SharePoint solutions since 2006.

>Upgrading SharePoint to SP1


>I have a number of development environments for different clients. Anyway I started some work for myself on one of the old machines and thought I better get this up to date and install WSS SP1 and MOSS SP1.

Simple .. Yeah!? I should have checked things out on the machine before I started. I have performed the upgrade on a number of machines with no problems. However there this time I did the normal install WSS v3 SP1 and then run the SharePoint Config Wizard… the wizard ran and then throw an error. I clicked on the link and it showed an error trying to start the Office Search.

I check the Office Search and yes it was unable to login. I went into services and updated the account name and password. Re ran the wizard and it failed again, this time resetting the account back the previous account. SharePoint holds this setting and reapplies the account details so using stsadm -o osearch -action start I applied the new farmaccount and password. This fixed the Office Search service which started successfully.

Reran the wizard to perform the upgrade and it failed again.
Looking at the psconfig logs showed that there was now a problem with the SharePoint WSS Search. I used stsadm -o spsearch -action stop to clean things up and then ran stsadm -o spsearch -action start using the new account and password credentials. It complained about the database not being empty. So after deleting the database, the command was run again.

Each time this was run an error happened saying that the search could not be started due to invalid login. I thought well I will try the upgrade and see what happens. Again the upgrade failed.

Looking on the web I found a link to http://geekswithblogs.net/hinshelm/archive/2007/12/13/installing-windows-sharepoint-services-3.0-service-pack-1-sp1.aspx

Where people were having similar issues this lead me to the idea of running the upgrade process using psconfig.

So going on to the command prompt I ran psconfig -cmd upgrade -inplace b2b this failed and required that the force flag is set because the upgrade has failed.

Run psconfig -cmd upgrade -inplace b2b -force, still the upgrade failed though looking into the upgrade.log file which lives in the HIVE12\logs. In the logs the same error about the SPSearch showed which said that the login was invalid. I started to think that this might be down to the fact that SP1 has been applied but the search process is unable to login due to issues with fact that the binaries are expecting an upgraded database but this hasnt occured yet.

From this thought I decided to stop the SPSearch and then do the upgrade:-
– doing an stsadm -o spsearch -action stop this when run asks if you want to delete all the indexes, say yes.

Then re-ran the psconfig -cmd upgrade -inplace b2b -force command.
After a while the command completed successfully! Hurrah.

Now to sort out the SPSearch function, this was solved by running stsadm -o spsearch -action start -farmserviceaccount [account] -farmservicepassword [password]

The SPSearch started successfully!

Anyway I hope that will help someone.

>SharePoint Search IE Search Provider


>Today I’ve been playing around with IE Search Providers. The search provider functionality has been enhanced since IE7’s release.

The search box lives in the top right hand corner and Microsoft have provided a means for websites to create custom search providers. All the major search engines have them now, just take a look here http://www.microsoft.com/windows/ie/searchguide/en-uk/default.mspx?dcsref=http://runonce.msn.com/runonce2.aspx.

With this link you can create your own.

So that got me thinking and after a quick search other people have already done, as these things go when I follow peoples instructions it never works quite right. So here I will document what I did and the problems that I overcame.

So first of all how do you setup the search provider, the search provider functionality is created from an xml file which follows the OpenSearch schema. This xml file is used by a javascript function AddSearchProvider, which is part of the IE object model. The xml file describes the search provider and as you can see below has additional meta data to allow you to describe the search provider.

An example of the xml file is as follows:-

<?xml version="1.0" encoding="UTF-8" ?>
<opensearchdescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<shortname>iThink Search>/shortname>
<description>iThink Search provider</description>
<inputencoding>UTF-8</inputencoding>
<url type="text/html" template="http://sharepoint/SearchCenter/Pages/Results.aspx?k={searchTerms}&s=All%20Sites" />
</opensearchdescription>

In order to install the search provider we need to provide a piece of functionality to allow users to install the provider automatically.
This functionality is provided using a content editor web part.

So add a content editor web part to a page, create and upload an xml file based on the file above. A few notable points are regarding the URL tag, make sure that sharepoint is changed to your SharePoint’s server name, dns entry. The & should be an & as opposed to &. If it isnt then you will get an error when a user tries to add the search provider through javascript.

Also the xml file should be saved as ANSI, you can do this in the save as options for notepad. If not you will get a search provider couldnt be added error.

So what I did was upload the xml file into the top-level sites “Document” document library.

Going back to the content editor web part that was added earlier, edit the page and from the web part menu do edit->modify shared web part settings, click on the source editor button and copy and paste the following:-


<a href="#" onclick="window.external.AddSearchProvider('/Documents/searchprovider.xml')">Add SharePoint search to IE.</a>

Make sure you update the AddSearchProvider function call so that searchprovider.xml is the right name and maybe update the link text.

Click Apply down the bottom of the web part properties and then test out the link. If you get an error load the xml again and make sure that the double quotes etc are correct.

Hopefully now it should have added the search provider into IE. Test out the search function and make sure that it works…

Done! You now have the ability to search your SharePoint sites + any other content you are indexing from IE and it doesnt matter if you are logged into the site or not!

Superb!

Good luck….