Showing posts with label SharePoint Administration. Show all posts
Showing posts with label SharePoint Administration. Show all posts

Oct 27, 2012

This item could not be crawled because the repository did not respond within the specified timeout period - SharePoint Search Error

Problem:
Environment: WSS 3.0, Microsoft Search Server Express 2008
The Search server is crawling the contents properly and the search is working as expected. Suddenly, search crawling stopped and the error in the Search log is
"This item could not be crawled because the repository did not respond within the specified timeout period. Try to crawl the repository at a later time, or increase the timeout value on the Proxy and Timeout page in search administration. You might also want to crawl this repository during off-peak usage times".
Solution:
I understood that the error is due to the Proxy and checked the Proxy and Time Out settings in Search Server Administration and it is 120 Seconds.
Then, removed the Proxy Settings configured in the IE. Followed by an incremental crawl fixed this issue and I didn’t see any errors after that.
Also, uncheck the option in the IE “Automatically Detect Settings” (if it is checked).
Here is the link which gave the complete solution for this issue:
Happy Sharing!

Aug 6, 2012

Event ID 28721 in Source cannot be found

Problem:I have faced this problem when I tried to upload a document one of my document library in SharePoint. Neither the upload is successful nor no errors while uploading.
Event Log:I was unable to view any errors with respect to the document upload in the event log. I could see only the following logs in the event viewer:
Event Type: Error
Event Source: Windows SharePoint Services 3
Event Category: General
Event ID: 28721
User:  N/A
Description:The description for Event ID ( 28721 ) in Source ( Windows SharePoint Services 3 ) 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: #960013: Antivirus scanner timed out.


Following are the investigations done for fixing the errors:
1. Checked the file size limit in the web application general settings – but I have tried to upload only a few KB text file.
2. Checked the SQL server logs and there is enough space for the upload.
3. Created a new document library and tried attaching a new document which is unsuccessful.
4. Created a new list and added an item which is successful. But when tried attaching a document (or text or small file) it is unsuccessful.
Hence, I have concluded that there is no problem with SharePoint or any corruption of document library or list definition.
Looking at the event log carefully, I finally came to an idea that Antivirus is blocking something and it is where the problem is arising.

Solution:1. I have tried changing the Antivirus settings in the Central Administration 
2. Go to -> Central Administration -> Operations -> Antivirus -> Antivirus Settings -> I have unchecked the option Scan Documents on Upload -> Clicked save
3. Now, I have tried uploading the documents in the document library which is successful. Hence, concluding that the problem is due to the Microsoft Fore Front Security Antivirus.
4. Note: But we cannot make this option as default, since without antivirus scan, unwanted files (viruses, malwares, spywares, etc.,) may be uploaded which would be threat to the SharePoint environment.
5. Finally, updated the Antivirus definitions and license for the Fore Front antivirus. Then onwards, the upload is successful and secured one.

Microsoft Fore Front Security Antivirus1.  It is an antivirus provided by Microsoft dedicated to SharePoint environment. It will protect the SharePoint environment from the virus, spywares and other treats being uploaded.
2.  To know about the Microsoft Fore Front Security Antivirus click on this link
http://sharepoint.microsoft.com/en-us/product/Related-Technologies/Pages/Forefront-Protection-2010-for-SharePoint.aspx
3.  In the central Administration -> Operations -> Antivirus -> Antivirus Settings -> Scan documents on upload is set, then all the documents being uploaded will be scanned by the for front and then only uploaded into the SharePoint environment.

Happy Sharing!

Jul 30, 2012

Parser Error Data at the root level is invalid. Line 1, Position 1

I have got this error message suddenly in a (WSS 3.0) SharePoint site. The site is working as expected and it does not throw any errors before.
The error screen shot is below:


From the error message, I could understand that there is a problem with the browser comapatibility.
Solution:
I have navigated to the SharePoint site in the IIS and then explored the files in the IIS.
Then navigated to APP_Browsers folder, there I could see there is a  sub folder named _vti_cnf  inside I could see a file compat.broswer in it. This file (file which mentions the compatible browsers for loading the SharePoint site.) is already present in the root directory.
I have deleted this file (compat.browser) which is inside the _vti_cnf folder and refreshed the site, it worked as before.
Happy Sharing!

Jun 13, 2012

Databases must be empty before they can be used. Delete all of the tables, stored procedures and other objects or use a different database.

