Archive

Archive for January, 2017

SharePoint 2010: Enable (Page) Output Cache Settings using PowerShell

January 25, 2017 Leave a comment

To optimize performance in SharePoint 2010, there are a few settings you can do to help with page load times and optimizing SharePoint Cache.

The three main ways to do this is:

1. BLOB Cache
2. Object Cache
3. Page Output Cache

In my environment we are not leveraging BLOB cache, and Object Cache is already enabled by default. Though you can optimize it for your SP environment.

However the Page Output Cache is not enabled by default.

Below is a PowerShell script I created that enables the Page Output Cache at the Site Collection Level for a Web Application.

$webapp = Get-SPWebApplication [URL OF WEB APPLICATION]

foreach ($web in $webapp.Sites)
{
$cacheSettings = New-Object Microsoft.SharePoint.Publishing.SiteCacheSettingsWriter($web.url)
$cacheSettings.EnableCache = $true
$cacheSettings.Update();
Write-Host “Updated Page Output Cache Settings…” $web.Url
}

Options:

#Default Page Output Cache Profile. The Cache Profile Id is built off the Cache Profile List (Site Actions – Site Settings – Site Collection Cache Profiles (under Site Collection Administration))

SetAnonymousPageCacheProfileId($web.Url, 1)
SetAuthenticatedPageCacheProfileId($web.Url, 2);

#Page Output Cache Policy
$cacheSettings.AllowPublishingWebPageOverrides = $true;
$cacheSettings.AllowLayoutPageOverrides = $true;
$cacheSettings.EnableDebuggingOutput = $true;

Project Server 2010: Fixing “Execution of user code in the .NET Framework is disabled. Enable “clr enabled” configuration option”.

January 12, 2017 Leave a comment

I ran into some problems deploying Project Server projects that were failing in the Queue jobs. The error I was receiving was

“Execution of user code in the .NeT Framework is disabled. Enable “clr enabled” configuration option.”

To fix the problem you need to enable the Common Language Runtime in SQL 2012.

1. Log into SQL Server
2. Launch SSMS (SQl Server Managment Studio)
3. Open up a new Query
4. Type the following:

sp_configure ‘clr enabled’, 1
go
reconfigure
go

After executing the query, go back to Project Server and retry your job. This time the job should complete successfully.

reference: https://technet.microsoft.com/en-us/library/ee662108(v=office.14).aspx

Project Server 2010: Fixing “Waiting To Be Processed”

January 6, 2017 Leave a comment

I recently ran into a problem with Project Server 2010 where all my jobs in the Manage Queue Jobs were all in the “Waiting to be processed” status.  Since there could be many reasons for this issue, I’ll just touch basis on the specific issue I was experiencing.  I have not seen anything being blogged about my specific problem so here it is.

In a nutshell we recently migrated our SQL Server 2012 Instance from Windows 2008 R2 OS to Windows Server 2012 R2 OS by doing a DB deattach / reattach method.  We did this by scripting out the process to move the databases over along with all the necessary DB permissions needed.  In the end this was the official problem,  but I’ll get back to that later.

The troubleshooting steps I took to resolve the problem are below.

The first thing I made sure and checked was that the “Project Application Service” was started and working.  This is checked through CA Services on Server.  This was good.

Next I checked the Project Server and made sure the ‘Microsoft Project Server Queue Service 2010″ within Window Services was started.  It was.

Even though the service was started I wanted to make sure it was functional so I completely stopped the service and restarted it.  This had no affect on the queued jobs.

I also recycled the SharePoint 2010 Timer jobs.  This did nothing as well.

Since all the necessary services were started and working and the jobs were still queued I went back to CA to check out the Project Web App Service Application (CA->Application Managment->Manage Service Applications->Project Server)

Clicking on the drop down option for the Project Web App Site and selecting “Edit” I made sure the Primary Database settings were correct since we did migrate to a new SQL Server Instance.  The Primary database server was still pointing to our old SQL Server instance, but I made sure I set up SQL Alias so this was not the problem.  Everything checked out and I hit the “Edit” button.  The process for provising the PWA site started.  It ran for about 5 minutes and then errored out “Failed – Please see application server logs”.

So I couldn’t even provision a PWA site (existing or new one).

Since I know that Project Server intially creates 4 databases when you provision a new Project Server Site (Published, Draft, Archive and Reporting) I went over to SQL to see if the new Databases I tried to create with a new PWA site were created, they were not.

So permissions….Looking at the permissions on my SQL instance I saw that the right permissions were granted to 4 databases with DBO rights.  However that was not enough.

I had to actually grant the “dbcreator” and “sysadmin” rights to the service accounts.

Once I did that I went back to the Project Web App Service Application and attempted to reprovision the PWA site again.  This time the site provisioned correctly and by doing so it kicked off the queued jobs which all completed successfully.

For your information all the queued jobs live in the “Draft” database.  If you ever have permissions with the queued jobs make sure this database has the adequate permissions to do what it needs to do.

Hopefully this  helps others with similar problems.

 

Categories: Uncategorized