Archive
New Programming Jargon
Love this new list of jargon used by teams around the world. Find it here http://www.codinghorror.com/blog/2012/07/new-programming-jargon.html
My favourite – possible because it happens far to often
Protoduction
A prototype that ends up in production. Heard this from a tech at the Fermi lab. He said he didn’t coin the term but had heard it used a number of times at Fermi.
via Buzz Blog http://paulbuzzblog.wordpress.com/2012/08/06/new-programming-jargon/
|
Paul is a an expert SharePoint and Project Server developer and is responsible for designing and implementing custom solutions on client systems using the latest SharePoint and .NET technologies.
Paul has extensive experience with SharePoint systems across all sizes of implementation, ranging from small to large farms and has an excellent understanding of all the elements of SharePoint. This article has been cross posted from paulbuzzblog.wordpress.com (original article) |
Infopath “The following form template cannot be upgraded because it is not currently uploaded on this farm” #sp2010
So what i was trying to do is upload a new form template to a clients QA system. Something that has been done tens of time since the system went live. But today I get.
Now i have never seen this message before so i instantly start googling to try and save the day.
I have to say not a lot of stuff around this error is available but there are a couple of MSDN forum posts that got me in the right direction.
The SharePoint farm in question has recently had some more servers added to the farm and what i suspect has happened is that the form files have not correctly deployed to the new servers. But to prove this i need the feature GUID that is created when you first upload a InfoPath form.
I found the quickest way to get this is to navigate to the site collection the form exists on. Go to Site settings and under Site collection Administrators select the Site Collection Features in the list you will see a feature that maps to the name of the XSN file.
Click on the Deactivate button (don’t worry there is a confirmation step). Now in the query string the feature GUID is shown. Copy this as you will need it later. You don’t need to deactivate the solution so can close the page if you wish.
I was then able to see, under Solution Management within central admin the WSP called the same GUID. Clicking on the WSP showed me that the wsp had not been deployed to all the servers in the farm. For some reason all of the other WSP in the list had all been deployed. I guess i was just lucky that this was the only one.
Now to fix the issue you need to run an STSADM command
stsadm -o uninstallfeature –id <the feature GUID you got from the query string> –force
This will remove the feature and i guess some other magic that fixes stuff.
Now the form can be upgraded without an error. Once the form has upgraded the feature is reactivated automatically (did for me anyway)
And YAY it all works again. 5 minutes job only took an hour
Hope this helps someone
|
Paul is a an expert SharePoint and Project Server developer and is responsible for designing and implementing custom solutions on client systems using the latest SharePoint and .NET technologies.
Paul has extensive experience with SharePoint systems across all sizes of implementation, ranging from small to large farms and has an excellent understanding of all the elements of SharePoint. This article has been cross posted from paulbuzzblog.wordpress.com (original article) |
Getting Project Server database information via C# / How to run PowerShell command in C#
For a long time now I have had a few scenario’s where it would be helpful for me to know what the database server and database names are of a Project Server instance. The PSI does not provide this information but there is a PowerShell command that will give you the information.
Get-SPProjectWebInstance –url <URL>
This gives me all the info a want about the instance.
So now I know I can get the info i need i just need a way of getting this within c# code.
Helpfully you can use System.Automation to execute PowerShell scripts within .NET
We start with a simple method that will execute PowerShell commands
private string RunScript(string scriptText)
{
string addWss = "Add-PSSnapin microsoft.sharepoint.powershell";
Runspace runspace = RunspaceFactory.CreateRunspace();
runspace.Open();
Pipeline pipeline = runspace.CreatePipeline();
pipeline.Commands.AddScript(addWss);
pipeline.Commands.AddScript(scriptText);
pipeline.Commands.Add("Out-String");
var results = pipeline.Invoke();
runspace.Close();
StringBuilder stringBuilder = new StringBuilder();
foreach (PSObject obj in results)
{
stringBuilder.AppendLine(obj.ToString());
}
return stringBuilder.ToString();
}
The above code needs
using System.Management.Automation; using System.Management.Automation.Runspaces;
NOTE: You’ll need to add a reference to the version of PowerShell you have installed in your GAC to the Visual Studio project file. To do so, you’ll open the project file as a text file and add the following line into the <ItemGroup> section:
<Reference Include=”System.Management.Automation” />
I was able to cheat and “browse” to the assembly using the following path
C:\Windows\assembly\GAC_MSIL\System.Management.Automation\1.0.0.0__31bf3856ad364e35\System.Management.Automation.dll
Now that we have the helper method I can actually get the info I want.
string answer = RunScript("Get-SPProjectWebInstance -url http://vm641/pwa2");
string reportingDatabaseServer = string.Empty;
string reportingDatabaseName = string.Empty;
var output = answer.Split(new string[] {Environment.NewLine}, StringSplitOptions.RemoveEmptyEntries).Cast<string>();
reportingDatabaseServer = (from x in output where x.StartsWith("ReportingServer") select x).First().ToString();
reportingDatabaseName = (from x in output where x.StartsWith("ReportingDatabase") select x).First().ToString();
reportingDatabaseServer = reportingDatabaseServer.Replace("ReportingServer", "").Replace(":", "").Trim();
reportingDatabaseName = reportingDatabaseName.Replace("ReportingDatabase", "").Replace(":", "").Trim();
Bingo I have the name of the reporting server and the database name.
I needed this months ago to auto configure a PSI extension that was written but i need it now to auto configure a feature when it is deployed.
I’ll wrap all the above code into a single class that accepts the instance URL in its constructor and then expose properties with the information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Management.Automation.Runspaces;
using System.Management.Automation;
using System.Text;
public class ProjectWebInstanceInformation
{
#region Fields and Properties
public string ReportingServer { get; private set; }
public string ReportingDatabase { get; private set; }
#endregion
#region Constructor
protected ProjectWebInstanceInformation()
{
}
public ProjectWebInstanceInformation(string Url)
{
try
{
string answer = RunScript(string.Format("Get-SPProjectWebInstance -url {0}", Url));
string reportingDatabaseServer = string.Empty;
string reportingDatabaseName = string.Empty;
var output = answer.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries).Cast<string>();
ReportingServer = (from x in output where x.StartsWith("ReportingServer") select x).First().ToString().Replace("ReportingServer", "").Replace(":", "").Trim();
ReportingDatabase = (from x in output where x.StartsWith("ReportingDatabase") select x).First().ToString().Replace("ReportingDatabase", "").Replace(":", "").Trim();
}
catch { }
}
#endregion
#region Methods
private string RunScript(string scriptText)
{
string addWss = "Add-PSSnapin microsoft.sharepoint.powershell";
Runspace runspace = RunspaceFactory.CreateRunspace();
runspace.Open();
Pipeline pipeline = runspace.CreatePipeline();
pipeline.Commands.AddScript(addWss);
pipeline.Commands.AddScript(scriptText);
pipeline.Commands.Add("Out-String");
var results = pipeline.Invoke();
runspace.Close();
StringBuilder stringBuilder = new StringBuilder();
foreach (PSObject obj in results)
{
stringBuilder.AppendLine(obj.ToString());
}
return stringBuilder.ToString();
}
#endregion
}
|
Paul is a an expert SharePoint and Project Server developer and is responsible for designing and implementing custom solutions on client systems using the latest SharePoint and .NET technologies.
Paul has extensive experience with SharePoint systems across all sizes of implementation, ranging from small to large farms and has an excellent understanding of all the elements of SharePoint. This article has been cross posted from paulbuzzblog.wordpress.com (original article) |
SharePoint 2010 and 2013 WSP
Nice post here about creating a WSP for both 2010 and 2013. Or i should say upgrading your 2010 WSP to work on both
http://www.danlarson.com/sharepoint-2010-and-2013-wsp-compatibility/
via Buzz Blog http://paulbuzzblog.wordpress.com/2012/07/25/sharepoint-2010-and-2013-wsp/
|
Paul is a an expert SharePoint and Project Server developer and is responsible for designing and implementing custom solutions on client systems using the latest SharePoint and .NET technologies.
Paul has extensive experience with SharePoint systems across all sizes of implementation, ranging from small to large farms and has an excellent understanding of all the elements of SharePoint. This article has been cross posted from speakingsilent.wordpress.com/ (original article) |
Best source code plugin for wordpress and Live Writer
See here for the best source code plugin
http://richhewlett.com/wlwsourcecodeplugin/
via Buzz Blog http://paulbuzzblog.wordpress.com/2012/07/23/best-source-code-plugin-for-wordpress-and-live-writer/
|
Paul is a an expert SharePoint and Project Server developer and is responsible for designing and implementing custom solutions on client systems using the latest SharePoint and .NET technologies.
Paul has extensive experience with SharePoint systems across all sizes of implementation, ranging from small to large farms and has an excellent understanding of all the elements of SharePoint. This article has been cross posted from speakingsilent.wordpress.com/ (original article) |
Deleting the #SharePoint Training Kit site
So you have had your SharePoint environment installed for a while and you installed the SharePoint Training Kit as a site for end users to get used to the idea of lists, libraries, check in / out etc… but you are a couple of years into your implementation now and you want to clean up sites that aren’t being used anymore.
The SharePoint Training Kit site hasn’t had usage for a while (you can see this from your analytic stats) and you make the decision to get rid of it.
You attempt to delete and you get the following message:
Cannot delete the training web site becasue you are not authorized or other training site depends on this site. at
Microsoft.SharePoint.Library.SPRequestInternalClass.DeleteWeb(String bstrUrl)
at Microsoft.SharePoint.Library.SPRequest.DeleteWeb(String bstrUrl)
Well thanks to this blog post, there is a nice step by step guide:
http://blogs.msdn.com/b/ekraus/archive/2008/05/22/sharepoint-training-kit-cannot-delete-site.aspx
Just for my own reference, I will place the steps to resolve here:
The deactivate event in the feature receiver is restricting the DeleteWeb call. To get past this, remove the two assemblies that are installed in the GAC when you ran the install:
- Micrososft.SharePointTrainingKit.dll
- Microsoft.SharePointTraining.Features.dll
1. Browse to %WINDIR%\assembly
2. Find the assembly, Right click > Uninstall
- Run IISRESET
- You should now be able to delete the three subwebs, and finally the top level web.
Note: To add the DLLs back into the GAC:
1. Browse to the install location of the Training Kit (typically C:\Program Files\Microsoft Office SharePoint Server 2007 Training)
2. Copy the MossTraining.wsp file and past in the same folder (name is not important)
3. Change the copied *.wsp file’s extension to *.cab
4. Double click on the *.cab file to open it up in an explorer window
5. Find the two assemblies mentioned above, right click > Copy
6. Browse back up one level and paste them into your install folder
7. Open a new explorer window and browse to %WINDIR%\assembly
8. DRAG the assemblies into the assembly folder (copy & paste will not work)
- Run IISRESET
Thanks Eric Kraus, this could have been a nightmare to debug without your blog ![]()
TechEd Europe Day One #TEE12
So I am here in Amsterdam having completed day one of TechEd Europe 2012 and once again, the conference is an awesome experience. There is one major difference however…
Now I actually know some people from the last conference I went to (MSPC12). So I am catching up with some colleagues (Alex Burton – Nintex and Ben Howard – Applepark) as well as getting to know new colleagues (Robin Kruithof – CXS and Mike Wϋbbold – SolutionTime).
The focus of the conference is very much about the cloud:
- Innovations in Windows Server 2012 to support private and public clouds
- Windows Azure advances with websites, Hyper-V, SSRS to truly support private and public cloud infrastructure in anyway you can imagine.
- And of course Office 365 incorporating SharePoint Online, Exchange Online and Lync Online
Day One Keynote
The keynote was an impressive site with equally bold statements on how Microsoft are not only in the cloud, but mature in the cloud with innovation on how it should be done!!!

