Category Archives: SharePoint 2010

How to make a AdminContent and SharePoint_Config database without a GUID

 

 

There are only a few ways to make SharePoint databases, Automatic or Manual. If you choose the automatic way you get ugly GUID’s behind your databases and if the wizard did all the handy work for you  everything is configured under one Service Account. A true passionate admin go’s for the manual path and want as less GUID’s as possible.

Some Service Applications give you the option to specify the database name but unfortunately not all. I suggest to look in to PowerShell and find the scripts to create also those ones by one completely the way you like them to be.

For the first two databases of your farm you need to do a little trick to get rid of the GUID.

The AdminContent database is like the name says the Content Database for the SharePoint Configuration Console. The other one is the SharePoint_Config database which holds the little configuration settings of your farm.

I suggest to make your own naming convention to keep everything clear. I always rename the SharePoint_Config to SharePoint_Farm_Config and the AdminContent to SharePoint_AdminContent so both stay nicely together in alphabetical order in SQL.

 

Here how to make the GUIDless

After you run the installation and you get the question to run the Product and Configuration wizard it’s very important to uncheck the little checkbox and stop the installation.

Make sure your logged on as DOMAIN\SPsetup and SPsetup had dbcreate and securityadmin server roles authorizations in SQL.

 

Check if your User Access Control Level is disabled in the Control Panel under the users section and run the command prompt as an Administrator Run >> cmd -admin

 

Go to this path, C:\Program Files\Common Files\microsoft shared\Web Server Extentions\15\BIN
Change the number to your SharePoint version, 12 = MOSS 2007, 14 = SharePoint 2010 and 15 = SharePoint 2013

 

Run the following code from your DOS Prompt with elevated admin privileges!!

psconfig -cmd configdb -create -server <SQLServerName> -database <ConfigDatabaseName> -user <DOMAIN\farmaccount> -password <FarmAccountPassword> -passphrase <PassPhrase> -admincontentdatabase <AdminContentDatabaseName>

 

Example

psconfig -cmd configdb -create -server SharePoint_DB_SRV -database SharePoint_Farm_Config -user DOMAIN\SPfarm -password ******* -passphrase ******* -admincontentdatabase SharePoint_Farm_Admin_Content_DB

Now you see the PSConfig.exe do some stuff and you have two fresh databases. check SQL Studio Manager. If you have any problems I guess you have not set your permissions correct for the two accounts or the command prompt is not ran as an administrator.

Good luck


Usage and Health Data Collection Service Proxy Stopped

Sometimes you notice that under the Service Applications which are provisioned one of them is stopped. If that’s the case you have to restart them via PowerShell. The Usage and Health Data collection Service Proxy is stopped almost certain after provisioning and sometimes just to be spontaneous. It’s an unfortunate known bug.

 The PowerShell Script below will help you restart the Service Application.  

  1. Open PowerShell and Add the SharePoint Snapin.
    Add-PSSnapin-Microsoft.SharePoint.Powershell
  2. Get-ServiceApplicationProxy
    This will give you a whole list of Service Applications.
    Get-SPServiceApplicationProxy | where {$_.TypeName -like “Usage*”}
    This will only give you the Usage Data Collection Service Proxy because your filtering on one starting with the word “Usage*”
  3. Double click on the ID number and copy it to an empty notepad file.
  4. Copy the script below and replace the part with the ID you just copied.
    $UP = Get-SPServiceApplicationProxy | Where {$_.ID -eq “Paste ID Here”}
    $UP.Provision()

Now if you refresh the page with your published Service Applications in Central Admin the SA is Started.

 


Error 1053 when starting the SharePoint Administration Service if you have trouble deploying a solution

Sometimes your deploying a solution package and when you check in the Central Admin the solution keeps saying it’s in deploying status or with PowerShell Get-SPSolution it says False

In this case most of the time the SharePoint Administration Service (Windows Service) Is not running on one of your servers. Check if it’s started (refresh) or to make sure just stop and start the service. Do the same for the Timer Service. If you get an old school Error 1053 message when starting the SharePoint Administration Service it’s talking about dependencies which are not there. 

The resolution for this problem is to run the SharePoint Product and Configuration Wizard on every box it’s don’t want to start.

 


Compare differences in Word files using SharePoint versioning

A moment ago I got a question from a user who wanted to know what the differences where between two files (versions) in a document library which where uploaded.

I knew in Office there was a function to compare two documents but how to use it with SharePoint versions I never tried. Sometimes the answer is so close in front of you it turns invisible.

The trick is to just open the file from SharePoint in Edit mode. Word will open and under the review tab you find a button called compare. Just choose Specific version from the pull downmenu and a list with the versions inside SharePoint is being displayed. From here Word will take over and do the rest. Even if you choose to combine SharePoint will turn it in to a new version.

