Category Archives: MOSS 2007

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


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

 

 

 

 

 


InfoPath form cannot be displayed because sessionstate is not available

Yesterday I had to place an InfoPath 2003 form on a MOSS 2007 farm. Everything seemed to be configured correctly. Accept after publishing I found the newly created form library and the form but when I tried to open it I was spoiled with a nice error message in a soft lightgray kind of way. It could have been red cause an error is an error people light gray or not it was not going to work.

Error Message
The form cannot be displayed because session state is not available.

 

Solution
The solution to fix this is simple, in the web.config of your site collections you find the SessionStateModule commented. just uncomment >> iisreset /noforce (so do this outside office hours 🙂 ) and you are up and running again.

To find this section just use ctrl+F and search on HTTPModules

 

Before

After

 

I have not checked it in SharePoint 2010 but I think it’s default already as it should be.

 

 


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


Clearing the SharePoint configuration cache

Sometimes it happens that things just don’t run as they did before. I experience this a lot on MOSS 2007 farms which only have SP2 and nothing else. Most of the time stopping and starting Windows Services help to fix the problem only their are always exceptions 🙂

Before you try the megical reboot who solves weird problems alot you can check two more things because you can not just reboot during office ours but want to solve the problem a.s.a.p. right?

  • Check the disk space of your SQL server or LUNS
  • Clear the SharePoint configuration cache

Steps

When your clearing the cache nobody will notice because you can do it really quick. The only thing it affecs are the SharePoint Timer Jobs which you have to disable in the windows services.

Anyways here’s how to do it.

  1. Open the Windows services (services.msc) and open this screen for as many servers as you have.
  2. Choose connect to another server at the actions option in the pull down menu and establish the connection (just put them side by side with flag +Windows key).
  3. Stop the Windows SharePoint Service Timer on all servers.
  4. Open the following folder on all servers \\HOSTNAME\Documents and and Settings\All Users\Application Data\Microsoft\SharePoint\Config\GUID\
  5. Use ctrl+a to select all files scroll till you see a small file (in character length) cache.ini and by pressing ctrl + klik with the mouse one file is deselected. and you can delete all (So not the cache.ini file 🙂 !!!).
  6. Open the chache.ini with notepad and replace the random number with “1” and save the file.
  7. Do this on all servers and the moment you start the Timer service again the cache files will be appearing again.

Hopefully this trick solved your problem if not it’s back to the drawing board.


0x80040E14 – Mysterious error

 

Yesterday my client was doing some testing on his Acceptation environment and as everything was working proper he came to my desk with a smile and frowning eyebrows.

The error he got was some kind of 0x80040E14 error so I presume it got something to do with authorizations. After hitting strait to  Google I found all kind of WSS 2.0 answers that where completely bogus. So I came back to checking the things which I should have done first anyways, “Like Logs and disc space“.

The reason for this error was that the Log directory from the SQL server run out of disc space on our SAN and because it’s an Acceptation environment it was not being monitored by anyone. I guess it turns out I will adopt this system for the future, As our storage guy said it is not necessary to monitor????

 

 

 


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


How to extract Cumulative Updates and Service Packs

At the moment I’m preparing for a new initial installation and I know it’s smart to slipstream the service packs, cumulative updates and language packs. So below you find the switches on how to extract the files.

Steps
  1. Extract the downloaded service pack or cumulative update to an easy folder in the root. Like, C:\abc
  2. make a folder in abc like unpacked (C:\abc\Unpacked).
  3. Open a command prompt, go to the easy folder (source) and type

    PackageName-KB12345-x64.exe /x:C:\abc\Unpacked

  4. or if it doesn’t work (it depents on the CU or SP)try this.

    PackageName-kb12345-x64-fullfile-en-us.exe /extract:C:\abc\Unpacked

  5. A small window will popup show the package is extracting.
  6. Now you can copy the *.msi’s to the update folder inside the setup binary files or run it by hand.

     

     


How to modify the default index location search

Normally when you configure the SSP on MOSS 2007 the default path is set to C:\Program Files\Microsoft Office Servers\12.0\Data\Office. Only in some occasions you would like to change this path, for example if you want to put it on a different volume with cheaper storage (not like a D:\ partition on the same disc).

I came a cross a portal where they managed to split the default indexing location on drive C:\index and D:\index both on the same disk. I wonder how, the why I don’t even dare to imagine.

To do this I did the following steps 
  1.  I checked the Windows search service, for the account and if it was started.
  2. Same for the Office SharePoint Search Service in the Central Admin Console.I made some screen shots just in case. Now I know what I’m up to here are the ingredients.
  3. The index location has to be set on to different places the OSEARCH and the SSP. Below you find the STSADM commands. Don’t forget the little quotes sometimes you need them and sometime not.

    stsadm -o osearch -defaultindexlocation “C:\Program Files\Microsoft Office Servers\12.0\Data\Office”

    stsadm -o editssp -title Sharedservices1 -ssplogin DOMAIN\account -ssppassword <xxxxxxx> -indexserver <HOSTNAME_SERVER> -indexlocation “C:\Program Files\Microsoft Office Servers\12.0\Data\Office”

  4. After all this I performed an iisreset /noforce and checked my handy work and if the portal was still doing all her cool stuff.

Hell yeah, yet another dragon slayed !!


Cluttered Diagnostic Logging settings

I’m maintaining a portal to which more people than just me used to have access. The result is that a lot of settings are weird and strange errors are coming from lots of diffrent places. We had an issue with the Windows SharePoint Timer service which was spontaneously stopping constantly and I fix it by using this stsadm command.

stsadm -o updatefarmcredentials -identitytype configurableid -userlogin DOMAIN\service_account -password *******

The result was positive and everything works like a dream again, except…………

The next morning I noticed that from a certain moment in the night my Trace Logs where growing enormously. The only thing is that it was logging just information and no special errors or something. Then I noticed that the Diagnostic loging settings (CentralAdmin) where changed from the defaults so many times nobody knew the original settings anymore.

Normally you change the settings for a reason, do your troubleshooting magic and return the settings to the original. But not everybody is doing a proper job in maintaining the settings. Their for theirs a brilliant stsadm command to just reset your Diagnostic logging settings to the default.

stsadm -o setlogginglevel -default

It’s also possible just to reset a category by adding a special category switch.

 


How to enable the SharePoint Stack Trace

Sometimes SharePoint can be a little bit of a pain as it gives you a nice generic error message like “Unexpected Error occurred“, but it won’t give you any clue what’s actually going on. Of course you already checked the SharePoint Trace Logs with or without the help of our friendly neighborhood ULS viewer. But there’s another clue you can reveal, The Stack Trace.

 Steps

  1. Go to the web.config of the site that gives you the error (somewhere in C:\inetpub\…….).
  2. Make a copy of the web.config and start editing the original.
  3. Use Ctrl + F to search for SafeMode MaxControls and change the word false in to true.<SafeMode MaxControls=”200″ CallStack=”true” DirectFileDependencies=”10″ TotalFileDependencies=”50″ AllowPageLevelTrace=”false”>
  4. Use Ctrl + F again to search for customErrors and change the word On in to Off.
  5. Safe the web.config and do an iisreset /noforce.
  6. Reproduce the error and try solving the nice ASP error you received.

 

Example of a nice generic SharePoint Error

Example of a ASP error whit the Stack Trace enabled