Very bold statements indeed but with one difference… evidence!
Discussions on how Microsoft have achieved the scalability of Azure through the use of automation technologies such as PowerShell.
How Microsoft have worked with storage and network vendors to ensure optimum throughput on the Windows Server 2012 platform.

Copying a 10GB file is seconds across the network in seconds! I couldn’t take a picture fast enough…
And lastly, how Hyper-V has come of age as a true competitor to VMWare in the virtualisation market with IOPS stats they can only dream of…

That’s 1,026,020.31 IOPS and only limited by current hardware, not the software!
Azure Reporting Services
Moving on from this and after catching up with colleagues. I moved into Azure SSRS which was launched at the North America TechEd event at the beginning of June.
SQL Server Reporting Services is now available in the cloud and we can finally say that Business Intelligence is starting to become available in a public cloud environment.
Some key things to note:
The API interfaces of SSRS are available:

However, some restrictions to the current launch do apply:
|
![]() |
These are some serious limitations, but we are assured that this is being worked on and we will see improvement in future.
No word or official comment on integration with Office 365 but it wouldn’t surprise me if SharePoint Online integration is not coming down the line.
Staffing the Microsoft Project – Technical Learning Centre (TLC)
To gain attendance to one of the biggest Microsoft conferences, some of us have to pay our way in kind. 🙂
This humble bloggers approach is through presentations (more on that tomorrow…) and staffing the Microsoft Project booth at TechEd to help customers understand how Microsoft Project 2010 and Microsoft Project Server 2010 fit into the Office Server eco-system with SharePoint and other products.
We also provide help to anyone who would like to pose us with problems… almost like a live MSDN forum answer session.
It is also a good opportunity to catch up fellow colleagues in the EPM space and discuss approaches to client implementations etc…:
Ben, Mike, Robin and me
As part of the TLC Office stand some other cool and geeky items:
The Azure datacentre in Lego.
![]() |
![]() |
![]() |
A cool Office 365 Lego giveaway…

