Showing posts with label MOSS 2007. Show all posts
Showing posts with label MOSS 2007. Show all posts

Wednesday, September 08, 2010

Where's Hannah? Autumn 2010.

I am currently working on a new creative project in the West of England - visit my Art Forms website for more details: http://www.hannahscott.com

If you want to get in touch regarding SharePoint or web design please visit my professional website, which includes a full client list and examples of previous work: http://www.bytelab.co.uk

Last summer I drove 10,000 miles from Hyde Park, London to Ulaanbaatar, Mongolia. For more information and to find out what happened visit my website: http://www.drivingdotty.com

After Mongolia I travelled overland through China, Tibet, SE Asia, India, Nepal & the US. Check out my travel blog here: http://outofoffice.bytelab.co.uk

Wednesday, April 01, 2009

Connecting PPS to MOSS Sub Site Master Pages

When you deploy a dashboard from Performance Point Server you have the option of choosing which master page you want to use. By default you will see all the master pages in the SharePoint master page gallery of the site collection you are publishing too.



If you are in a subsite of your portal unless you have copied your custom master pages to the site collection master page gallery you will only see the default.master in the PPS dropdown since this is the only master page in the subsite master page gallery.

For example:
To solve this simply copy your custom master page to the subsite master page gallery.

Friday, March 27, 2009

Adding users to Project Server PWA site

To grant users access to the PS PWA site they need to be added via the Server Settings / Manage Users page in the PWA site. Simply adding them through Site Settings / Advanced Permissions will not work.








Installing Project Server 2007 on an existing MOSS farm with Kerberos enabled

I have a medium server farm running MOSS 2007. There are three servers (2 WFE, 1 Index & 1 SQL).

Note - Project Server cannot be uninstalled from a joint MOSS / PS installation

To install Project Server 2007:
  1. Copy Project Server installer on to each server - i put them in C:\Temp
  2. Quiesce the MOSS farm via Central Administration / Operations
  3. Run the PS install files on each server in the farm
  4. Unquiesce the farm
  5. Run the MOSS configuration wizard on each server one by one
Start the Project Server Service:
  1. Open Central Administration and select the Operations tab
  2. Select Services on Server
  3. Select the server you want to run the Project Server service
  4. If the Project Server Service is not dispayed change the server role to Custom



  5. Start the Project Server service
Provision the Project Server site:
  1. Open Central Administration and navigate to Shared Services Administration
  2. Open the SSP that on to which you want to provsion Project Web Access (PWA)



  3. On the SSP homepage select Project Web Access Sites
  4. Select Create Project Web Access Site



  5. Select the MOSS web application to host the PWA
  6. Assign a PWA path for example: projectserver
  7. Assign the Administrator Account for the PS instance
  8. Assign the primary database SQL server
  9. Name the four PS databases
  10. Click OK
  11. When provisioning is complete Provisioned will appear in the status column - to refresh the status click Refresh Status



  12. To enable access you must ensure that you have registered the server SPNs for Kerberos delegation and for the web application process accounts. Until you do this you will get an access denied error when you try to access the PWA site.

Thursday, February 12, 2009

A theme with the name "CustomMySite 1011" and version already exists on the server.

You receive this error when trying to apply a custom theme to your SharePoint site:

"A theme with the name "CustomMySite 1011" and version already exists on the server. "
  1. Open your site in SharePoint Designer.
  2. Expand _themes and delete the CustomMySite theme folder
  3. Re-apply the custom theme to your site.

Thursday, January 15, 2009

Enabling MOSS Anonymous Access

  1. From Central Administration > Application Management > Application Security > Authentication Providers, select a Web application and the zone you want to modify. This is usually default.

  2. In the middle of the page, check Enable Anonymous Access and choose Save

  3. All site collections in that Web application can now have anonymous access enabled.

  4. Go to a site collection in the Web application you just enabled anonymous access for

  5. From Site Actions > Site Settings, open Advanced Permissions

  6. From the Settings drop-down menu, select Anonymous Access

  7. For this example, enable anonymous access for Lists and Libraries and click OK

  8. Browse to any document library in this site collection

  9. From the Settings drop-down menu, select Document Library Settings

  10. In the Permissions and Management column, select Permissions for this document library

  11. From the Actions menu, select Edit Permissions to break inheritance

  12. From the newly appeared Settings drop-down menu, select Anonymous Access

  13. Check View Items and click OK.

Monday, January 12, 2009

Issues after restoring MOSS to a previous VM snapshot

