Archive

Archive for the ‘SharePoint 2010’ Category

Project Demo Image–Excel Services problem after SP1 upgrade

July 16, 2011 10 comments

Excel Services ErrorAnother Update: Thanks to SeaMonkey76 in the MSDN forums pointing out that this issue is fixed in the October 2011 SharePoint CU (http://support.microsoft.com/kb/2596582), so get patching :)

Update: A couple of readers have pointed out that this behaviour is is the norm where there isn’t a root site and it’s best practice to implement one. I totally agree and have run into situations where things like InfoPath have ceased to work due to this. The purpose of this post is more for those people that run into this error in the demo image, after an upgrade and can’t figure out why. It took me a little while to track it down, so I just through I would share.

I am posting this in case anyone else runs into a similar problem in Excel Services and to give some search engine index bait.

Following upgrading my IW demo image to SP1 + June CU, I noticed that Excel Services components in the Business Intelligence centre were no longer rendering and consistently showing the loading graphic.

Excel Services - Loading Graphic

On closer inspection, the browser was showing the following error:

Message: Syntax error
Line: 1
Char: 1
Code: 0
URI: http://project.contoso.com/_layouts/EwaStringsHandler.ashx/en-US?rev=V5cXKzVnvQRpcOxdnGD5cQ%3D%3D&flh=4sHCQGJUaMtQCBbbV6EmZw==

Checking the ULS logs showed these error messages:

An internal error occurred.    at Microsoft.Office.Excel.Server.MossHost.MossHost.Microsoft.Office.Excel.Server.Host. IEwaHost.IsSecureConnection()     at Microsoft.Office.Excel.WebUI.EwaCUIDataSource.EnsureDocument()     at Microsoft.Web.CommandUI.CUIDataSource.RunQuery(UIQuery query)     at Microsoft.Office.Excel.WebUI.EwaRibbon.QueryRibbonDataSource(CultureInfo uiCulture, String clientID, Boolean denormalizeImareUri)     at Microsoft.Office.Excel.WebUI.EwaStringsHandler.ProcessRequest(HttpContext context)

and

Watson bucket parameters: SharePoint Server 2010, ULSException14, 5f9be61a “excel services application”, 0e00178d “14.0.6029.0″, f5b5c9d6 “microsoft.office.excel.server.mosshost”, 0e001785 “14.0.6021.0″, 4d65e5e7 “wed feb 23 21:00:23 2011″, 000002d3 “000002d3″, MISSING, 4a6d3421 “nullreferenceexception”, 66326e39 “f2n9″

It seems that Excel Services now needs a site collection to be present in the root of the a web application or it will throw the above error. I am not sure when this behaviour changed, but given the IW Demo Image and Project Demo and Evaluation pack does not install a site at http://project.contoso.com it is necessary to create a blank site collection via Central Admin manually.

Once this is done, the Business Intelligence Centre should start to render the Excel Services components once again.

File not found error when viewing risks or issues

July 1, 2011 1 comment

Every now and again whilst using the Project Server Demo and Evaluation pack, I run into an ‘File Not Found ‘ error when clicking on a risk or issue in a project workspace.

Risk / Issues - File Not Found

On investigation in the ULS logs, the actual error is:

ULS Error - FileNotFoundException

The important part of the error message that gives away what the problem is is the ‘http://moss.contoso.com/pwa’, which is not the site we are using, but it is the site the workspace is looking at to get the risk or issue form.

Fixing the problem is relatively easy thanks to Project Server’s Bulk Update Project Sites. This capability replaces the WSSSiteRelinker tool that was one of the key tools of a Project Server consultant with the 2007 release. When project workspaces are restored from a different machine it is necessary to repoint them at the new PWA instance under the covers.

To run the Bulk Update Project Sites tool, navigate to Server Settings > Bulk Update Project Sites.  Once in the screen select Previous Site Path (this should be populated with all the relevant options), in our case http://moss.contoso.com and http://project.contoso.com. Enter the site URL, in our case PWA (not there is no proceeding /, this is added automatically. Then in the new site path, choose the relevant web application, in our case http://project.contoso.com and the site path, PWA.

Update Bulk Project Sites

The really important option is the Update Content Types section that says:

When migrating content to a farm that did not contain Project Server, the content types of Project Issues, Risks, and Documents may be altered such that item links are broken. If you notice that item links are broken after migration, you should update content types.

This is what is causing our error, so it’s important it is checked. Once this is all done, click on Update and let Project Server do its magic. Once it’s completed, I did an iisreset, I am not sure it’s strictly necessary, but I did it anyway.

Finally, all that is required is to test the risk or issue list again…

Risk / Issue - All Fixed

and voila, it’s working again. Of course, as this is your demo image, make sure you backup or snapshot the VM image so you don’t need to fix this again in the future. Now of course this error can also occur in non demo images if you have done a upgrade / migration, in which case all of the above steps still stand.

Common errors when a PWA site is deleted ‘incorrectly’

May 31, 2011 16 comments

Disclaimer: This post isn’t going to be up to the level of one of Brian Smith’s technical posts and is based on my own experiences and testing. You’re mileage my vary and I encourage you to vigorously test anything detailed in this post before attempting yourself, I accept no liability should you run into issues etc etc.

Recently there have been a number of posts in the project forums from users that have been running into issues when they have deleted a PWA instance incorrectly. Now what do I mean by incorrectly? Well, by deleting the PWA instance any way other than via the Project Server Service Application > Delete Instance.

So to start, what are the errors you can run into?

The Project Web App Path Site is invalid. Correct path and try again.

The most obvious error is not being able to create a new PWA instance with the name of an instance you had previously deleted incorrectly, even though the Project Server Service Application is showing that particular instance does not exist. From my experimenting this can occur if the PWA site collection is deleted from the ContentDB manually (in the example below, the PWA2 site collection).

The Project Web App Site Path is invalid. Correct path and try again

Note this error will also be seen if you are legitimately trying to create a PWA instance with a duplicate path.

Event 7626  – Cannot start queue

The second common error is a number of Event 7626 in the Event viewer indicating the queue’s (both Project and Timesheet) cannot be started. Again, this was seen when the /PWA2 site collection was manually deleted.

Event 7626 : Cannot start queue

The exact errors you may see (for the search engines) are:

Cannot start queue. SSP: <Guid> SiteUID: <Guid> Url: Queue: ProjectQ

Cannot start queue. SSP: <Guid> SiteUID: <Guid> Url: Queue: TimesheetQ

The database specified is already used by another project server. Enter a different server or database name and try again.

This error can occur if the user deletes the ContentDB hosting the PWA site collection and no other PWA instances exist using those Project databases. As you would imagine, you can also see this error if a legitimate PWA site is using those databases, so make sure you are certain.

The database specified is already used by another project server

So how to fix it?

The easiest fix is to restore the deleted site collection or contentdb from a backup, and then delete the site correctly via the Project Server Service Application.

If you don’t have backups then you are going to need to remove the left over configuration manually, using some PowerShell as outlined below.

1. Find the Project Server Service Application

The first command below will bring back all service applications where the TypeName contains the word Project and assigns them into an object called $serviceapp:

$serviceapp = get-spserviceapplication | ? {$_.TypeName –like “*Project*”}

Powershell - get-spserviceapplication

The second command takes the object and then formats the output as seen above. If you don’t see anything returned, then there are either no Project Server Service Application configured, or you may have typed the command wrong.

2. View the Site Collection Properties

Now that the $serviceapp object contains the service application instance, the next thing we want to do is see the site collections associated with it.  To do this, type the following:

$pwainstances = $serviceapp.Sitecollection

$pwainstances

This will find the various site collections associated with the instance:

Powershell - Instances in site collection

In this case, there are two instances associated with the Project Server Service Application, the good /PWA one and the incorrectly deleted /PWA2 one.  Notice even though the underlying site collection has been deleted, SharePoint still thinks its there in the configuration.

3. Remove the configuration for the incorrectly deleted instance

To remove the configuration of the /PWA2 site, enter the following:

$toberemoved = $pwainstances | ? {$_.Id –eq “<Id of the instance to delete>”}

$toberemoved

Powershell - Select individual instance

The second $toberemoved shows that the object contains the PWA2 instance that is to be removed. To perform the actual removal, enter:

$toberemoved.Delete()

Finally, perform a check to make sure the instance was deleted as follows:

Powershell - Delete site collection

If all went well, the object $toberemoved should be empty meaning the configuration within SharePoint has been removed and you should be free to go and create your PWA site again without error.

Showing the Risk or Issue Id’s in the workspace edit and display forms

May 9, 2011 1 comment

It’s always puzzled me why Microsoft never did show the ID of a SharePoint based list entry in the edit or display form. What do I mean by that? Well, out of the box, when you create a list in SharePoint, each item has an ID associated. This ID is then used to identify the individual records in the list.  Once you have created an item in the list you can see the ID in the view

Issue ID on the view

But not in the edit or display views of the list item.

Default display formDefault Edit Form

Now this is not unique to Project Server 2010, nor SharePoint 2010 for that matter. The same behaviour can be seen in SharePoint 2007 as well. So why am I telling you all this, well today one of my clients requested that the risks and issues lists on their Project Server instance be modified to show the actual id of the item, making it easier for them to reference and relate to the information they were viewing.

Well, it turns out doing this is pretty easy. Basically all that is needed is to add a content editor web part to the the Display and Edit forms and add a small piece of JavaScript to render the relevant ID. A quick search on the web revealed this article from PathToSharePoint.com that provides the code as well as steps to insert the Content Editor web part on a WSS 3.0 / SharePoint 2007 installation.  So I am going to concentrate on what is required to do so for SharePoint 2010.

First navigate to the list you wish to make the change to,  in my case I am using an issues list. In the ribbon choose List and then click on ‘Form Web Parts’.

List Ribbon

Click on the little down arrow and three options will be displayed.

Form Web Parts on Ribbon

We are interested in modifying the Default Display Form and Default Edit Form. There is no point in editing the Default New Form as the ID won’t be available yet to display.

Click on the Default Display Form, the screen will refresh to show the form in edit mode and display the web part zone.

Web Part Zone

Click on the ‘Add a Web Part’. The Web Part gallery will be displayed, select ‘Media and Content’ in the Categories and then the ‘Content Editor’. Click on Add to add it into the web part zone.

Add Content Editor Web Part

Click on the ‘Click here to add new content link’ inside the Content Editor Web Part.

Content Editor : Click here to add new content

Select the Edit HTML Source from the HTML menu.

Edit HTML Source

In the dialog, paste in the code from the PathToSharePoint site into the HTML Source and click on OK.

HTML Source with code

Choose to Stop Editing the Page and then navigate back to an issue and choose to view it, causing the newly updated display form to be used.

New Issue with Issue Id

You’ll notice a new item has appeared on the top line showing the Issue Id.  Now all that’s needed is to repeat the above for the Default Edit Form and your finished. Of course, this will only customise the list of the site you are in. If you want this to be carried through all of your sites, make sure you make the same changes to your Project template site.

Mobile Project Server Business Intelligence with Windows Phone 7

April 27, 2011 3 comments

Out of the box, Project Server 2010 is arguably the most business intelligence heavy application that Microsoft build on the SharePoint platform. It’s a bold statement, but when you think about it, a default installation of Project Server will implement a dedicated relational reporting database and provides the capability for numerous analysis services instances, each containing up to 14 OLAP cubes, all configurable from within the tool.

With the reliance on SharePoint 2010 Enterprise, a number of new and improved capabilities are made available, including PerformancePoint Services & Visio Services which provide new and improved ways of visualising project data to quickly expose trends and possible issues so they can be corrected. Unfortunately whilst the story is fantastic if you are using a PC, it’s a little less impressive if you are using a true mobile device such as a phone. Whilst people may have laptops, wireless and mobile broadband, starting up a laptop & connecting is way less convenient than quickly viewing your data on a mobile device, pretty much instantly.

So I started to wonder what the options were for mobile business intelligence, specifically how could I see the status of my project portfolio, risks, issues & financial information directly from my mobile phone? As my personal phone is an iPhone I started by checking out the various options, including Roambi & PushBI. Both looked pretty good on paper, but either required you to buy licences, were not real time or required you to install propriety software on your farm / servers.

Then thanks to a twitter from JJTotal, I was directed to an application called Blue-Granite Nitro. Nitro is a free Windows Phone 7 app that renders XML feeds of information and produces some very impressive visualisations of data using the WP7 metro interface for rendering.

Example Visualisations from Blue-Granite Nitro

In order to generate the XML feeds that Nitro uses, all that is required is a SQL Server Reporting Services instance running one report. So as Project Server requires SQL Server, this should be readily available. Being based on Reporting Services, developing the report is incredibly simple, either through Visual Studio, or my preferred report tool, Report Builder v3.0.  The reporting services instance needs to be exposed externally and set to allow basic authentication which may cause some network admin headaches. The Nitro application itself then just needs to be set up to connect to the reporting services instance where it will run the report, generate the feed and render the dashboards in real time.

The Blue Granite web site provides a full breakdown of the structure required by the application and a number of run throughs and demo’s. But of course, I thought I would have a go myself wiring up some data in the Project Server Reporting database and OLAP cubes, and whilst I was at it, why not film it Smile

So here are my attempts, best viewed in HD, the first one is a run through of how to create a feed from scratch and then render it in Nitro.

Click to be taken to the video

The second one shows a slightly more advanced scenario with some different visualisations and connecting to both relational and cube based data.

Click to be taken to the video

On reflection, building the report up was incredibly simple, you just need a bit of knowledge of the Project Server Reporting DB schema and what’s available in the cubes (which is documented in the Project 2010 SDK available from here). Where information is not available from these sources, such as extended risk, issue or SharePoint list data, additional tools such as the iPMO data miner or SLAM could be leveraged to make copies for reporting purposes without directly querying the contentdb. As you saw in the video configuring the Nitro app itself was just as easy.

Of course this solution is not just limited to Project Server data, any information you have stored in SQL and could report on using Reporting Services can be queried and rendered through Nitro on a Windows Phone 7. Given the price point, the ease of configuration and the fact it leverages your in place technology without the need to install any new servers / software, why wouldn’t you install it and start to empower your organisation today?

Finally, as I don’t have a Windows Phone 7 of my own to play with (I will gladly accept any donations though Winking smile), I would like to thank Glenn Wilson for lending me his HTC Mozart to build the screencast.

Add the target attribute to Project Server quick links

April 11, 2011 Leave a comment

Recently on the Project forums, a user asked if it was possible to add a target attribute to a menu item in the quick links of Project Server, i.e. the target=”_blank” to force the link to open in a new window. This capability can be pretty useful, especially when you want to provide links to non project server content that supports the use of the tool such as a PMO help site, or perhaps even your favourite EPM blog Smile

Unfortunately the Project Server quick link functionality doesn’t give you an option to set a target and no way to decorate a html anchor statement to insert one.

Project Server Quick Link

 

So how can we make this work?

Well my first thought was to look at using jQuery in a content editor web part on the page. The code required is relatively easy, in this case I have added a link to my blog on the PWA page via the quick links which I am going to target.

 <script type="text/javascript” src="SiteAssets/jquery-1.5.2.min.js"></script><script type=”text/javascript”>

$(document).ready(function () {
    $('a[href^="http://www.epmsource.com"]').attr({ target: "_blank", title: "Opens in a new window" });
});

</script>

The code above firstly provides a reference to the jQuery library, then targets the URL http://www.epmsource.com and adds the target=”_blank” and a title ‘Opens in a new window” to the link on the page.

On the surface, this looks like it’s addressed the need, but it only works on the page that the content editor web part was placed. To make sure the fix is on every page we either have to add a content editor web part to every page, which isn’t possible, or we need to add the code to every page using code, luckily this is pretty easy to implement using a SharePoint Sandboxed solution.  At it’s core, the module will deploy jQuery and the code in lines 3 to 5 into the PWA SiteAssets library, this is achieved by the module elements.xml file which looks like this:

 
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Module Name="TargetBlankLinks" Url="SiteAssets">
      <File Path="TargetBlankLinks\jquery-1.5.2.min.js" Url="TargetBlankLinks/jquery-1.5.2.min.js" Type="GhostableInLibrary"/>
      <File Path="TargetBlankLinks\PopNewWindow.js" Url="TargetBlankLinks/PopNewWindow.js" Type="GhostableInLibrary" />
  </Module>
</Elements>

The important bits above is the Url statement which tells SharePoint where to put the file, and the Type statement that tells SharePoint it can drop the files into a document library, in this case the SiteAssets library. Once the code is deployed, all that is needed is to get the PWA page to reference the script files, this is done be a simple element file and the wonderful ScriptLink command.

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
		<CustomAction
		  ScriptSrc="~Site/SiteAssets/TargetBlankLinks/jquery-1.5.2.min.js"
		  Location="ScriptLink"
		  Sequence="10">
		</CustomAction>
		<CustomAction ScriptSrc="~Site/SiteAssets/TargetBlankLinks/PopNewWindow.js"
		  Location="ScriptLink"
		  Sequence="20">
		</CustomAction>
</Elements>

You’ll notice we reference the two files dropped into SharePoint via the module using the ScriptSrc statement, the ~Site bit, tell SharePoint to look in the current site path, so /PWA/SiteAssets, which is required as we are using a Sandboxed solution. Finally the Sequence statement allows us to define the order in which the scripts are loaded, making sure jQuery is available before our JavaScript code calls it. Finally all that is required is to tie all of the above in a feature and we can then build and deploy it to PWA.

Visual Studio 2010 Feature

Once deployed you should see the link specified has been targeted by jQuery and target=”_blank” and the ‘Open in a new window’ title added.  Of course if you need to add these target statements to any more links, simply add a new row to the PopNewWindow.js file.

I have uploaded a copy of the Visual Studio solution file to my SkyDrive account should you wish to have a bit of a closer look.

How to remove the Office.com references from your Project Server & SharePoint 2010 farm

March 28, 2011 Leave a comment

If you look closely in your SharePoint farm, you will see references to Office.com in some of the ribbons and dialogs….

Office.com link on the Create Site dialogBrowse Office.com on the ribbon

When you click on the link or button, instead of opening up a window into thousands of SharePoint apps from Microsoft and Community, unfortunately it doesn’t seem to show anything Sad smile

The shop is empty :(

Someone asked recently if it was possible to turn these off as they can be confusing for users. Well the answer is yes, you can turn the links off easily, if you know where to look. To do so, navigate to Central Administration and choose Manage Farm Features.

Central Admin - Manage Farm Features

Locate the ‘Office.com Entry Points from SharePoint’  feature and click on ‘Deactivate’.

Office.com Entry Point from SharePoint

You will be presented with a warning message, continue to click on the ‘Deactivate this feature

image

And voila, the references are gone.

Entry point removedEntry point removed

Handy CodePlex solution for looking up ULS logs from within SharePoint

March 18, 2011 2 comments

Codeplex LogoWhen I was in the US last week, I commented that it would be great if SharePoint and Project Server made it easier to look up the relevant ULS log entries for a specific correlation id. Of course, the traditional way of viewing these is to navigate to the ULS log location within the farm and view the relevant log file, or to use the excellent ULS Viewer tool to interrogate the files. However, both of these options require the user to have physical access to the file system where the ULS logs are located, which isn’t always available, especially on a production environment.

Thanks to Christophe, who pointed me at this excellent CodePlex solution called SPCorrelationViewWP, is the brainchild of Tom Van Gaever who has done a fantastic job. The project provides a web part and a site action menu item which allows you to enter a Correlation ID and pulls back the relevant ULS log entries for that Correlation ID directly within the SharePoint GUI.

Correlation ID Viewer

After installing the solution two items will be added, including a new web part to the web part gallery.

Correlation ID Web Part

Also the solution will add a new menu item to the Site Actions menu which when you click, will pop up a dialog for you to enter a Correlation Id to pull back the relevant ULS lines, all without needing to grant the user access to the file system directly to read the logs.

Site Actions - Correlation ID Viewer

After looking at the solution, I wondered if it might be more appropriate to offer the Correlation ID lookup via Central Administration, after all, you may not want all end users seeing the option, or giving them the capability to trawl through the logs. So whilst making a minor code fix to allow the Site Actions item to work for Project Server, I also coded up a new feature which adds a Correlation Id item to the Monitoring section of Central Administration.

Central Admin - Correlation Viewer

These changes have been uploaded as a patch which you can download the source directly from here, hopefully it will get accepted into the main solution in the coming weeks. Tom is also requesting feedback and feature suggestions on the project via the discussion forums, so please make sure you give him feedback.

Changing the default security timeout for PWA and SP2010

March 11, 2011 1 comment

clockA common request for previous versions of Project Server was the ability to extend the security timeout of pages within the tool. Why this was requested was users typically started an action, got called away, or popped out for a coffee, then came back to the page they were editing, pressed save only to be told that the page had timed out and all their edits had been lost.  Now this was not across the whole of tool, but only certain pages like editing views, SharePoint team sites etc.

Whilst there are numerous posts outlining how to set this in 2007, with the move to the 2010 platform, the setting has moved to deep within Central Administration. To find it, navigate to Central Administration and choose Manage Web Applications.

Central Admin - Manage Web Application

Select the web application that hosts your PWA instance and highlight it. Then click on the General Settings button on the toolbar.

Web Application - General Settings

A dialog will be displayed outlining the settings for that web application, scroll down about half way until you see ‘Web Page Security Validation. You will see the default time is set at 30 minutes.

General Settings - Web Page Security Validation

Simply update that setting and your web application will now respect that time out setting. A word of warning however, the setting will affect all sites hosted in that web application, so if you portal and PWA instance are on the same web app, they are both going to have the increased timeout.

Unexpected error customising the Cost, Cost Exposure and Exposure columns in a Project Server 2010 Risk list

February 17, 2011 Leave a comment

An annoying feature of Project Server 2010 when it shipped was the inability to fully customise the risk list of a Project workspace. Whilst most of the list could be customised, when you tried to modify the Cost, Cost Exposure or Exposure columns, you would get a really annoying ‘An Unexpected error has occurred’ message, even cracking open SharePoint Designer to try and modify those columns would result in an error.

An Unexpected error has occurred

When you dig into the ULS logs, you see the following errors:

Unexpected    System.FormatException: Input string was not in a correct format.    at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)     at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)     at Microsoft.SharePoint.SPGlobal.GetNamedIntItem(XmlNode node, String strName, Int32& iValue)     at Microsoft.SharePoint.SPFieldCalculated.get_CurrencyLocaleId()     at Microsoft.SharePoint.ApplicationPages.BasicFieldEditPage.get_CurrencyLocaleId()     at Microsoft.SharePoint.ApplicationPages.BasicFieldEditPage.PopulateCurrencyList(DropDownList ddl)     at Microsoft.SharePoint.ApplicationPages.BasicFieldEditPage.OnLoad(EventArgs e)     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Thanks to a heads up from Brian Smith, this issue has been addressed in Hotfix 2459113 which is part of the Project Server 2010 December CU, so get patching.

Follow

Get every new post delivered to your Inbox.

Join 271 other followers