This function only works if versioning is enabled for that document library and is not available in Office Web Apps. You need the full Word application for this.

I had to shamelesly steal some images of the internet and make one with a Dutch version of Word, but all together it gives a nice image of the words descibed above  🙂


SharePoint warm up scripts

Why a warm up script?
SharePoint is a beast and is being walked by his friend the IIS server. Every night by default the application pool is being recycled by IIS. This means that things like cache is being cleared. This is a good thing but also has a down side.
After the application pool is recycled and you enter your SharePoint site this will be slow and can even cause a time out error in some cases. A warm up script can prevent this. 

There are two ways to set a script. One with the good old fashion batch file and *vbs script which you can download from codeplex or with a nice tool made by Spencer Harbar. The last one will touch the sites directly after the pool is recycled as the batch file has to be scheduled with the windows scheduler.

 

Batch file
Download link

 

Application Pool Manager
For MOSS 2007 servers you need to use v2.0 as v3.0 is only for SharePoint 2010. After you configured it you need to place a shortcut in the startup folder in case of a reboot.

http://www.harbar.net/articles/apm.aspx

 

 Resources

 

 

 

 

 


Unable to display Excel workbook after configuring the SSA

Sometimes it can happen you configure the SharePoint Service Application for Excel Services and when you add the web part to show a Excel workbook you get a nice friendly error message about authorizations and all.

The reason for that is that the Application Pool account from the Excel Service SSA doesn’t have any authorisations on the web applications your trying to use it in.

The PowerShel script below will fix this. Just change the url in the one from your site collection. 

$webApp = Get-SPWebApplication “http://UrlSiteCollection
$webApp.GrantAccessToProcessIdentity(“DOMAIN\SPexcelSSA_Pool”)

 


Disable SSL Protocols and weak Ciphers IIS SSLv2

 This week at our office we are undergoing a security audit. It’s always a good Idea to let your system being checked out by external guys  who have some tricks up their sleeve. So to security cowboys armed with Linux laptops found a minor issue on my portal. Actually I’m really happy because I learned a new trick.

It turns out that SSLv2 is really old and easy to decipher, only clients who really have an old machine cannot enter over SSL anymore but XP with a recent browser will still work. Anyways they asked me to disable SSLv2 and let their pearl script do his magic. I passed   😉

Here’s what I had to do to turn it off and here ‘s a link to a GUID tool for the people without uber cool pearl scripts.
d

http://foundeo.com/products/iis-weak-ssl-ciphers/

Run the test now for a before and after test, 

d

  • Turn your WFE’s off and make a VMware snapshot if you use VM’s that is. better safe then sorry.
  • Open regedit and place a DWORD key with the name “Enabled” and the default value off  “0” (zero). at the following registry keys.
    d
  • HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\DES 56/56
  • HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC2 40/128
  • HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 40/128
  • HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 56/128and one more
  • HKey_Local_Machine\System\CurrentControlSet\Control\SecurityProviders \SCHANNEL\Protocols\SSL 2.0\Server

d

Now run the test again and your checkmarks are both green.
If you have any banking information you should also do something about the SSL 3.0 medium security to pass an audit. This is just voor SSL 2.0

By the way I did this on a Windows 2003 server with IIS 6.0 As I don’t know the exact keys for 2008 R2 yet but maybe it’s the same.

d

d


PowerShell Install-SPSolution trouble

Hey People,

A moment ago I deployed a solution with PowerShell and I’ve received a weird error. Atleased not weired but it did not made me happy. This is what I did,

  • Add-PSSsnapin Microsoft.SharePoint.PowerShell
  • Add-SPSolution “C:\MySharePointSolution.wsp
  • Install-SPSolution –Identity MySharePointSolution.wsp –WebApplication http://myspwebapp –GACDeployment

Then I did, Get-Solution and I saw my newly installed sollution was False. In de Central Admin Console I found an error.

SERVERNAME : Failed to create receiver object from assembly “MySharePointSolution, Version=1.0.0.0, Culture=neutral, PublicKeyToken=XXX”, class “SomeNamespace.Features.Lists.ListsEventReceiver” for feature “SomeNamespace_Lists” (ID: {GUID}).: System.ArgumentNullException: Value cannot be null.

First I checked all the SharePoint Windows Timer Services if they where running and yes this was the case.

Then somebody on the web pointed out just to stop and start the timer service of the WFE servers because of a DLL that would be cached and causing trouble. So I stopped and started the Timer service and deployed it again. Only this time I’ve got an other error that there already was a solution. SharePoint suggested to add -Force and that was the trick, it worked like a dream.

So in the end of this story the clue is resetting services can do magic.


401 Error Integrating SharePoint and SQL Reporting Service “Set Server Defaults”

Last week I was integrating SQL Reporting Service in to SharePoint 2010 and I came across some small issues I would like to share.

