Saturday, July 17, 2010

 

When using PerformancePoint Designer in SharePoint 2010 and trying to add a new item say a SQL Server connection you might get the error 'An Unexpected Error Occured. An error has been logged for the Administrator'

If you check the Event log on your client machine you should find a more detailed but equally cryptic error.

An unexpected error occurred. Error 15568.

Exception details:

Microsoft.SharePoint.SPEndpointAddressNotFoundException: There are no addresses available for this application.

at Microsoft.SharePoint.SPRoundRobinServiceLoadBalancer.BeginOperation()

at Microsoft.PerformancePoint.Scorecards.BIMonitoringServiceApplicationProxy.GetBalancerContext()

at Microsoft.PerformancePoint.Scorecards.BIMonitoringServiceApplicationProxy.ExecuteOnChannel(CodeBlock codeBlock)

 

First check in Central Administration check you have a PerformancePoint Services application created.

My problem was that although the services application was created the service instance itself was not running. Goto Central Admin - System Settings - Manage Services on Server and make sure the PerformancePoint service is started or start it youself.

Why you are not given the option in the Services App to do this automatically is a mystery to me.

 

 

 

Saturday, July 17, 2010 6:30:04 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  | 
 Tuesday, July 13, 2010

 

Currently when generating a class with SPMetal from a site that has spaces in it

SPMetal.exe  /web:"http://flxdev2010:19000/PWA/Test Plan" /namespace:ProjectSite /code:ProjectSite.cs

It will give

Error the web at 'http://flxdev2010:19000/PWA/Test Plan' could not be found

Oh dear, a schoolboy error.

Now you could use stsadm to dump out the site, delete and reimport, yikes. Or you can just rename the Url as ServerRelativeUrl is read/write (any outside links point to the Url will not be fixed up!)

Using a quick console app


            using (SPSite site = new SPSite("http://flxdev2010:19000/PWA/Test Plan"))

            using( SPWeb web = site.OpenWeb())

            {
               string s = web.ServerRelativeUrl;
               web.ServerRelativeUrl = "/PWA/TestPlan";
               web.Update();

            }

or that new fangled 4 year old PowerShell thingy

Start-SPAssignment -Global

$web.Title = "/PWA/TestPlan"
$web.Update()
Stop-SPAssignment -Global

SPMetal.exe  /web:"http://flxdev2010:19000/PWA/TestPlan" /namespace:ProjectSite /code:ProjectSite.cs

now works.

you can change it back once you have the definition.

 

Tuesday, July 13, 2010 9:28:32 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  | 
 Tuesday, June 16, 2009

You know how it is, you start developing a project and then 6 months later you look back and realise you have to document everything you've produced.

I've just gone through that process and need a quick list of all the features ids scattered around various subdirectories of a large project.

sample:

<Feature  Id="886f12cf-97ca-4789-baf8-6f13f9f2cedf"
          Title="PGPSO Contract Management Project Upgrade"
          Description="Feature that upgrades Project Sites for Contract Management."
          Version="12.0.0.0"
          Hidden="FALSE"
          Scope="Web"
          DefaultResourceFile="core"
          ReceiverAssembly="PGPSO_CM_Project_Upgrade, Version=1.0.0.0, Culture=neutral, PublicKeyToken=aa0408b86137366a"
          ReceiverClass="PGPSO_CM_Project_Upgrade.PGPSO_CM_Project_Upgrade"
          xmlns="http://schemas.microsoft.com/sharepoint/">

Firing up Powershell navigating to the root of the solution folders and running this command gets me the list

gci -recurse -filter  feature.xml | % { $contents=get-content $_.fullname; $x=[XML]$contents; "{0} {1}" -f $x.Feature.Id, $x.feature.title }

result:

 

gci is an alias for get-childitem which allow you to recurse subfolders and provide a filter parameter. Then use get-content to open the file, convert to an XML object and then directly reference the Id and title of the feature.xml file.

 

 

Tuesday, June 16, 2009 2:10:27 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [2]  | 
 Thursday, November 20, 2008


One of my coworkers on a current project has posted a useful entry about fixing a problem you will have when deploying Excel files into Excel Services across multiple farms that use connections in external ODC files. The fix is to use crack open the excel file using OpenXml and change the URL to the ODC link. Nice one Oriol. Details here