We restored our VM MOSS farm this morning from a snapshot taken a couple of months ago. Various issues occurred. Please note i am still working through some of the errors and will update this post as i find the answers.
  1. I could no longer login to the server because the snapshot was older than 30 days - the computer account for the server had expired and so needed to be reset and reconnected to the domain. See this blog for steps to fix this.
  2. The MOSS environment although appearing correct in Central Administration was not configured in IIS. The Central Administration site was the only site appearing in IIS even though all the web applications were still there.

    To fix this:

    1. Delete the old web application using Central Administration.
    2. Delete all the SSP web apps & DBs, apart from the default SSP which cannot be deleted.
    3. Recreate the web applications with Temp DB names.
    4. Recreate the SSPs with new DBs.
    5. Change the default SSP to one of the newly created SSPs, then delete the original default SSP inc DB, then recreate it's web app and set back to the default updating any associations as required.

      At this point I ran in to some issues recreating the SSP with the following errors. First of all the SSP failed to provision with the error:

      Provisioning failed: A transport-level error has occurred when sending the request to the server.

      Looking in the Event Log i found the following related errors:

      Event ID 5554
      Failure during sweep synch. Exception was A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.).

      Event ID 7888
      A runtime exception was detected. Details follow.
      Message: A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)

      Event ID 5586
      Unknown SQL Exception 10054 occured. Additional error information from SQL Server is included below.

      A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)

      Solution:
      http://social.msdn.microsoft.com/forums/en-US/sqldatabaseengine/thread/0671c03b-5488-4be4-bc5a-579849fa0950
      Reboot the server and kill any remaining connections (delete the Admin accounts from local users & groups, reboot, add the Admin accounts back in).

      Also in the event log were the following errors:

      Event ID 10016
      The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID
      {3D42CCB1-4665-4620-92A3-478F47389230}


      Solution:
      http://sharemypoint.wordpress.com/2007/12/18/error-event-id-6398-and-6482-about-security-rights-of-osearch-service/
      Add the WSS_WPG, WSS_ADMIN_WPG, Search & Admin accounts to the OSearch DCOM Servic
      e

      Event ID 6141
      The site /ssp/admin could not be created. The following exception occured: This page has encountered a critical error. Contact your system administrator if this problem persists.


      Event ID 6610
      Safe mode did not start successfully. This page has encountered a critical error. Contact your system administrator if this problem persists.

      Event ID 5629
      Failed to load the SafeControl assembly paths for web.config. C:\Inetpub\wwwroot\wss\VirtualDirectories\ssp180


      Error importing WebPart. Assembly Microsoft.Office.Server.Search, Version=OAssemblyAssemblyVer, Culture=neutral, PublicKeyToken=OAssemblyPublicKey, TypeName. Microsoft.Office.Server.Search.WebControls.ActiveCrawls

    1. I deleted the SSP web apps again.
    2. Stop the search query & index services.
    3. Start the search query & index services.
    4. Restart IIS.
    5. Recreate the SSP web app.
    6. Recreate the SSP & set back to default with any associations required.

      Success - the SSP provisioned correctly.

    1. Restore the DB from by opening the Content Database page in Central Administration. Delete the Temp DB then in STSADM associate the original DB:

      cd C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN

      stsadm.exe -o addcontentdb -url http://portal -databasename MOSS_MyDB_WSS_Content -databaseserver MyServer


  3. If you receive the error 'An unexpected error has occured' open the web.config and update as follows:
    http://blog.thekid.me.uk/archive/2007/02/15/a-solution-to-quot-an-unexpected-error-has-occurred-quot-in-wss-v3.aspx
    1. Change <SafeMode MaxControls=“200“ CallStack=“false“ to <SafeMode MaxControls=“200“ CallStack=“true“…>
    2. Set custom errors to 'Off' <customErrors mode=“Off“/>

Friday, January 09, 2009

Adding New SSP Administrators

http://blogs.msdn.com/sgoodyear/archive/2007/06/20/adding-new-ssp-administrators.aspx

When you add a new user account to the SSP site, even if you grant them Full Control permissions or add them as a Site Collection Administrator, initially they will experience access denied error messages when they click on any of the following links on the SSP Admin page:

* User profiles and properties
* Profile services policies
* My Site settings
* Personalization services permissions
* Audiences
* Import application definition
* Business Data Catalog permissions

These sections need to have permissions explicitly set. Initially, the setup account will have full access to the SSP, so use that account to grant rights to new SSP administrators you wish to delegate SSP administrative duties to.

Notice the items highlighted in bold in the list above. These are where you assign the remaining SSP permissions. Adding new SSP administrators to the "Personalization services permissions" section and granting appropriate rights will grant rights related to the first five links in the list above. Repeating the process in the "Business Data Catalog permissions" section will grant rights related to the last two links.

At this point, the new SSP administrator has all the appropriate access permissions they need to administrate the SSP.