Problem:
I got this error when I tried to stop and start the Windows SharePoint Services Search service by the following:
Central Administration ->Operations ->Services on server->Windows SharePoint Services Search->Stop
Central Administration->Operations->Services on server->Windows SharePoint Services Search->Start
The below is the step by step solution to fix this issue.
Solution:
1. We have to delete some log files of database in the SQL Server by following the path:
Stop the SQL Server Express Service: Start -> All Programs -> Administrative Tools -> Services -> SQL Server -> Right click Stop
2. Now delete the following file in the below locations:
WINDIR%\SYSMSI\SSEE\MSSL.2005\MSSQL\DATA\WSS_Search_ Servername.mdf
WINDIR%\SYSMSI\SSEE\MSSL.2005\MSSQL\DATA\WSS_Search_ Servername_log.LDF
Or in this path WINDIR%\Microsoft SQL Server\MSSQL.1\MSSQL\Data\
3. Restart the SQL Server Express Service by following the path:
 Start -> All Programs -> Administrative Tools -> Services -> SQL Server -> Right click Start
4. Now restart the Windows SharePoint Services Search by following the path:
Restart the Windows SharePoint Services Search: Central Administration->Operations->Services on server->Windows SharePoint Services Search->Start
5. In the Configure Windows SharePoint Services Search Service Settings page, in the Search DB section, give a new DB name in the Database Name field. Click Start.
6. If you give the old DB name you will get the error. Hence try giving the new DB name.
Please free to comment and share this post if it helps you!

The specified database has an incorrect collation. Rebuild the database with the Latin1_General_CI_AS_KS_WS collation or create a new database

Problem:
 I have faced this error when I created a DB in the SQL server and then tried to create the Search Server DB name in the Search Server Configuration Page while configuring the Microsoft Search Server Express 2008.
Solution:
1. The problem is the database created has incorrect collation.
2. We have to change the collation to Latin1_General_CI_AS_KS_WS collation which is specified while configuring the web applications or search server DB in SharePoint.
3.  Connect to the SQL server -> Select the Database created.
4. Right Click on the Database -> Properties -> Select Options page -> Change the collation as shown below:
5. Now try to configure the Search or Web Application in SharePoint, it will work as expected.

May 10, 2012

Remote Blob Storage (RBS) in SharePoint 2010

In this article, we will know about a new feature in SharePoint 2010 which allows the remote storage in SharePoint.
What is Remote BLOB Storage?
     Ã˜  BLOB – Binary Large Object
Ø  Remote BLOB Storage (RBS) is a library API set that is incorporated as an add-on feature pack for Microsoft SQL Server.
Ø  It can be run on servers with Microsoft SQL Server 2008 R2, SQL Server 2008 or SQL Server 2008 R2 Express. To run RBS on a remote server, you must be running SQL Server 2008 R2 Enterprise edition.
Ø  RBS is not supported for Microsoft SQL Server 2005.
Ø  In Microsoft SharePoint Server 2010, RBS can be used for content databases only.
Why RBS?
It provides the following benefits:
Ø  BLOB data can be stored on less expensive storage devices that are configured to handle simple storage.
Ø  The administration of the BLOB storage is controlled by a system that is designed specifically to work with BLOB data.
Ø  Database server resources are freed for database operations.
When to Go for RBS?
Ø  Large Database of Mostly Binary Data
Ø  Digital Asset Management Databases
Ø  When Storage Tiers Need to be Implemented
Ø  When Storage Needs to be Optimized
You can expect to benefit from RBS in the following cases:
Ø  The content databases are larger than 500 gigabytes (GB).
Ø  The BLOB data files are larger than 256 kilobytes (KB).
Ø  The BLOB data files are at least 80 KB and the database server is a performance bottleneck. Then, RBS reduces the both the I/O and processing load on the database server.
RBS Advantages over EBS (External Blob Storage)
Hope this explains about the basics of RBS in SharePoint 2010.
I came across a good article explaining about Configuring Remote Blob Storage for SharePoint 2010. Here is the link.
Happy Sharing!

May 5, 2012

SharePoint site continually prompting for passwords

Scenario:
I got a scenario where the SharePoint site is not allowing a user to login to the site even on giving correct username and password.
It is an intranet site and hence it will take the Windows Authentication.
But after 3 consecutive wrong attempts, password should be locked since it is taking the username and password from the Active Directory. It doesn’t happen. I have checked the Active directory and it is unlocked only.

So, what is the problem stopping the user to login to the site? Read the solution below.

