Sysadminsblog.com Anything for sysadmins!

10May/110

Can’t edit all code on a SharePoint 2010 page with SharePoint Designer 2010

One of the most basic things you would want to do with SharePoint Designer 2010 is editing the layout of the page. This seems easy enough, but when SharePoint Designer 2010 blocks access to the yellowish parts of the code it becomes quite impossible.

To gain access to all of the page's code you'll have to enable the advanced mode. The button can be found in the ribbon when editing a page.

24Mar/113

Event 1004, 1001, 1015 – Microsoft.ResourceManagement.Service.exe

While setting up the User Profile Synchronization services on SharePoint 2010 I had a couple of warnings and errors that I had to address. This one seemed worth mentioning.

Detection of product '{90140000-104C-0000-1000-0000000FF1CE}', feature 'PeopleILM', component '{1C12B6E6-898C-4D58-9774-AAAFBDFE273C}' failed.  The resource 'C:\Program Files\Microsoft Office Servers\14.0\Service\Microsoft.ResourceManagement.Service.exe' does not exist.

Followed by event 1001:

Detection of product '{90140000-104C-0000-1000-0000000FF1CE}', feature 'PeopleILM' failed during request for component '{9AE4D8E0-D3F6-47A8-8FAE-38496FE32FF5}'

And event 1015:

Failed to connect to server. Error: 0x80070005

These were repeated for another component GUID.

The reason is that the WMI calls are made under the credentials of Network Service account and that this account doesn't have permissions on the folder indicated in the event.

After I gave the Network Service account read and execute permissions on the folder the events didn't reappear.

Update:

After a couple of hours I noticed new events in the event viewer related to the previously mentioned.

Event 1004:

Detection of product '{90140000-104C-0000-1000-0000000FF1CE}', feature 'PeopleILM', component '{CF90B971-D78A-4794-8F90-EB5FB5028DDA}' failed.  The resource 'C:\Program Files\Microsoft Office Servers\14.0\SQL\DatabaseSettings.sql' does not exist.

Event 1001:

Detection of product '{90140000-104C-0000-1000-0000000FF1CE}', feature 'PeopleILM' failed during request for component '{9AE4D8E0-D3F6-47A8-8FAE-38496FE32FF5}'

22Mar/110

Event 8193 – Volume Shadow Copy Service error

SharePoint Search has its issues sometimes. This one seems to happen to a lot of people, but the solutions that I've found weren't too clear about what to do to solve this. Here's the event that is triggered.

 Volume Shadow Copy Service error: Unexpected error calling routine RegOpenKeyExW(-2147483646,SYSTEM\CurrentControlSet\Services\VSS\Diag,...).  hr = 0x80070005, Access is denied.
</p><p>Operation:
</p><p>   Initializing Writer
</p><p>Context:
</p><p>   Writer Class Id: {0ff1ce14-0201-0000-0000-000000000000}
</p><p>   Writer Name: OSearch14 VSS Writer
</p><p>   Writer Instance ID: {07c936a8-347c-4e39-8014-2a057f611382}
</p><p>

If you go to the Details tab, you'll see some additional information about the event.

The part after User and Name is the most important here, which I've blurred for security reasons. This is the account name that needs full control on the registry key HKLM\SYSTEM\CurrentControlSet\Services\VSS\Diag.

  1. Start regedit.exe
  2. Navigate to the key HKLM\SYSTEM\CurrentControlSet\Services\VSS\Diag
  3. Right-click the key Diag and select Permissions
  4. Add the account that was indicated in the event and provide it with Full control permission
22Mar/116

Unable to edit the DCOM settings