Monday, November 10, 2008

Event ID 0 - The description for Event ID ( 0 ) in Source ( .NET Runtime ) cannot be found

The Problem:

Event ID 0

The description for Event ID ( 0 ) in Source ( .NET Runtime ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Unable to open shim database version registry key - v2.0.50727.00000.


The Solution:

KB918642 - A .NET 2.0 application may require Read/Write permission to a registry

Download the hotfix and apply to the server displaying the error - in my case this was the Index server.

Event ID 7888

The Problem:

I found the following error on my Index Server:

Event ID 7888

A runtime exception was detected. Details follow.
Message: Access Denied! Only site admin can access Data Source object from user profile DB.

Techinal Details:
System.UnauthorizedAccessException: Access Denied! Only site admin can access Data Source object from user profile DB.
at Microsoft.Office.Server.UserProfiles.SRPSite.
AdminCheck(String message)

at Microsoft.Office.Server.UserProfiles.DataSource.
_LoadDataSourceDef(IDataRecord rec)

at Microsoft.Office.Server.UserProfiles.DataSource.
_LoadDataSourceDef(String strDSName)

at Microsoft.Office.Server.UserProfiles.
DataSource..ctor(SRPSite site, Boolean fAllowEveryoneRead)

at Microsoft.Office.Server.UserProfiles.
DataSource..ctor(SRPSite site)

at Microsoft.Office.Server.UserProfiles.
UserProfileConfigManager.GetDataSource()

at Microsoft.Office.Server.UserProfiles.
BDCConnector.RefreshConfiguration(String sspName)


The Solution:

  1. Open your SSP and navigate to Personalization Services Permissions.
  2. Select Add User and add your SSP process account with Manage User Profiles permissions.


Crawl Scheduling Error - Access Denied

When you set up your SSPs one of the things you will come across is Crawl Scheduling. This comes under Search Settings and allows you to configure Incremental Crawls and Full Crawls to the frequency you would like. For example, Full crawl once a day, Incremental Crawl every 5 minutes of each day.

The problem:

I received an error whilst building a new farm this week when trying to set the Crawl Schedules.


















When I hit Ok I received the error:

ACCESS is DENIED. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))


The Solution:

To fix this you need to add the account WSS_WPG to the C:\Windows\Tasks folder on your Index server and apply modify rights.



If you cannot see the Security tab on the Tasks folder you need to open a command prompt and type is:

attrib -s %windir%\tasks

When you right click on the tasks folder having done this you should be able to see the Sharing & Security option.

To remove the option once you have applied the changes to the folder open command prompt again and type:

attrib +s %windir%\tasks

Thursday, November 06, 2008

Moving SharePoint Database Data and Log Files

1. Quiesce the Farm
2. Backup all of the databases that you are looking to move.
3. Turn off SharePoint Services (via Services console) to stop the connections to the databases
a. Office SharePoint Search Service
b. Windows SharePoint Services Administration
c. Windows SharePoint Services Search
d. Windows SharePoint Services Timer
e. Windows SharePoint Services Tracing
f. World Wide Web Publishing Service
4. Detach the databases that need to be moved.
5. Navigate to where the data and log files are stored and copy them to your destination.
6. Reattach your databases.
7. Restart your services.
8. Un-quiesce the farm.

Tuesday, November 04, 2008

Changing MOSS service accounts & passwords

I have been preparing some servers for a bunch of testing with PerformancePoint Server (more to follow on this later) which required me to change our MOSS service accounts. Reading around the steps to update these credentials appeared pretty straight forward but as usual MOSS' idiosyncrasies were all to apparent. Here's what i did and how i managed to solve the issues that arose. Hope it helps someone else with the same challenge.

The accounts to be changed were as follows:
  1. old_moss_admin ----> new_moss_admin
  2. old_ssp_ap ---->new_ssp_ap
  3. old_ap1_process ---->new_ap1_process
I followed the following MS KB instructions: 'How to change service accounts and service account passwords in SharePoint Server 2007 and in Windows SharePoint Services 3.0'

1. MOSS Admin Account Update