Solution:
I have analyzed the problem in the following ways and arrived at the solution. 
The root cause of the issue may be any one of the following issues:
Adding the SharePoint site to the Local Intranet
1. Open IE on your computer, go to TOOLS > INTERNET OPTIONS, and then Select the Security tab. Click on the Local Intranet zone icon, and then the Sites button.
2. You will see a pop up -> Local Intranet -> click Advanced -> Local Intranet -> where you can add the site SharePoint site URL. Example: http://*.domain namehttp://Sitename.domainname. Click the Close and OK.

3. Click OK to exit the Internet Options box, and close all Internet Explorer windows. Open a new Explorer window and try to browse to your SharePoint site. You should be logged in automatically using your Windows credentials.

If you are still unable to login prompt to the site, then follow the next instruction.

Removing the stored old username and password in the control panel
Reason for removing this password:
When we are checking the remember password option while logging into the SharePoint site, then the password is stored in the control panel under 
STORED USER NAMES AND PASSWORDS.
Hence, the SharePoint site is using the older password rather than the newer one (when the password is reset or changed for the particular account). So removing this would help us in resolving this issue.

To remove the saved password, follow the below steps:
In Windows XP, the path is: CONTROL PANEL > STORED USERNAMES AND PASSWORDS.
If you do not have the option you need in the Control Panel, there is a way to bring up the box via the Run box.
Go to START -> RUN and type the following: 
rundll32.exe keymgr.dll,KRShowKeyMgr 
Here you can remove the stored username and password. Now try logging in with the username and password and it will work as expected.

Hope this helps you! Please free to comment and share this post.

Apr 16, 2012

The security validation for this page is invalid in SharePoint

Sometimes, when a user with least permissions in the SharePoint site, creates or updates an item, then the following error will be shown:
“The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again”

When you are creating a custom web parts or creating custom solutions, your code will run with your credentials.

Not everybody has full control in the SharePoint site, so when a user has read only rights and try to update an item in the list or SharePoint Document library, then the code will throw an access denied error. This happens, when the code needs access to objects that are not in the scope of the user credentials.
Here comes the concept called impersonation (ability to control the identity under which code is executed) in ASP.Net. This will allow you to run your code with the help of a user who has correct permissions to run it.

Namespace: Microsoft.SharePoint
Assembly   : Microsoft.SharePoint (in Microsoft.SharePoint.dll)

In SharePoint we have built-in function to accomplish this: SPSecurity.RunWithElevatedPrivileges, it runs with the System Account User.

Solutions:
1. Add the “SPSecurity.RunWithElevatedPrivileges = True” in the code as shown in the example below:

2. Or in the Central Administration -> Application Management -> Web Application General Settings -> Select web application
In Web Page Security Validation, change security validation is off.
Note: The 2nd solution is should not be followed as per the best practices of SharePoint.

Apr 7, 2012

Exporting SharePoint User Groups with Group Names

In the article Exporting SharePoint User Groups into Excel, we have learned about exporting the SharePoint user groups into excel. Here we are able to export all the users in a SharePoint site but we are unable to sort the users with the group name.
In this article, we will learn a small work around filter the users with the group name.
We can use SQL Query to fetch this data.
Connect to the SQL server and open a new query in the content database where your SharePoint site resides.
The SharePoint content DB does not expose the tables (for lists, libraries, users, etc.) in the database directly.
The below is the query which will fetch all the users in the SharePoint site with the user groups in a separate column in the result.
SELECT dbo.Groups.ID, dbo.Groups.Title, dbo.UserInfo.tp_Title, dbo.UserInfo.tp_Login FROM dbo.GroupMembership INNER JOIN dbo.Groups ON dbo.GroupMembership.SiteId = dbo.Groups.SiteId INNER JOIN dbo.UserInfo ON dbo.GroupMembership.MemberId = dbo.UserInfo.tp_ID
Hope this helps you!
Please free to comment. Always your comments makes me to write more!

Mar 19, 2012

The Search Service is currently offline

Problem:
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
You will get the below screen when you navigate to the default content access account, crawl log or default content access account in the Search Server Administration.
Resolution:
Following are the steps to fix this issue.
  1. Open central administration
  2. Goto Operations -> Topology and Services -> Services on Server
  3. Select Search Indexing -> On “Office SharePoint Server Search” click “Stop”. This will reconfigure the service
  4. Now click “start”
  5. Navigate to the indexer log file location which is C:\Program Files\Microsoft Office Servers\12.0\Data\Office Server\Applications” for me. Here you will find a folder with Guid name. At the end of that folder add “_old”. Refresh the SSP page and wait for some time and now the indexer will recreate the guid folder.
  6. This will fix this issue.