Thursday, November 20, 2008 10:07:24 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  | 
 Monday, June 23, 2008

 

image

Recently I went through the process of indexing a subversion source code repository with SharePoint. I thought I'd share those steps as OOTB SharePoint won't index ps1, cs or vb files.

Setting up search to index these files works either if the files themselves live in a document library or are external to SharePoint. The process to index files from other source control systems will vary depending on how you can get access to the source files. If you need to index SourceSafe you can set up what's called a mirror directory that automatically save the files from your repositories on disk and I suspect you can index Team Foundation Server via its Web Access URL's although I've not tried that.

The subversion side of things is pretty easy, pick the repository you want and export the latest version using the svn client i.e. svn export svn://devhosting/svn/webparts d:\SVNExport\webparts. Script the export of each repository and then schedule it.

On the SharePoint side you set up a new content source to crawl the directories.

In this case the Indexing is on a separate machine so we enter the UNC path. Make sure the content access account has read rights to the share. If needed you can setup separate credentials for this source.

In the SSP on the Search Setting page, click New Content Source under Content source and crawl schedules

image

image

The problem now is if you start a full crawl typically only the .txt files are indexed as the SharePoint indexers have no idea what to do with file extensions it doesn't recognise.

There are a couple of steps to getting new file extensions indexed. This assumes you are a Search Service administrator.

First add the extension to File Types

1. On the Search Administration page, click File Types under Crawling.

image

2. On the Manage File Types page, click New File Type.

image

3. On the Add File Type page, type the file name extension in the File extension box for the file type that you want to add.
To search for PowerShell files, type ps1
Do not include the period (.) character in front of the file name extension.

4.Click OK.

image

5. Rinse and repeat for each file type that you want to add.

The second step in getting the file extensions recognised is to add it to the registry entries the SharePoint Server Search service reads when it starts up. This key is located at

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\12.0\Search\Setup\ContentIndexCommon\Filters\Extension

Add a new key, enter the extension including the dot i.e. .ps1.

Save and set its default value to be {4A3DD7AB-0A6B-43B0-8A90-0D8B0CC36AAB}. This means use the text parser Ifilter tquery.dll for this extension.

image

And a new key for each file extension you want indexed in this case cs,ps1 and aspx but you can add vb vbs or whatever other text files you need indexed.

Stop and start the search service with these commands

net stop osearch

net start osearch

Now do a full crawl of your content type and your files should have been full text indexed. The crawl log is useful in seeing if the filtering barfed on your files.

 

Now you can go to the Search Center enter your keyword and get a list of code files back.

image

Here I've set up a custom scope, search page, and added a custom search tab so separate the code results on its own. I won't go into it here but there is a good post here that shows how you do this.

Even better with SharePoint Search if you know you want PowerShell files only you can enter the fileextension keyword and search will filter out everything but PowerShell files.

image

 

Searching your entire code repository with subsecond query times is now pretty easy.

Monday, June 23, 2008 10:56:49 AM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  | 
 Saturday, April 05, 2008

PowerShell Quickie - What version of SharePoint 2007 am I running?

 

(get-item "hklm:software\microsoft\shared tools\web server extensions\12.0").getvalue("version")
12.0.0.6219 

Also handy

What version of the Operating system am I running on?

(Get-WmiObject Win32_OperatingSystem).Caption 

Microsoft(R) Windows(R) Server 2003, Standard Edition 

(Get-WmiObject Win32_OperatingSystem).Version 

5.2.3790
Saturday, April 05, 2008 9:14:18 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [1]  | 
 Wednesday, April 02, 2008

The UK Microsoft User Groups have organised another huge gathering at Microsoft Reading next week.

This time it's split over 2 days April 8th and 9th and features a lot of great sessions. User groups that I'm active in such as the UK SharePoint user group, PowerShell user group and the Vista squad will be there along with the user groups for Exchange, SQL Server and others.

It's not often you get a host of experts on these subjects in one location so check out the agenda and see if any sessions take your fancy.

I'm doing a session on day 2 crossing over two groups SharePoint and PowerShell on moving data in SharePoint using the Content Deployment API (aka Prime API) and PowerShell. I'll go through some of the functions and cmdlets I've written to make moving data easier, samples include moving list items, lists, webs and site collections within and between farms.

Wednesday, April 02, 2008 1:28:02 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  |