To update the account old_moss_admin to new_moss_admin:
  1. Update the password for the account that is used by the Central Administration application pool. To do this, follow these steps:

    1. On all servers in the server farm, open a command prompt, type the following line, and then press ENTER:
      cd %commonprogramfiles%\Microsoft Shared\Web server extensions\12\Bin

    2. On the server that hosts the Central Administration Web site, type the following line at the command prompt, and then press ENTER:
      stsadm -o updatefarmcredentials -userlogin DomainName\UserName -password NewPassword

    3. On all other servers in the server farm, type the following line at the command prompt, and then press ENTER:
      stsadm -o updatefarmcredentials -userlogin DomainName\UserName -password NewPassword -local

    4. Restart Microsoft Internet Information Services (IIS) 6.0. To do this, type the following line at the command prompt, and then press ENTER:
      iisreset /noforce

  2. Verify that the Administration Application Pool Credential Deployment job definition is no longer displayed on the Timer Job Definitions page of SharePoint 3.0 Central Administration. To do this, follow these steps:

    1. Open SharePoint 3.0 Central Administration, click Operations, and then click Timer job definitions under Global Configuration.

    2. Verify that the Administration Application Pool Credential Deployment job definition is no longer displayed in the list.
Error: My Central Administration is now no longer available with the error: 'Service Unavailable'
  • I checked & retyped the password in CA web app pool.
  • I checked the WSS_WPG, WSS_RESTRICTED_WPG and WSS_ADMIN_WPG local groups on each of the servers - all seemed to be up to date.
  • Restarting the CA web app pool makes no difference.
At this point i rolled back to the previous credentials. I then tried again from the start following the same steps above. Result - my Central Administration was still unavailable with the error: 'Service Unavailable'
  • I checked the IIS_WPG local group on each server. The new_moss_admin account was not updated so i added it to the group.
I then discovered a couple of DCOM errors in the System Event viewer.
  1. I updated the new CA account 'new_moss_admin' to:

    • IIS Admin Service
    • IIS WAMREG Admin Service

  2. Restarted IIS.
Success: Central Admin is up and running again.

2. SSP Account Update

To update the SSP account old_ssp_ap to new_ssp_ap:

Attempt 1 - The wrong way...
  1. Open Central Administration
  2. Navigate to the Operations page
  3. Select Service Accounts
  4. Select the radio button Web app pool
  5. Select the web service - WSS Web App
  6. Select the App Pool - SSP1
  7. Select the radio button Configurable
  8. Input the new credentials
  9. Ok
  10. Restarted IIS on both my servers
Error: This had no effect other than stopping me from accessing the SSP. Checking in IIS the account was not updated to the new credentials. I then tried to update the accout via IIS but this had noeffect either and on opening the App Pool properties again i discovered that the account credentials had changed themselves back to the old account.

Attempt 2 - The right way...

I then tried a different approach:
  1. Open Central Administration
  2. Navigate to the Shared Services Aministration homepage
  3. Hover over SSP1's title and select Edit Properties from the drop down.
  4. Scroll down to SSP Server Credentials
  5. Delete the old credentials and input the new account username & password
  6. Ok
  7. I then changed the SSP to be the default SSP.
  8. Open Compnent Services and update the DCOM services IIS Admin & IIS WAMREG with the new account.
  9. Restarted IIS on both my servers.
Checking IIS the account was still not updated to the new credentials and i still could not access the SSP website.

Success: 10 minutes later having searched on Google again and felt thoroughly annoyed at there being no pages I hadn't yet read on this topic I checked the SSP website again and it worked! Checking IIS the accounts have now updated to the new credentials.

At this stage I discovered some new errors in the Event View
  1. Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchServiceInstance (5d77cabf-3414-40cc-a5ef-f30226a9288b).

    Reason: The program attempted to update an object that was updated by another user.

  2. Eventid 6482 - Reason: Access to the path 'C:\WINDOWS\system32\drivers\etc\HOSTS' is denied.

    This error was now occuring every minute.

    The solution to this (and the previous error) can be found in my previous post here: http://bytelab.blogspot.com/2008/02/sharepoint-search-service-cannot-find.html

3. Application Pool Process Accout Update

To update the web app pool process account old_ap1_process to new_ap1_process:
  1. Open Central Administration
  2. Navigate to the Operations page
  3. Select Service Accounts
  4. Select the radio button Web app pool
  5. Select the web service - WSS Web App
  6. Select the App Pool - MOSS Portal
  7. Select the radio button Configurable
  8. Input the new credentials
  9. Ok
  10. Open Compnent Services and update the DCOM services IIS Admin & IIS WAMREG with the new account.
  11. Restarted IIS on both my servers
Success: All updated and working ok.

************************************************************

Useful web sites i visited for this:

Thursday, October 30, 2008

InfoPath Forms Services best practices

This comes from: http://technet.microsoft.com/en-us/library/cc261832.aspx

Updated: 2006-12-01

We recommend that you follow these best practices when managing your InfoPath Forms Services environment.

Document limit of 2,000 in Windows SharePoint Services document libraries

If a form template will be filled out and submitted more than 2,000 times in total, you should either write code in the form template to submit to a database by using a Web service, or create a custom submit function that places forms into multiple libraries. This is due to a limitation in the capacity of Windows SharePoint Services 3.0 document libraries, which may experience performance degradation if more than 2,000 documents exist in the library.