If this doesn't work out, then check the service account which is running the search service (default content access account for crawling the content). If there are any changes in the account, then this might also be the problem for the search service to go offline.

Please free to comment. Hope this helps you!

Configuring Enterprise Search in SharePoint 2010

Hi All,

Read the useful arcticle which explains about Configuring the Enterprise Search in SharePoint 2010. A step by step explanation with screens is explained in this artcile.

Configuring Enterprise Search in SharePoint 2010 

Mar 17, 2012

The Parameter is incorrect crawl error Search Server


In this article, we are going to discuss about a strange issue with Microsoft Search Server.
Scenario:
Usually with the SharePoint, we will install Microsoft Search Server for providing the users a search function.
We will configure the content source in Search Server Admin page and crawler indexes the contents and will display the results in the search depending upon the user query.
The below figure shows the Search Server Overview:

Content Sources – The link where the SharePoint site is configured for crawling
Crawl Log – The logs of the crawler
Sometimes we will get the “The Parameter is incorrect” in the crawl log and then onwards, the search server stops crawling the new contents and no results will be displayed in the search result.
Root Cause:
This is due to a limit that a SharePoint user group cannot have more than 1000 users in a single SharePoint group.
Resolution:
The only way is to either decrease the number of users in the group which has exceeded the 1000 users or to split the user groups (Check the reference article below).
The reason behind is
During the indexing process, the system stores the ACE of each user who was added to a SharePoint group instead of the ACE of the SharePoint group itself. This process supports approximately 1000 users per access control list (ACL), after which the "Parameter is incorrect" error causes crawling to fail.
Reference Article:
Thanks for reading. Share your feedback!

Mar 12, 2012

Export SharePoint User Groups in Excel