Recently I had a couple of DCOM errors in my event log for APPID {61738644-F196-11D0-9953-00C04FD919C1} (IIS WAMREG admin Service. It was again a classic case of Local Activation permissions that were missing. Normally one would fix that by going to DCOMcnfg.exe and editing the settings as indicated in this article. However this time it was a bit different as the settings were disabled.

Obviously this is a permission problem. The solution is to do the following:

  1. Run Regedit.exe and browse to "HKEY_CLASSES_ROOT\AppID\{61738644-F196-11D0-9953-00C04FD919C1}" key
  2. Right-click the key and select Permissions
  3. Click the Advanced button in the permissions window and select the Owner tab. Under Change owner select the local Administrators group and click on OK.
  4. Then on the permissions window, select the local Administrators group and assign it Full Control. Don't change the permissions for the TrustedInstaller account.
  5. Click on Apply (keep this window open as you'll have to restore the permissions when you're done)
  6. Rerun the DCOMCNFG.exe. You should now be able to change the DCOM settings for the IIS WAMREG admin service.
  7. Go back to the permissions window of the registry key and remove the check in Full Control of the local Administrators group (this results in only Read permissions)
  8. Go to the Owner tab and make "NT Service\TrustedInstaller" of the local computer owner of the key again.

Quite a hassle, but it works!

15Mar/110

Activating Office Web Apps on SharePoint 2010

After installing Office Web Apps I tried to activate the Site Collection Feature, which gave the descriptive error: File not found. Thankfully Tonys did know what to do with this problem as described here.

The event viewer returns errors about the Alternate Access Mappings that hasn't been configured yet and that users are accessing the site through unregistered URLs. To fix this add the URL that is indicated, and the activation of the Office Web Apps Site Collection Feature will go through smoothly.

Hope this helps someone!

23Nov/109

Creating a new list in SharePoint 2010 using PowerShell

One of the best new features of SharePoint 2010 is the ability to manage most aspects of SharePoint with PowerShell. A good example of this is creating new lists on sites.

To create a new list you'll first have to figure out how to tell SharePoint which template to use. Here's how you can show all template possibilities:

 $SPAssignment = Start-SPAssignment
</p><p>$SPWeb = Get-SPWeb http://localhost -AssignmentCollection $spAssignment
</p><p>$SPWeb.ListTemplates | Select Name, Description

You can use any of the templates returned on that site. To create a list you can use the Add() method:

 $SPTemplate = $SPWeb.ListTemplates["Custom List"]
</p><p>$SPWeb.Lists.Add("List Title","Description",$SPTemplate)

If you want to perform a different action on a list please use

$SPWeb.Lists | Get-Member

to find out what command to use.

To dispose of all the objects that have been called, just run

Stop-SPAssignment $SPAssignment

19Nov/103

User Profile Service: An update conflict has occurred, and you must re-try this action

I was trying to enable the SharePoint 2010 User Profile Service but of course I ran into an error when I tried to start the User Profile Synchronization Service.

ULS

Microsoft.SharePoint.Administration.SPUpdatedConcurrencyException: An update conflict has occurred, and you must re-try this action. The object UserProfileApplication Name=User Profile Service Application was updated by [User], in the OWSTIMER (3456) process, on machine [Server]

Event Viewer

EventID: 6398

An update conflict has occurred, and you must re-try this action. The object SearchDataAccessServiceInstance was updated by [User], in the OWSTIMER (1756) process, on machine [Server Name].

There are a couple of things that you can try to resolve this problem:

  • Make sure that the SharePoint Farm account, which is created during the SharePoint Farm setup, is a member of the local Administrators group where the User Profile Synchronization service is deployed.
  • Make sure that the SharePoint Farm account is able to log on locally on the server where User Profile Synchronization is deployed.
  • If you're using a Windows Server 2003 AD DS forest, the Service Administrator account must be a member of the Pre-Windows 2000 Compatible Access group for the domain with which you are synchronizing.
  • Clear the file system cache on all servers in the server farm on which the Windows SharePoint Services Timer service is running.

To clear the file system cache please refer to KB939308 or read below.

  1. Stop the Timer service. To do this, follow these steps:
    1. Click Start, point to Administrative Tools, and then click Services.
    2. Right-click Windows SharePoint Services Timer, and then click Stop.
    3. Close the Services console.
  2. On the computer that is running Microsoft Office SharePoint Server 2007 and on which the Central Administration site is hosted, click Start, click Run, type explorer, and then press ENTER.
  3. In Windows Explorer, locate and then double-click the following folder:

    Drive:\Documents and Settings\All Users\Application Data\Microsoft\SharePoint\Config\GUID

    Notes

  • The Drive placeholder specifies the letter of the drive on which Windows is installed. By default, Windows is installed on drive C.
  • The GUID placeholder specifies the GUID folder.
  • The Application Data folder may be hidden. To view the hidden folder, follow these steps:
    • On the Tools menu, click Folder Options.
    • Click the View tab.
    • In the Advanced settings list, click Show hidden files and folders under Hidden files and folders, and then click OK.
  • In Windows Server 2008, the configuration cache is in the following location:

    Drive:\ProgramData\Microsoft\SharePoint\Config\GUID

  • Back up the Cache.ini file.
  • Delete all the XML configuration files in the GUID folder. Do this so that you can verify that the GUID folder is replaced by new XML configuration files when the cache is rebuilt.

    Note When you empty the configuration cache in the GUID folder, make sure that you do not delete the GUID folder and the Cache.ini file that is located in the GUID folder.

  • Double-click the Cache.ini file.
  • On the Edit menu, click Select All.
  • On the Edit menu, click Delete.
  • Type 1, and then click Save on the File menu.
  • On the File menu, click Exit.
  • Start the Timer service. To do this, follow these steps:
  1. Click Start, point to Administrative Tools, and then click Services.
  2. Right-click Windows SharePoint Services Timer, and then click Start.
  3. Close the Services console.

Note The file system cache is re-created after you perform this procedure. Make sure that you perform this procedure on all servers in the server farm.

  1. Make sure that the Cache.ini file in the GUID folder now contains its previous value. For example, make sure that the value of the Cache.ini file is not 1.
  2. Click Start, point to Programs, point to Administrative Tools, and then click SharePoint 3.0 Central Administration.
  3. Click the Operations tab, and then click Timer job status under Global Configuration.
  4. In the list of timer jobs, verify that the status of the Config Refresh entry is Succeeded.
  5. On the File menu, click Close.

19Nov/102

This report failed to load because session state is not turned on

Like I said in one of my comments, I'll be posting some about SharePoint 2010. Here's the first.

I ran into an issue when checking out the new Asset Web Database site template. When I tried to access the reports I was confronted with the error "This report failed to load because session state is not turned on".

After some googling I found the answer. Because I installed SharePoint 2010 as a standalone server the Session State Service was not enabled. To enable the Session State Service you have to run the Enable-SPSessionStateService cmdlet in the SharePoint 2010 Management Shell. This will create a database with the name that you need to provide in the command line or after it's asked. After doing an iisreset you should be good to go.

16Jul/106

File name, length and character restrictions for SharePoint

What are the file name restrictions of the document libraries, link lists, etc? It's not really a question that I get regularly, but when it comes up I'll have to look for it as I don't know it from the top of my head. Here's a list of general restrictions.

  • File and folder name lengths can't exceed 128 characters in both WSS 2.0 as WSS 3.0
  • Link list items can't exceed 256 characters
  • The entire path of files can't exceed 260 characters

File and folder name restrictions:

  • Can't be longer than 128 characters
  • Can't use: ~ # % & * { } \ : < > ? / + | "
  • Can't use the period character consecutively in the middle of a file name (blah…blah.docx)
  • Can't use the period character at the end of a file name
  • Can't use the period character at the start of a file name
  • Can't end with:
    • .files
    • _files
    • -Dateien
    • _fichiers
    • _bestanden
    • _file
    • _archivos
    • -filer
    • _tiedostot
    • _pliki
    • _soubory
    • _elemei
    • _ficheiros
    • _arquivos
    • _dosyalar
    • _datoteke
    • _fitxers
    • _failid
    • _fails
    • _bylos
    • _fajlovi
    • _fitxategiak

The same goes for site, subsite and site group names.

There are a couple more restrictions like size, but that's quite dependent on the server configuration. You can check this blog post for more information about that.