If you think a form template may be submitted more than 2,000 times, it is easier to begin by programming the form to use an alternative submit method than to correct this issue once it becomes a problem, particularly if the form template is available to a publicly accessible Web site.

Use Form View when configuring session state for InfoPath Forms Services

You can configure InfoPath Forms Services to use the Session State Service (the default option) or Form View to control how user sessions are managed. When you configure InfoPath Forms Services to use the Session State Service, all browser sessions are maintained on the SQL Server database corresponding with the Shared Services Provider (SSP) associated with the Web application on which the form template is hosted. This scenario uses little network bandwidth, but has a cumulative performance impact on the computer running SQL Server. When you are using Form View, sessions are maintained on the client browser, and all session data is included in each postback to the server, up to 40 kilobytes of session data. This uses more bandwidth than using session state, but does not affect the computer running SQL Server. Once session data reaches 40 KB in size, the session automatically transitions to session-state management.

We recommend the use of Form View in environments that have smaller groups of users, because it reduces the impact on SQL Server. If your InfoPath Forms Services deployment will have many users, particularly if session data is below 40 KB for many high-usage form templates, session state is likely a better choice. If Form View is used, the bandwidth used by browser sessions of 40 KB or fewer can be monitored if there is a concern that network performance might be adversely affected.

Running SQL Server on a front-end Web server is not recommended

If you run SQL Server on an Office SharePoint Server front-end Web server (for example, in a single-server evaluation deployment), the ASP.NET cache will release system memory at a lower threshold than SQL Server, which could result in InfoPath Forms Services memory starvation.

ASP.NET employs a strategy of targeting maximum Internet Information Services (IIS) memory use of the lesser of either 800 megabytes or 60% of available physical RAM. These settings are configurable in IIS manager. ASP.NET also monitors physical RAM use, not just for the w3wp.exe process, but for the entire system. When 80% of the physical memory on the server is committed, ASP.NET begins periodically dropping the oldest and lowest priority 5% of the cache. When 85% of physical memory is committed, ASP.NET drops 50% of the cache periodically. At 90% or more, ASP.NET aggressively trims the cache and sets a low limit on the maximum number of entries, which remains in effect until ASP.NET reassesses memory pressure on the server and raises the threshold.

The memory usage threshold for SQL Server is higher by default than the ASP.NET cache. In this scenario, SQL Server never releases memory, because the ASP.NET cache will already have released memory before the SQL Server threshold is reached. This situation can lead to a condition in which the throughput of InfoPath Forms Services is reduced with a subsequent impact on performance.

To mitigate this issue, you should configure SQL Server memory limits manually when SQL Server is installed on the same computer as Office SharePoint Server. For more information on adjusting SQL Server memory settings, see the article Server Memory Options (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_config_9zfy.asp) on the Microsoft Web site.

Best practices for anonymously accessible forms

When you deploy a form to a location where it is exposed to anonymous users, such as a public SharePoint document library or an embedded form in a Web page on the Internet, ensure the integrity of your form. There are several additional steps you should take to mitigate the risk of improper form usage, Denial of Service (DoS) exploits, and potential performance issues.

  • Ensure that form templates cannot be accessed by scripts or other automated processes. One way to achieve this is to force users who are submitting a form template to enter an identification code such as a short alphanumeric string displayed in an image, which cannot be "read" by a script or automated process.

  • Form templates that contain sensitive information such as authentication information, server or database names, or proprietary code should never be exposed to anonymous users.

  • Form templates that contain an e-mail submit data connection should not be deployed to servers that are anonymously accessible, as e-mail messages generated when the form is submitted will show "sent by anonymous user" in the Subject line.

  • Form templates that contain code or functionality that can invoke processes on a server should be carefully evaluated and tested to ensure that security cannot be compromised by making the form template accessible to anonymous users.

  • In order to prevent users from submitting multiple copies of a form, you might consider including code that tracks the IP address of each user who submits a form and prevents duplicate submissions from the same IP address.

  • Protect the integrity of form templates by enabling protection to prevent the form template from being changed.

Thursday, October 23, 2008

MOSS Page Setting Error - Value does not fall within the expected range

Thanks to these guys for the solution

I found an error when trying to change the Page Settings of a default.aspx in one of my sites today.

I wanted to update the page layout template in use but on selecting Page Settings from either the Page drop down in edit mode or from the Site Content & Structure page i received the follwoing error:

Value does not fall within the expected range
  1. Open the site in SharePoint Designer
  2. Select File / Export and choose the page you are trying to update
  3. Open the page locally using Notepad
  4. Search the source for “mso:PublishingPageLayout"
  5. Look at the path :

    http://mossdev/_catalogs/masterpage/customLayout.aspx, Custom Reports Layout

  6. The string points to my old development environment http://mossdev
  7. Update the path to the live environment eg: http://mosslive
  8. Save the file
  9. In SharePoint Designer select File / Import and choose the modified file
  10. Check the files back in and approve them.
Problem solved - i can now update the page settings with no error.

Thursday, October 09, 2008

SSP Stuck on Unprovisioning

I tried to delete a test SSP the other day via Central Administration. Having selected the options to also delete associated content databases and web applications i hit ok and left it to run. The SSP status changed to 'Unprovisioning' and an hour later was still stuck.

I then followed this example in the hope the SSP would delete.
  • http://prequest01.wordpress.com/2008/08/16/unable-to-delete-shared-services/

    1. Tried: stsadm -o deletessp "TestSSP" –force, but this did not work
    2. Login to SQL server.
    3. Open SQL Management Studio and expend Databases.
    4. Expand Configuration Database & Tables.
    5. Opened table for dbo.object.
    6. Executed following query in query analyzer: SELECT * FROM [MOSS_CFG_CA_01].[dbo].[Objects]where name like ‘Name of the Shared Services’.
    7. Copy the ID of object referenced in objects table of configuration database.
    8. Open command prompt and changed directory to C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN> and executed following command to delete the Shared Services using the ID which was copied: Stsadm -o deleteconfigurationobject -id “id retrieved from object table”
  • To clean up we decide to delete the DBs via SQL Management Studio and delete the web applications via Central Administration.