In this article, we are going to discuss about a SharePoint tip which is not present in the User Groups by default.
Scenario:
From any list in the SharePoint, you can export the whole list in to a excel file or you can edit and save the excel file.
But is that possible in SharePoint User Groups?
Yes, it is possible.
Solution:
1. Go to Site Settings (http://sitname/_layouts/settings.aspx) -> Under Users and Permissions Select People and groups 
2. You will be seeing a URL like this http://sitname/_layouts/people.aspx?MembershipGroupId=5
3. Then navigate to the List Settings in the people and groups of a particular group which you want to export to the excel file

4. Now, in the URL you will see like this:
http://sitname/_layouts/listedit.aspx?List=72bcbfee-c10e-41ba-b128-2769c8fe9cc9&Source=%2Fpeople%2Easpx%3FMembershipGroupId%3D5
5. If you want you retrieve the users list from any view, then click on the view from the views list as shown below:
Scroll to the bottom of the page and click on the view you want to export
6.Now, copy the URL from the address bar and keep it in a notepad which is something like below:
http:// sitname /_layouts/ViewEdit.aspx?List=%7B72BCBFEE%2DC10E%2D41BA%2DB128%2D2769C8FE9CC9%7D&View=%7B4A52DE00%2D9B7C%2D4FDC%2DAC39%2D960FDF18F1F3%7D&Source=%252F%255Flayouts%252Flistedit%252Easpx%253FList%253D72bcbfee%252Dc10e%252D41ba%252Db128%252D2769c8fe9cc9%2526Source%255Flayouts%25252Fpeople%25252Easpx%25253FMembershipGroupId%25253D5
From the above URL, we have to copy the LIST ID and VIEW ID (marked bold in the above URL)
7. Now, we can easily export the people and groups in to excel using the following dll from the SharePoint server.
http://[sitename]/_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List=[LISTID]&View=[VIEWID]&CacheControl=1
8. Now, replace the site name, LIST ID and VIEWID in the above URL:
I will get the final URL as:
http://sitename/_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List=%7B64DAB4AC%2DD043%2D4DA4%2D85C7%2D9D4521C3F4CC%7D&View=%7B0FAE8D90%2D59D5%2D48F4%2DA54E%2DF02333777C7F%7D&CacheControl=1
Note:
To know more about the owssvr.dll please read this article
Open the above URL in the address bar, you will get an option to save an EXCEL FILE.
9. Open the Excel file, you will be asked for authentication, enable the external content and open it.
10. That’s it. You will see all the users in the groups with their details exported to the excel file.
11. This excel file exported using this method has all the users from the user groups but it is not filtered by user group name.
Read this article to achieve exporting the SharePoint user groups with the group name Exporting SharePoint User Groups with Group Names.
Read this article to know How to Programmatically get the users with the Group Name in SharePoint 

Dec 23, 2011

Programmatically Creating Site Backup in SharePoint

In the previous article, we have discussed about creating and restoring the SharePoint site using stsadm command.
In this article, we will see how to take the backup of the site using SharePoint Object Model.The below is the code that will create the backup of the site and log the information in a log file.
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Administration;

namespace SiteBackUp
{
    public class SiteBackup
    {
        static void Main(string[] args)
        {
         siteBackup("http://servername:portnumber","SharePointSiteBackup");   
        }
        public static void siteBackup(string siteURL,string fileName)
        {
            try 
            {
                SPSecurity.RunWithElevatedPrivileges(delegate()
                {
                    using(SPSite objSite=new SPSite(siteURL))
                    {
                        using(SPWeb objWeb=objSite.OpenWeb())
                        {
                            bool currentSiteStatus=objSite.AllowUnsafeUpdates;
                            objSite.AllowUnsafeUpdates=true;
                            bool currentWebStatus=objWeb.AllowUnsafeUpdates;
                            objWeb.AllowUnsafeUpdates=true;
                            string comment = objWeb.Title+"- Creating Backup is completed";
                            SPSiteCollection siteCollection=objSite.WebApplication.Sites;
                            objSite.ReadOnly=true;
                            string time=DateTime.Now.ToString("dd-MM-yyyy");
                            string backupName= "D:\\SiteBackup\\Backup" + fileName+"_"+time+".bak";
                            siteCollection.Backup(siteURL,backupName,false);
                            objSite.AllowUnsafeUpdates=currentSiteStatus;
                            objWeb.AllowUnsafeUpdates=currentWebStatus;
                            if(objSite.ReadOnly==true)
                            {
                               objSite.ReadOnly=false;
                               siteBackupLog(comment);
                            }                        
                         }
                    }
                });
            }
            catch (Exception ex)
            {
                SPSite site = new SPSite(siteURL);
                if (site.ReadOnly == true)
                    site.ReadOnly = false;
                siteBackupLog(ex.Message);
            }
        }
        public static void siteBackupLog(string message)
        {
            string PathName = "C:\\SiteBackup logs\\";
            PathName = PathName + "Backuplog-" + DateTime.Now.ToString("dd-MM-yyyy") + ".log";
            StreamWriter sw = new StreamWriter(PathName, true);
            sw.WriteLine(message + " - " + DateTime.Now);
            sw.Flush();
            sw.Close();
        }
    }
}

Hence, we can automate creating backup of the SharePoint site using code. Also, the whole code created in visual studio can be downloaded here.
Happy Coding!

stsadm Command for Creating Backup and Restoring a Site in SharePoint

In this article, we will discuss how to take a backup and restore it using the stsadmn command in SharePoint (WSS 3.0, MOSS 2007).
In SharePoint 2010, we use Power Shell instead of this command.
Before going for that let’s discuss about stsadm
What is stsadm command?
It is a command line tool for administration of SharePoint sites.
Where it is located in the server?

Normally, it is present in the following path

C:\ProgramFiles\Common Files\Microsoft Shared\Web Server Extensions\12\Bin

When you are in the Admin groups, you will able to use this command and perform all the functions.
Site Backup & Site Restore:
Navigate to the following path in command prompt first
C:\>cd Program Files\Common Files\Microsoft Shared\web server extensions\12\bin

1. C:\ Program Files\Common Files\Microsoft Shared\web server extensions\12\bin>stsadm.exe –o backup –url “Site URL” –filename “Location of DAT file with extension” -overwrite
2. C:\ Program Files\Common Files\Microsoft Shared\web server extensions\12\bin>stsadm.exe –o restore –url “Site URL” –filename “Location of DAT file with extension” –overwrite

Example:
Location of DAT file with extension – D:\FolderName\FileBackup.dat

Nov 24, 2011

Migration of WSS 3.0 to SharePoint Server 2010

I have some ideas grabbed from the internet regarding the migration of WSS 3.0 to SP 2010 server. My thoughts are as follows.
1. WSS 3.0 (with SP2) can be migrated to SharePoint Foundation 2010 directly.
2. The migration of WSS 3.0 (with SP2) to SharePoint Server 2010 is possible by attaching DB upgrade only. The direct migration is not possible.
3. But the WSS 3.0 (with SP2) can be migrated to MOSS 2007 first then to SP Server 2010
Ref: http://technet.microsoft.com/en-us/library/cc262747.aspx