Category Archives: SharePoint 2007

SharePoint rewrite issue opening office doc Juniper VPN

I experience a rewriting problem with an Juniper VPN Appliance (SA-2500) and a SharePoint website. When I try to access a SharePoint (2007 & 2010)  site after connection with the Juniper VPN, the SharePoint site is displayed fine. But, if I try to open an office document stored in a SharePoint document library the document opens and displays the Juniper sign- in page instead of the document.

After searching the Juniper site I found different solution and found out that this is a known issue. A combination of two solutions solved for me this issue:

  1. Add the login URL from the Juniper appliance to the alternate acces mapping from the SharePoint web application.
  2. Add the login URL from the Juniper appliance to the trusted sites in the Browser.
  3. Add the SharePoint URL to the trusted sites in the Browser.

Crawling Large Library`s in SharePoint 2007

I had been experiencing issues crawling a large document library of over 60,000 items in a SharePoint 2007 farm 64x after the index was corrupt and I had to reset the crawled content. The only error I could find in the crawl log was the error “The item may be too large or corrupt.” The crawler stopted around the 33,000 items from this document library. I have searched a lot on the internet for this problem and found a few Blogs describing this problem with different solutions. The solution for my issue was a mix of what I found on the internet. After these changes the crawler was able to index all 60,000 items from one Library.

Register changes:

  • HKLM/SOFTWARE/Microsoft/Office Server/12/Search/Global/GatheringManager/DedicatedFilterProcessMemoryQuota” –> Change the value to: 256000000 Hex
  • HKLM/SOFTWARE/Microsoft/Office Server/12/Search/Global/GatheringManager/FilterProcessMemoryQuota –> Change the value to: 256000000 Hex
  • HKLM/SOFTWARE/Microsoft/Office Server/12/Search/Global/GatheringManager/FolderHighPriority –> Change the value to: 500 Hex
  • HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Office Server/12.0/Search/Global/Gathering Manager: set DeleteOnErrorInterval –> Change the value to: 4 Decimal

Search Time Out settings:

1. Central Administration -> Application Management -> Search section -> Manage search service

2. Manage Search Service page –> “Farm-level search settings

3. Change the “Timeout Settings” both from 60 –> 500

Search Error: Authentication failed because the remote party has closed the transport stream

A few days ago the following errors startud to show up in one off the WFE servers from a SharePoint farm:

Failed to obtain crawl status. —> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. —> System.IO.IOException: Authentication failed because the remote party has closed the transport stream.

Job 'Distribution List Import Job' failed. It will be re-tried again in 120 second(s). 

Reason: Failed to obtain crawl status.

Techinal Details:
Microsoft.Office.Server.UserProfiles.UserProfileException: Failed to obtain crawl status. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
   at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)
   at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size)
   at System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size)
   at System.Net.ConnectStream.WriteHeaders(Boolean async)
   --- End of inner exception stack trace ---
   at Microsoft.Office.Server.Search.Administration.SearchApi.RunOnServer[T](CodeToRun`1 remoteCode, CodeToRun`1 localCode, Boolean useCurrentSecurityContext, Int32 versionIn)
   at Microsoft.Office.Server.Search.Administration.SearchApi..ctor(WellKnownSearchCatalogs catalog, SearchSharedApplication application)
   at Microsoft.Office.Server.Search.Administration.SearchSharedApplication.get_SearchApi()
   at Microsoft.Office.Server.UserProfiles.SRPSite.IsImportInProgress(String contentSourceName)
   --- End of inner exception stack trace ---
   at Microsoft.Office.Server.UserProfiles.SRPSite.IsImportInProgress(String contentSourceName)
   at Microsoft.Office.Server.UserProfiles.UserProfileConfigManager.IsProfileImportInProgress()
   at Microsoft.Office.Server.UserProfiles.UserProfileConfigManager.IsImportInProgress()
   at Microsoft.Office.Server.UserProfiles.DLImportJob.Execute()
   at Microsoft.Office.Server.Administration.JobHandler.Execute(Object state)

The search settings page communicates with the index server using the SearchAdmin.asmx web service (Office Server Web Services) on the index server, and it does this over SSL.

To solve this issue I used the following two steps:

1. Install the IIS 6.0 Resource Kit on the index/application server (http://www.microsoft.com/downloads/details.aspx?FamilyID=56fc92ee-a71a-4c73-b628-ade629c89499&DisplayLang=en)
2. Assign a new SSL certificate  to theOffice Server Web Services site on the index server using the selfssl tool from the resource kit.

Maybe you will need to sync your contentdatabases again.

Job ‘Distribution List Import Job’ failed. It will be re-tried again in 120 second(s).

Reason: Failed to obtain crawl status.

Techinal Details:

Microsoft.Office.Server.UserProfiles.UserProfileException: Failed to obtain crawl status. —> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. —> System.IO.IOException: Authentication failed because the remote party has closed the transport stream.

at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)

at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)

at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)

at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)

at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)

at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size)

at System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size)

at System.Net.ConnectStream.WriteHeaders(Boolean async)

— End of inner exception stack trace —

at Microsoft.Office.Server.Search.Administration.SearchApi.RunOnServer[T](CodeToRun`1 remoteCode, CodeToRun`1 localCode, Boolean useCurrentSecurityContext, Int32 versionIn)

at Microsoft.Office.Server.Search.Administration.SearchApi..ctor(WellKnownSearchCatalogs catalog, SearchSharedApplication application)

at Microsoft.Office.Server.Search.Administration.SearchSharedApplication.get_SearchApi()

at Microsoft.Office.Server.UserProfiles.SRPSite.IsImportInProgress(String contentSourceName)

— End of inner exception stack trace —

at Microsoft.Office.Server.UserProfiles.SRPSite.IsImportInProgress(String contentSourceName)

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

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

at Microsoft.Office.Server.UserProfiles.DLImportJob.Execute()

at Microsoft.Office.Server.Administration.JobHandler.Execute(Object state)

MOSS 2007 Workflow: An error has occured in Approval

If you create a custom approval workflow in a document library and select this option on the customize workflow screen:
[x] Update the approval status (use this workflow to control content approval)

SharePoint maybe report the following error:

“An error has occured in Approval.”

The solution for this problem is very simple, if you want your workflow to update approval status you need to enable content approval in your document library. To enable content approval here is what you need to do:

Go to your document library Settings > Versioning Settings and select ,Yes” for: “Require content approval for submitted items?” option.

SharePoint Designer & User information List Metadata in a Workflow

I was building a workflow in SharePoint Designer and sometimes you need some metadata, for extra information or for an e-mail, from a SharePoint user. The problem is SharePoint Designer returns only the username and you cannot do a lookup for the the rest of the metadata from that user.

This is a  list out the metadata available in the “User Information List“, with the Paul Kotlyar’s “Lookup User Info” custom SharePoint Designer workflow activity you can use all off these fields in your workflow. Download the solution from CodePlex Don’t forget to put this line in the web.config:

authorizedType Assembly=”DP.Sharepoint.Workflow, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0298457208daed83″ Namespace=”DP.Sharepoint.Workflow” TypeName=”*” Authorized=”True” /

The “User Information List“ is available with administrator rights under: _catalogs/users/simple.aspx

Display Name Type Name
Content Type ID ContentTypeId ContentTypeId
Name Text Title
Approver Comments Note _ModerationComments
File Type Text File_x0020_Type
Account Text Name
E-Mail Text EMail
About Me Note Notes
SIP Address Text SipAddress
Locale Integer Locale
Calendar Type Integer CalendarType
AdjustHijriDays Integer AdjustHijriDays
TimeZone Integer TimeZone
Time Format Boolean Time24
Alternate Calendar Type Integer AltCalendarType
CalendarView Options Integer CalendarViewOptions
WorkDays Integer WorkDays
WorkDay StartHour Integer WorkDayStartHour
WorkDay EndHour Integer WorkDayEndHour
Is Site Admin Boolean IsSiteAdmin
Deleted Boolean Deleted
Picture URL Picture
Department Text Department
Job Title Text JobTitle
Is Active Boolean IsActive
Report To User Report_x0020_To
ID Counter ID
Content Type Text ContentType
Modified DateTime Modified
Created DateTime Created
Created By User Author
Modified By User Editor
Has Copy Destinations Boolean _HasCopyDestinations
Copy Source Text _CopySource
owshiddenversion Integer owshiddenversion
Workflow Version Integer WorkflowVersion
UI Version Integer _UIVersion
Version Text _UIVersionString
Attachments Attachments Attachments
Approval Status ModStat _ModerationStatus
Edit Computed Edit
Name Computed LinkTitleNoMenu
Title Computed LinkTitle
Select Computed SelectTitle
Instance ID Integer InstanceID
Order Number Order
GUID Guid GUID
Workflow Instance ID Guid WorkflowInstanceID
URL Path Lookup FileRef
Path Lookup FileDirRef
Modified Lookup Last_x0020_Modified
Created Lookup Created_x0020_Date
Item Type Lookup FSObjType
Effective Permissions Mask Computed PermMask
Name File FileLeafRef
Unique Id Lookup UniqueId
ProgId Lookup ProgId
ScopeId Lookup ScopeId
HTML File Type Computed HTML_x0020_File_x0020_Type
Edit Menu Table Start Computed _EditMenuTableStart
Edit Menu Table End Computed _EditMenuTableEnd
Name Computed LinkFilenameNoMenu
Name Computed LinkFilename
Type Computed DocIcon
Server Relative URL Computed ServerUrl
Encoded Absolute URL Computed EncodedAbsUrl
File Name Computed BaseName
Property Bag Lookup MetaInfo
Level Integer _Level
Is Current Version Boolean _IsCurrentVersion
Group Computed GroupLink
Edit Computed GroupEdit
Name Computed ImnName
Picture Computed PictureDisp
Name Computed NameWithPicture
Name Computed NameWithPictureAndDetails
Edit Computed EditUser
Selection Checkbox Computed UserSelection
Content Type Computed ContentTypeDisp

Tuning MOSS 2007 Peoplepicker if responstime is Unacceptable.

I used the following two stsadm commands to improve the performance of the MOSS 2007 peoplepicker:

  • Specify the domains to query:

    stsadm -o setsiteuseraccountdirectorypath -path “OU=DOMAIN,DC=internet,DC=ext,DC=com” -url http://mywebapplication/

 

  • To query only on the AD fields: userPrincipalName, sAMAccountName and displayname:

    stsadm.exe -o setproperty -pn peoplepicker-searchadcustomquery -pv (userPrincipalName={0})(sAMAccountName={0})(sn={0})(displayName={0}) -url http://mywebapplication/