A week later I discovered that one of our servers had rebooted itself with the following log (don't yet know if this is related):

System Failure: Stop error
Reason Code: 0x805000f
Bug ID:
Bugcheck String: 0x000000c5 (0x00000004, 0xd0000002, 0x00000001, 0x8089bce3)
Comment: 0x000000c5 (0x00000004, 0xd0000002, 0x00000001, 0x8089bce3)


I then discovered that the search was no longer working. Submiting a query returned the following error:

Cannot connect to the search service

The status of the test SSP i had tried to delete was still stuck on 'Unprovisioning'. Also the other SSPs 'Edit Properties' pages in Central Administration were no longer available and returned the following error:

An unhandled exception occurred in the user interface.Exception Information: Cannot open database "xxx" requested by the login. The login failed. Login failed for user 'xxx'.

In the event log on the server I found multiple instances of the following error:

Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchServiceInstance (e6a1ecb4-3aa8-45cd-a179-d7e053aa927a).

Reason: Cannot open database "xxx" requested by the login. The login failed.
Login failed for user 'xxx'.


Solution:
  1. Restart the Office SharePoint Server Search service in via the Computer Management console - Search still not working.
  2. I retried the STSADM CMD
    stsadm -o deletessp "TestSSP" –force
Operation was successful this time and the SSP has now gone. The event log is now clear of all errors and the unavailable pages in Central Administration are now available again.

Monday, September 29, 2008

MOSS Search Broken

MSS search has been broken for a few weeks now. One of the issues with the fault has been that MOSS had stopped writing to the error logs so we had no way of finding specific error inforation. I logged a call with Microsoft because of this and they suggested that i recreate the SSPs as they must be coorupt.

I tested this by creatiing a new SSP and true enough it did allow search queries and returned results. But, recreating our SSPs is no small job because once you do so you have to recreate all your customisations as well. This means redeploying custom webparts and setting them up on your sites. Recreateing audiences and resetting targeted content on the sites, etc etc. Depending on your set up this can take quite an effort.

Before heading down the last resort of recreating the SSPs i decided to try and solve the issues first. For info I am running a standard installation with 3 servers:
  • MOSS01 - Index
  • MOSS02 - WFE
  • MOSS03 - Query & Central Admin
Take note that it took a weekend of digging around and trying the same steps over and over again to finally fix everything. There's a list of the errors and how to fix them at the bottom of this post. I have tried to put the main steps that i followed into order below - i hope this helps someone...

******************************************************

Attempt 1

  1. Reboot Index server
  2. Reboot Query server
  3. Propagate the Index file to a new location using STSADM
    stsadm -o osearch -propagationlocation
Result: Index moved to new location sucessfully. Search not working.

Attempt 2
  1. Start the Indexing service on the MOSS Index server using Computer Management / Services
  2. Stop the Search Services (Index & Query) using STSADM
    stsadm -o osearch -action stop
  3. Start the Search Services (Index & Query) using STSADM
    stsadm -o osearch -action start
Result: Search not working.

Attempt 3
  1. Reset the Indexer in each SSP to the Index server via Central Admin SSP Proerties page
  2. Add the process accounts to each SSP on the Edit Properties page - http://ssp/admin/_layouts/searchsspsettings.aspx
  3. Set the security for C:\Windows\Tasks to read & write for the WSS_WPG account:
    1. On the Index server make sure that you can see the Sharing and Security tab in the Windows tasks folder (usually C:\Windows\Tasks) by open a command prompt and type attrib –s %windir% \tasks.
    2. Browse to C:\Windows\Tasks in explorer, right click and select properties. Grant the WSS_WPG group Read and Write permissions on the tasks folder.
    3. Open a command prompt and type attrib +s %windir% \tasks to reset the tasks folder to its default view.
  4. Delete the content index in each SSP
  5. Start a full crawl in each SSP
Result: Search now returning results correctly in 2/4 SSPs. MOSS event logs are now populating.
  • SSP1 status - Propagating to new Query server. Search index status 'Computing ranking'. Search not working. When I manually started a crawl, there's a pop up message saying 'Crawling might be paused because a backup or an index move operation is in progress. Are you sure you want to resume this crawl?' Selected 'Yes'.
  • SSP2 status - Propagating to new Query server - Search not working
  • SSP3 status - Propagating - Search is working
  • SSP4 status - Idle - Search is working
Attempt 4
  1. Reboot Index & Query servers
  2. Stop the Search Services (Index & Query) using Central Administration
  3. Recreate the Search Services (Index & Query) using Central Administration
  4. Reset the Indexer in each SSP to the Index server
  5. Set the security for C:\Windows\Tasks to read & write for the WSS_WPG account
  6. Reset the content index in each SSP
  7. Start a full crawl in each SSP
Result: Search working in all SSPs.

One remaining error in the event log is now: Tracing Service failed to create the trace log file directory 'D:\MOSS\12\LOGS'. Error 3: The system cannot find the path specified.

******************************************************

General Error List

Some of the errors i have worked through are listed here:
  • Your search cannot be completed because of a service error. Try your search again or contact your administrator for more information
    • Reassociating the indexer and search service with the ssp under application management on the central administration site
  • Content index on Portal_Content could not be initialized. Error The content index is corrupt.
  • Query server not responding
  • Could not create a database session
  • Error trying to access the SSP search settings page: http://ssp/admin/_layouts/searchsspsettings.aspx - 403 FORBIDDEN
  • Error when you try to edit the content source schedule in Microsoft Office SharePoint Server 2007: "Access is denied"
    • http://support.microsoft.com/kb/926959
      To work around this issue, you must add the WSS_WPG group to the Tasks folder. To do this, follow these steps:
      1. Use an account that has administrative permissions to log on to the computer that is running the Office SharePoint Server 2007 indexing service.
      2. Click Start, click Run, type cmd, and then click OK.
      3. At the command prompt, type the following command, and then press ENTER:
        attrib –s %windir%\tasks
        Note In this example, %windir% is the path of the Windows folder. For example, the path can be C:\Windows.
        Note If Windows Explorer is open when you make this change, you will not see the extra tab in Windows Explorer. If Windows Explorer is already open, close and then reopen it before you perform step 4.
      4. In Windows Explorer, right-click the Tasks folder, and then click Properties.
      5. In the Tasks Properties dialog box, click the Security tab, and then click Add
      6. In the Select Users, Computers, or Groups dialog box, type WSS_WPG in the Enter object names to select box, and then click OK.
      7. Grant the following permissions for the WSS_WPG account, and then click OK: Read & Write
      8. Click Start, point to Administrative Tools, and then click Internet Information Services (IIS) Manager.
      9. In Internet Information Services (IIS) Manager, right-click ComputerName (local computer), click All Tasks, and then click Restart IIS.
      10. Click Start, click Run, type cmd, and then click OK.
      11. At the command prompt, type the following command, and then press ENTER:
        attrib +s %windir%\tasks
        Note This resets the Tasks Property back to the default view.
  • The search service is currently offline. Visit the Services on Server page in SharePoint Central Administration to verify whether the service is enabled. This might also be because an indexer move is in progress.
    • http://www.sharepointblogs.com/jasonmedero/archive/2008/09/15/moss-2007-error-when-moving-indexing-role-the-search-service-is-currently-offline-visit-the-services-on-server-page.aspx
      1. Stop and start search services on new index server and all servers running the query role
      2. Then restarted the search service via central administration under operations tab>>Services
      3. Went into Services.msc and found the Office Search Service and restarted it manually
      4. Checked to make sure that the search service account had correct rights to SQL.
    • None of the above worked so...
      1. Going into the SSP settings (clicking on SSP administration not the SSP link itself) within the left quick launch navigation from within central administration.
      2. Selecting the dropdown arrow next to the SSP where I was having the search issue
      3. Select edit properties
      4. Within the properties screen of the SSP look for the “Process accounts”
      5. Make sure that your search account is in there!
  • Test Shared Service Provider stuck on 'Unprovisioning' after trying to delete it and associated databases.
    • http://prequest01.wordpress.com/2008/08/16/unable-to-delete-shared-services/
      1. Login to SQL server.
      2. Open SQL Management Studio and expend Databases.
      3. Expand Configuration Database & Tables.
      4. Opened table for dbo.object.
      5. Executed following query in query analyzer: SELECT * FROM [MOSS_CFG_CA_01].[dbo].[Objects]where name like ‘Name of the Shared Services’.
      6. Copy the ID of object referenced in objects table of configuration database.
      7. Open command prompt and changed directory to C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN> and executed following command to delete the Shared Services using the ID which was copied: Stsadm -o deleteconfigurationobject -id “id retrieved from object table”
  • The search request was unable to connect to the Search Service

Friday, June 13, 2008

The type or namespace name 'Publishing' does not exist in the namespace 'Microsoft.SharePoint'

I started playing around with a copy of default.master yesterday and added in a CssRegistration link to the header:

<SharePoint:CssRegistration name="<% $SPUrl:~SiteCollection/Style Library/CustomMySiteRegistration.css %>" runat="server"/>

After deploying the master page to SharePoint i received the following error:

An error occurred during the processing of . c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\dff54803\4595fc0a\App_Web_custommysite.master_1096277560.2bgek7y-.0.cs(1389): error CS0234: The type or namespace name 'Publishing' does not exist in the namespace 'Microsoft.SharePoint' (are you missing an assembly reference?)

Thanks to Tom Meskens for posting the error here's the solution.
The default.master file doen't include the publishing assembly declarations required. They need to be added in as follows:

<%@ Register Tagprefix="PublishingWebControls" Namespace="Microsoft.SharePoint.Publishing.WebControls" Assembly="Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="PublishingNavigation" Namespace="Microsoft.SharePoint.Publishing.Navigation" Assembly="Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="PublishingVariations" TagName="VariationsLabelMenu" src="~/_controltemplates/VariationsLabelMenu.ascx" %>
<%@ Register Tagprefix="PublishingConsole" TagName="Console" src="~/_controltemplates/PublishingConsole.ascx" %>
<%@ Register TagPrefix="PublishingSiteAction" TagName="SiteActionMenu" src="~/_controltemplates/PublishingActionMenu.ascx" %>


Republish the master page and hoorah - no more error!

Thursday, June 05, 2008

Submit InfoPath forms to SharePoint with unique filenames

This is a follow up to an issue that i initially encountered a couple of months ago when we first deployed an Infopath form to SharePoint. The original thread can be viewed here: SharePoint User Group UK

As Colin pointed out in his comment our approach left us open to the possibility of duplicate records since users could simultaneously open a new form and thereby taking the same last max id from the form library.

Although it appeared to users as though duplication was occuring, in reality the record is not duplicated because SharePoint asigns its own unique ID which automatically increments with each new record.

I have now updated the form as suggested by J_A_G, which also has the advantage of using no code.

This works by applying 2 rules to a hidden field on the form. Documents are assigned a unique filename based on the concat() function by concatenating fields in the form with the now() function. The rules determin whether or not the filename field is blank; if not it is not updated - without these rules each time a form is reopened and resubmitted it would be saved as a new form instance with a different filename as opposed to just updating an existing one.

Here's how to set this up:
  • Add a hidden field to the form called 'fileName'



  • Create a SharePoint Data Connection to set the InfoPath file name to the hidden field fileName
  • Check the box 'Allow overwrite if file exists'



  • Open Tools / Submit Options
  • Select radio button 'Perform custom action using rules'
  • Click the Rules button



  • Add Rule 1 (filename is blank)
    • Set condition 1: if fileName is blank
    • Set action 1: set field's value fileName = concat(myfield, now())
    • Set action 2: submit using a data connection: (the DC you created earlier)



  • Add Rule 2 (filename is not blank)
    • Set condition 1: if fileName is not blank
    • Set action 1: submit using a data connection: (the DC you created earlier)

Filtering MOSS lists with the [Me] function

To filter content in SharePoint libraries and lists so that users only see items that they created or modified use the [Me] filter. The filter will only work with SharePoint user IDs for example Created By / Modified By. It won't work with custom created fields like User Name unless it is associated with a SharePoint ID. (See Greg Collins blog post "Use the SharePoint '[Me]' Filter with a Promoted Property", for other functions see WSS FAQ)