SharePoint 2010 Search result Not found documents for a specific library in specific SharePoint site

Hi All,

I came across a situation where user is trying to search documents selecting the option “search in same site” instead of “all sites” from  search box and getting no result where as can find documents from other library with in same site.

Why such happens ?

The first point comes to mind for search error is  content not crawled, indexing not done for this situation.

Yes , its true but we need to think why  ?

As per my investigation I found the setting of the library as below

Draft-items-are-not-crawled-in-SharePoint

By default SharePoint only crawls major versions of files and draft items are only viewable by their creators. SharePoint is behaving as expected out of box.Draft items are not crawled in SharePoint

Resolution :

This behavior can be altered in Document Library Settings -> Versioning Settings -> Draft Item Security

Select the option “Any user who can read items”.

This will allow all users to see draft items including the crawling account.

  • Else you need to select “Create major versions” option or can publish the documents as major versions if want to get those documents in search result as per client wish.

https://support.microsoft.com/en-us/help/2304855/draft-items-are-not-crawled-in-sharepoint

Advertisements

Sending Attachments with the Email Messages Sent to SharePoint Document Library

Once I was trying to send the attachments along with the email messages being sent to the SharePoint document library. All the configurations were proper and I had properly associated the document library with an email address. After the stage was properly setup for the document library to receive emails with the attachment, I tested the same and expected it to work just fine, but I did not get any success.

I did a quick research over the internet and found out the solution from the MSDN site. The reason mentioned was pretty straight forward. While associating a document library with an email address, the Directory Management Service might miss out adding the following two attributes:

  • internet Encoding = 1310720
  • mAPIRecipient = false

These two attributes must be added manually using the Active Directory Service Interfaces (ADSI).

Note:
On Windows Server 2008 or Windows Server 2008 R2, the Active Directory Service Interfaces (ADSI)  Edit is installed after you have installed the Active Directory Domain Services role. You can also install Windows Server 2008 Remote Server Administration Tools (RSAT) on domain member servers or stand-alone servers.

For adding the attributes by using Active Directory Service Interfaces (ADSI) Edit, follow the steps mentioned below:

  1. Click Start, and then click Run.
  2. In the Run dialog box, type Adsiedit.msc, and then click OK.
  3. In the ADSI Edit window, expand ADSI Edit, expand Domain [DomainName], expand DC=DomainName, DC=com, and then expand CN=Users.
  4. Right-click the user name to which you want to add the missing attributes, and then click Properties.
  5. In the Properties dialog box, double-click internet Encoding on the Attribute Editor tab.
  6. In the Integer Attribute Editor dialog box, type 1310720 in the Value box, and then click OK.
  7. In the Properties dialog box, double-click mAPIRecipient on the Attribute Editor tab.
  8. In the Boolean Attribute Editor dialog box, click False, and then click OK two times.
filename invalid too long specify different name excel sharepoint

File name you have received is either invalid or too long excel sharepoint2013

I have just created a new web application and site collection in SharePoint 2013.  With a large number of documents to place into a Document Library I thought it would be easier to copy and paste them using Windows Explorer, so I opened the document library and click Open with Explorer.

The filename you’ve specified is either invalid or too long Specify a different filename.

filename invalid too long specify different name excel sharepoint

filename invalid too long specify different name excel sharepoint

As a test I tried to upload a single file using the browser but this generated the following error:

Sorry, something went wrong.The URL ‘Shared documents/Project budget.xlsx’ is invalid.

something went wrong url invalid

something went wrong url invalid

The filename isn’t very long at all, including the full path, so I found this quite strange.  I immediately started looking through the ULS logs and the following entry caught my eye, which was logged at the same time I tried to upload the files:

Exception thrown storing stream in new SqlRemoteBlob: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> Microsoft.Data.SqlRemoteBlobs.BlobStoreException: There was a generic database error. For more information, see the included exception. —> System.Data.SqlClient.SqlException: RBS Error. Original Error: Number 297, Severity 16, State 1, Procedure rbs_fs_sp_check_pool_size, Line 31, Message: The user does not have permission to perform this action.  Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 1, current count = 0.     at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)

I do have RBS (Remote Blob Storage) enabled for this content database so it appears that this has got messed up somehow.  After reading various other blog posts and TechNet articles I began some trial and error with the database permissions.  The only way I found to solve this was to grant the service account used by the application pool db_owner rights on the content database, in addition to the db_rbs_* permissions.

SP portal AppPool Permissions

SP portal AppPool Permissions

The original error about the filename being too long or invalid is very misleading, there is no hint of a permissions issue until digging into the ULS logs.