and the most elaborate Microsoft Flight Simulator you will ever see…

And towards the end of the day I caught up with the Nintex crew to discuss Nintex Workflow for Project Server.
Thanks for the catch up guys.
So that just about wraps up day one. Presentations and flights home tomorrow… till the next post – Good evening – Goedenavond
Permissions delay when using Kerberos and Security Groups #SP2010 #SharePoint #in
At one of our clients recently we had a support issue concerning a delay in permissions being applied in a SharePoint 2010 environment.
Environment Details:
- SharePoint Server 2010 – Enterprise: SP1 – Dec 2011 CU
- Authentication: Kerberos
Scenario
- Site Administrators add an Active Directory security group into a SharePoint group for permissions.
- The security group has 9 users and permissions are applied accordingly.
- Later down the line a system admin adds a users into the security group giving it 10 members instead.
- No changes have been made to the SharePoint group security.
Problem
The 10th member is not immediately given the rights of the SharePoint group. However, after some time has passed (with no changes being made), the permissions are applied to the 10th member.
The amount of time is not fixed but is definitely no more than a standard working day.
Solution
After investigation and replicating the issue back at the office, we found this:
http://technet.microsoft.com/en-us/library/cc738673(v=ws.10).aspx
In particular, we found these settings:
| Maximum lifetime for user ticket | Determines the maximum amount of time (in hours) that a user’s TGT can be used. When a user’s TGT expires, a new one must be requested or the existing one must be renewed. By default, the setting is ten hours. |
| Maximum lifetime for user ticket renewal | Determines the longest period of time (in days) that a TGT can be used if it is repeatedly renewed. By default, the setting is seven days. |
So the issue is that the Kerberos token is being cached therefore the permissions are not being enforced until the token has expired.
Now, 10 hours to wait is a very long time but given that this is a forest wide setting, should we be changing this setting? In this case we also realised that the token is re-issued whenever a user logs back in.
So when these issues occur and a support issue comes in we ask them to just log off and log back in again and then we are back to where we should be!
All sorted then…
To see this in action, we took a video to prove the scenario:
More fun with SharePoint Web Analytics
Following on from yesterdays post regarding problems with getting into the CA site, today we got on with the job of looking at Web Analytics, and the reports that we can provide to end users.
So we checked the Web Analytics reports and could see good graphs like the ones below, very nice.
Just the sort of thing you could hand to a client.
So the next stage was to get the Schedule Web Analytics Reports workflow running and send the reports to a test user for analysis, this is when the fun started, no matter what we did the workflow simply refused to work, all we were getting was “An error has occurred in” and no reports, nothing in the ULS logs, nothing in the Event Viewer and nothing of any help in the Workflow History list, really handy, we knew that ‘normal’ workflows such as Approval worked fine on this system, so it was a bit baffling.
After a few(more) hours of head scratching I decided to try the Schedule Web Analytics Alerts workflow instead, which still failed, but at least gave out a more helpful error.
Of course it turned out that our test account didn’t have a mailbox (duh!), so we used a different account (with a mailbox) and the Schedule Web Analytics Reports worked fine
But it really annoyed me that 2 workflows related to the same area in SharePoint have clearly been developed by different teams in Microsoft and both show different failure messages for the same event.
We go the reports out finally, and they are just straight Excel exports, so we might not even use them, another fun packed day working with SharePoint !





















You must be logged in to post a comment.