Archive

Posts Tagged ‘SharePoint’

New Programming Jargon

August 6, 2012 Leave a comment

 

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/

Chris Stretton
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

August 1, 2012 1 comment

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.

image

 

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

via Buzz Blog http://paulbuzzblog.wordpress.com/2012/08/01/infopath-the-following-form-template-cannot-be-upgraded-because-it-is-not-currently-uploaded-on-this-farm-sp2010/

Chris Stretton
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.

image

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
}

via Buzz Blog http://paulbuzzblog.wordpress.com/2012/07/31/getting-project-server-database-information-via-c-how-to-run-powershell-command-in-c/

Chris Stretton
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/

Chris Stretton
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/

Chris Stretton
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)

#SharePoint Slide Libraries #SP2010

July 22, 2012 1 comment

At a recent meeting of all the consultants, we were talking about the various tools that we use and how we use them. These can include various PowerPoint presentations. One of the more senior people in the room asked; “Wouldn’t it be great if we could have one central repository of all the PowerPoint slides that might want to use? It would be even better if we were told automatically when these slides are updated and we can be sure that we are using the most up to date slides in our presentation.”

I thought about this for a brief moment and then said “That sounds like SharePoint slide library to me. I’m pretty sure you can do all those things from a slide library”.

And, as it turns out, you can.

Adding slides to the library

To add one more slides from a presentation to the slide library:

  1. From within PowerPoint, right click on any slide to display the context men.
  2. Click on the Publish Slides option

    Publish slides

    Publish slides

  3. This will open the Publish Slides dialogue box. The slide that was right clicked on in the previous step will already be selected. Use the checkboxes to the left of the thumbnails to select other slides. Alternatively use the Select All button to select all the slides.

    Select files to publish

    Select files to publish

  4. Use the Browse button to locate the slide library:

    1. Clicking on the Browse button will open the “Select a slide library” dialogue box

      Browse to locate the slide library

      Browse to locate the slide library

    2. Enter the address of the slide library in the address bar. Alternatively enter a top level address such as http://cps.co.uk and then navigate to the required slide library
    3. Click the Select button
  5. Once the required slide library has been selected, click on the Publish button
  6. The required slides will be added to the slide library

Using slides from a slide library in a presentation

To add slides from a slide library to a presentation:

  1. Open the slide library that contains the required slides.
  2. Use the check boxes to the left of the slide thumbnails to select the required slides
  3. Click on the link to copy the required slides to a presentation

    Select files and add to presentation

    Select files and Copy slides to presentation

  4. If PowerPoint is not already open then it will be opened a dialogue box will prompt you to add the selected slides to a new presentation

    Copy slides to PowerPoint

  5. Copy slides to PowerPoint

  6. If there is already a presentation open then there will be the option to add the selected slides to a new presentation or the existing one.
  7. In either case the second check box should be selected. The next time the presentation is opened a dialogue box will appear, prompting the user to check for changes. 
  8. Clicking on the Check button will compare slides in the current presentation to slides in the slide library. If PowerPoint detects that the latter have been changed then a dialogue box will appear giving the user the chance to updates slides in the presentation.

Et Voila! One central repository for slides and notification of changes!

Carl Sprake
After beginning my career in pharmaceutical sales I moved into IT training, initially in the pharmaceutical sector but then moved across to the NHS to teach basic computer skills and the ECDL. I then changed companies and moved into a primarily Microsoft Office training and support role. I joined CPS in 2008 as a training consultant and now provide configuration as well as training services.

This article has been cross posted from carlsprake.wordpress.com/ (original article)

Deleting the #SharePoint Training Kit site

June 28, 2012 3 comments

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.

STK

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 Smile

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:

  • No support for custom assemblies, extensions, report items or elements
  • Single data source – Windows Azure SQL Server
  • Basic security model
  • Scheduling, subscriptions and alerting are not supported
  • Limited Report Builder support and BIDS / SQL Data Tools is the recommend report creation tool for now

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, Mark, Robin and me

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.

NW4PS2010_300px_72dpi_V_trans (1)

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

May 18, 2012 1 comment

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:

Categories: Work Tags: , ,

More fun with SharePoint Web Analytics

April 17, 2012 Leave a comment

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.

image

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.

ErrorCapture

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.

ErrorCapture2

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 !

Design a site like this with WordPress.com
Get started