The first one was that almost in every demo or manual I found most is all installed on one and the same box and the Admin password is used. Like I was splitting everything up it give me some nice puzzles.

In the old days I setup a SQL server (standalone, because Reporting and Analysis service are not cluster aware) and the reports are made on SQL with the report builder and put in a library. Here’s not much integration needed. But now  in SharePoint 2010 I decided to milk the cow and use the complete integrated mode.

My first eye opener was that I need an installed version of SharePoint 2010 and SQL on the same box. Although it might be overkill to have a complete seperate box just for report server that’s how our infra architect wanted it instead of combining SSRS with one of my app servers.

After installation I stopped all the unnecessary SharePoint services as this was just a Report and Analysis server. The only thing I thought was really weird and have not figured out yet is why I needed to install all kinds of products that I installed on my other servers like Project Server, Office Web Apps, Language Pack’s. No body is going to use the server only for PerformancePoint or true Project Server. So this is quite a mistery for me, why it’s needed but without them the Product and Config wizard it’s not running . Maybe some one out their can tell me the answer.

The second eye opener came when I tried to click “setup default server”  in the Central Administration Console. It gave me the error as seen below.

After investigating I remembered I have not set any trusted delegation in Active Directory  for Kerberos for this SQL server yet as I had done for my cluster.

So I went to the server object and in the properties (delegation tab) and I set the delegation to be trusted (the middle radio button). This resolved my issue and I could enter the set server default in Central Admin.

Two things are weird,

For My cluster I also set the SPN with the command line and I have not done that yet for this server but still it works.

  • setspn -A MSSQLSvc/SVSPREPORT1 DOMAINNAME\srvSQLreport
  • setspn -A MSSQLSvc/SVSPREPORT1:1433 DOMAINNAME\srvSQLreport
  • setspn -A MSSQLSvc/SVSPREPORT1.domainname.local DOMAINNAME\srvSQLreport
  • setspn -A MSSQLSvc/SVSPREPORT1.domainname.local:1433 DOMAINNAME\srvSQLreport

The other thing I have not set my Central Admin Console up to use Kerberos yet. only a few Web Applications. Anyways for will be a good reason but this solved my issue and hopefully yours if your reading this because you got similar problems.


Three strikes your out, DisableLoopBackCheck

Here’s an oldie but a goldy, cause it’s still their and as far as I know of it’s not a SharePoint issue but something of IIS.

Here’s the problem: If your trying to login to a site and you’re promped for a user name and password and full of enthausiasm you enter the credentials, one, two and THREE and boom theirs the with screen on the end of the tunnel. IE or any other browser is giving you the cleanest web site ever cause it’s completly blank.

To solve this you need to add a registry key to all the web front end servers in your farm.

  1. Open the Registry editor, Start >> Searchbox >> Regedit (make a SnapShot or registry export first).
  2. Go here,HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
  3. Add a new DWORD vallue and name it DisableLoopBackcheck.
  4. Enter the new DWORD key and give it a value of 1.
  5. With every registry change you need to reboot your server and beware all clients will be thrown off.

When you test it you see it’s working but maybe your site continues loading and loading forever.
In that case it’s not yet added to the trusted site zone of your browser.

Check this Microsoft KB article for more info about the issue,  http://support.microsoft.com/kb/896861

Update

Recently I found the PowerShell equivalent to disable the LoopBackCheck for the double hop problem. So I just copy and paste the script reboot and ta daaaaa, it’s working.

Just open PowerShell and add the SharePoint snap-in Add-PSsnapin Microsoft.SharePoint.PowerShell

No run the script below and reboot your system.
New-ItemProperty HKLM:\System\CurrentControlSet\Control\Lsa -Name “DisableLoopbackCheck” -value “1” -PropertyType dword


The trail period for this product has expired

A moment a go I was toying around on my home portal and created some nice trouble for myself. I made some site collections with host headers and all seamed to work. Then I installed Office Web Apps and when I tried to activate the feature on the site collection I got an error saying file not found.

huh………….

Than I tried opening my portal and got the error as shown below, Double huh……………    😦

I removed my host headers and I could access the site again only stil “File not Found” when I tried to activate the feature. When I adjusted the AAM (Alternate Access Mapping) I could activate the office Web Apps feature smoothly.

Only now I want my host headers back. After filling them out again I got “The trail period for this product has expired” message again. But I never installed any trails or what so ever (triple hun…….).

After a walk with the dog and some fresh Google energy I found a temp solution.

  1. Add the Pool accounts for the web applications using host headers to the BUILDIN\Administrators (group, local).
  2. You will get a new error in the health analyzer, saying you use pool accounts in the local admin group but you just have to find a way to life with it or take a beer or 12 a day to coop it.
  3. Then you need to iisreset /noforce, pray and start to smile again.

 

Problem solved, up to the next one.