Monday, May 13, 2013

How Search works in SharePoint || Basic Concept

Let’s today discuss on the topic How search works. We have already discussed the crawling concept in previous blog

Today we will try to check how search works in MOSS??
Once indexing is done MOSS 2 major server roles are responsible for search:
  • Web Service
  • Search Service
    Rest other are known as application role. These 2 roles can be configured in a single server or different server as per the farm architecture.
The basic action of a web server role is very simple. A user requests a web page by typing the web address in a browser. Out of two type of request GET request(Put request is used in entering request on server i.e. filling forms) makes a connection with web server, webserver send the requested page to the client in html format. Main thing is that SharePoint always makes a stateless connection. So once the request is fulfilled connection/session is disconnected and when the user makes another request different connection/session is developed . so if there is different web server in an environment different web server can serve request to single user.
Now the things come when a user do a search how it works:
a) When a user enter any query in the search column of a page. Web service of a web server will get this request.
b) Web server will send this request to search server/service. If in a farm webserver and search server lies in same server. Web service will send request to search service in same server itself.
c) Search server will look for that query in it index files.
Note: Index files are propagated to search server after the indexing/crawl done by index server and propagated to search server at this default location: C:\Program Files\Microsoft Office Servers\12.0\Data\Office Server\Applications. It can be changed acc to requirement.
Indexing/crawling concept can be check at my blog: How crawl works in SharePoint-how indexing work-basic concept
d) If search server get the result of the query in the index file.
e) It will pick the result of documents ,images etc. from the SQL , NAS etc.
f) Stream of result are provided in XML format to the Web service(web server).
g) Web service will convert the xml to html and return the result back to the client.
Hope this time you are able to get your search result correctly.

How crawl works in SharePoint || How indexing work || Basic Concept

Today I am here with some concept task . How a search work in SharePoint, but for a search to work SharePoint would first index the content sources.

So, How a crawl work to index the content from MOSS?
Main thing is that it can index, it can crawl anything stored in a server, in any format PDF, Zip, word, excel , txt, HTML, RTF, MS-Office etc. But to index the content other than office or Microsoft the index process is little more complicated but interesting. But the initial or the process is same for all. So let’s have a look on it.
1) When the scheduler for the crawl or index run, it will search for every place you have defined or what you called it a content source.
2) When it find a file in that, it will look on it extension. It will check in SharePoint SSP whether the type is defined to be indexed or not.
3) Now when the SharePoint confirms of file type it will look for a software/Ifilter to read this file. Ifilter is a software which will read a file. Every file need its own ifilter.
4) If SharePoint finds a ifilter for it. It will start opening this file and start scanning the file. It will remove certain words that are not required in search or not need to be indexed ex: 1 ,2 numerals etc.
5) After scanning the whole file it will index the content in index file with the pointer of name and location of the file.
6) Once a file is completed with full process. It will start for next file and with the same process as above.
Now to search or index any file of our use like PDF etc. we need to install the ifilter of every such types, which do not come by default. We can also put the images of such file type in SharePoint images file(12 hive) so that in search document come with their images. :-)
Hope I was able to describe the content based on my knowledge and learning.

Managed Path || Wildcard Inclusion || Explicit Inclusion || Basic Concept

Yesterday I was working with my team mates and their came a requirement to create a site collection but with consideration of future also. Things need to be fulfilled with help of Managed path. So , I thought to share the concept of managed path, wildcard inclusion and explicit inclusion with you all.

Let’s work with an example. Suppose I have a SharePoint site http://abc.com or any for abc company and today I got a requirement to create 3 site collection 1 for HR , Finance and Learning and the first 2 (HR and Finance will contain no of sites & site collection in it) and constraint for the 3 Learning, is that it should be directly under the root site abc.com .
How the things will be configured and work? We have to work with Managed path.
Managed path is a concept given by Microsoft to create different site collection according to different requirement. It is a path managed by SharePoint which will specify how many site collection can reside in a particular url. SharePoint has two type of managed paths:
1) Explicit Inclusion: it is a managed path under which no further site collection can be created. By default MOSS has a root as an explicit inclusion. N no of inclusion can be created manually. So as per my requirement I have to create site collection directly under abc.com. so first I will use root explicit inclusion to create my first ever site collection http://abc.com/ . and then I will create an another explicit inclusion “/Learning” and then I have a site collection with url as http://abc.com/learning .
Constraint: in Future I will never be able to create any site collection under learning.

2) Wildcard Inclusion: It is managed path under which n number of site collection can be created. By default MOSS has sites as only wildcard inclusion. N no of inclusion can be created manually
So as per my requirement I have to create 2 site collection under which number of site and site collection can reside .So with this requirement I will create an wildcard inclusion with name /HR and /Finance and the url for that will be http://abc.com/HR and http://abc.com/finance and now I have n no of site collection under /finance and /HR . ex. /HR/dep1 & /HR/dep2
So, on working with concept of wildcard and explicit requirement should be crystal clear . so that the things can be created to suit specific purpose.
Ref:

sharepoint 2010 manage content and structure missing

Content and structure option was present in SharePoint Server 2007, if you are not able to see this option on your SharePoint site in SharePoint 2010 then don’t be surprised, this option still exist in this version also J
Two sections on which you can see this option, if you are missing this option then lets analyze which sections we are talking about-
§  Not able to see ‘content and structure’ option on site settings page
§  Not able to see ‘Manage content and structure’ option in site actions
Not able to see ‘content and structure’ option on site actions page
Please follow the below mentioned steps to get this option on site settings page
§  Open the sharepoint site on which you are working
§  Site actions
§  Site settings
§  Site collection administration (note: you should be site collection administrator to view this option)
§  Site collection features
§  Activate this feature ‘SharePoint Server Publishing Infrastructure’
§  That’s it-Completed.
Not able to see ‘Manage content and structure’ option in site actions
§  Open the SharePoint site on which you are working
§  Site actions
§  Site settings-site actions
§  Manage site features
§  Activate this feature ‘SharePoint Server Publishing’
§  That’s it-Done.
If you have any queries/questions regarding the above mentioned information then please let me know. I would be more than happy to help you as well as resolves your issues J
Thank you.

Export to spreadsheet is missing in survey list-SharePoint 2010

You can use surveys to ask people what they think about issues, how to improve your processes, and many other topics. You can collect the results by using several different types of questions, such as multiple choice, fill-in fields, and even ratings.
As we use Microsoft excel on quite regular basis and very used to with it, we need to see every application in the excel and makes every desperate effort to view it but now the issue is while exporting survey data to excel, we need that option i.e. ‘EXPORT TO SPREADSHEET’ and this seems to be missing.
How to troubleshoot this issue?
I will brief here number of steps by which you can troubleshoot the issue and let me know me know in case of any queries/questions.
·         You should have office application (Office 2010/Office 2007) should be installed on your client machine.
·         Make sure that 'SharePoint Server Enterprise Site Collection features' should be activated at the site collection level.
·         Are you logged in as site collection admin or site owner? What are your permissions on the site? Also, try opening IE in "Run as administrator" mode and see if that makes a difference.
·         Make sure that you have to check the option (i.e. export to spreadsheet) on a actual survey list and not on a web part
·         make sure that on the Survey page, the view on right-hand corner is set to "Overview"
·         On the actual survey list-make sure the proper view is selected inside the web part options: How to check this:
§  Open the survey list in which you are facing the issue
§  Edit page
§  Modify shared web part
§  Under the selected view option
§  Select 'current view' and click on apply
·         Try saving the survey list as a template and create a new one based on the same
·         try to create a access view/standard view by using the following steps:
§  Go to any list and click on create view
§  Copy that URL
§  Go back to the survey list now
§  Settings
§  List settings
§  Copy the url from the browser (i.e. List=)
§  Paste it in the create view (first step)
§  You will get the create view page
Please let me know in case of any further queries. I would be more than happy to help you as well as resolves your issues. Thank you.

Site Prompts for Credentials (Username and Password)

This is a very common issue in which the sharepoint site prompts for credentials i.e. username and password. By default,SharePoint sites should automatically log you in via your existing Windows credentials without ever asking any identity. Yesterday, one of my user faced the same problem n would like to shared the resolution with all of u.

Internet Explorer Security Settings: How to add your sharepoint site in trusted file location zone

1. Open the Internet Explorer/Browser
2. Tools
3. Internet Options
4. Select Security Tab

5. Sites Button
6. Enter the website name (URL) in Add this website to the zone.
7. If your SharePoint site is NOT using SSL, make sure you uncheck the box Require server verification (https:) for all sites in this zone prior to adding it.
8.Click Ok once and you will be redirected to PopUp window.

9. Click on Custom Level Tab now

Note: If you are getting the above tab greyed out then it means that you dont have admin rights on your machine.

10. Scrolls towards the bottom and select the option that says
"AUTOMATIC LOGON WITH CURRENT USERNAME AND PASSWORD"

11. Click OK Everything

12. Open your sharepoint site in a new browser and check the results..

The above steps will resolves your login prompts issue and you should be able to access the sharepoint without any probs !!! If you face any issue then please let me know.. I would be more than happy to help you and resolves your queries as soon as possible.. Thanks...

Wednesday, May 8, 2013

Check In, Check Out, Content Approval, Draft Item Security and Version History Explained

There seems to be much confusion out in the SharePoint world around the topics of Check In/Out, Content Approval, Version History and Draft Item Security.  My goal is to explain and clarify how all these function together.
REQUIRE CHECK OUT, CHECK OUT, CHECK IN
It all starts with the creation of a new document be it created via the New menu or uploaded.  When a user creates or uploads the new document, if "Require Check Out" is enabled, SharePoint will check out the document for the user automatically.  Nobody, not even Approvers, can see the document until it is checked in.
Approvers can NEVER see content that is NOT checked in!
This is the function of check out and check in.  It is a way for a user to work on a document in private until such time they are ready to share the document with others.  When they then check it in, it moves to the next level of approval.  If a situation unfolds where the user leaves the company and has a document still checked out, an Administrator can either do a "Discard Check Out" or "Take Ownership" can be done followed by a Check In.
This gets tricky in the case of a newly uploaded document.  Because Approvers cannot see the document, the user doing the upload needs to be aware of this because they have to do the Check In to allow Approvers to see the document.  It's the same as the first iteration of a New document.  Nobody except the author knows that the document actually exists... at least not until Check In. 
In cases where users do mass uploads, having the "Force Check Out" option selected on the document library, can cause major problems as the uploading user would have to approve each document individually.  That can be a very time consuming process.  I always recommend that in such cases, the Administrator temporarily disable the "Force Check Out" option to allow the library content to be populated.  With Content Approval turned on, this temporary change, would not cause major issues.
CONTENT APPROVAL
Upon check in, if "Content Approval" is turned on, NOW Approvers as well as the Author can see the document.  Normal users cannot see the document until it is approved.
If Content Approval is not turned on, checking in the document, would make it visible to everyone.  With Content Approval turned on, an approver would need to review the document and then approve it in order to make it visible to everyone.
DRAFT ITEM SECURITY
When the Draft Item Security option is enabled, it usually deals with a scenario where you may have a collaborative group working on a document.  This usually ties in with a Version History setting that has both Major (1.0, 2.0, 3.0 etc.) and Minor (1.1, 1.2, 1.3 etc.) versions.  In such a case, there may be a group of people that have Member/Contributor rights that allows them to change document.  There are some users who are Approvers and setting this setting determines who of these users can see items AFTER they are checked in.  Remember that only the active author can see items that are checked out.
This option is only available when the Version History setting is set to use Minor versions.
VERSION HISTORY
Lastly there is Version History.  Version history works independently from the above items with the exception of Draft Item Security which is only available as an option when Version History is set to Minor versions.
When set to Major versions, each update to the document results in a new version e.g. 1.0, 2.0, 3.0 etc.
When set to Minor versions, each update results in a new minor version e.g. 1.1, 1.2, 1.3 etc.  When the document is then Approved, a new major version is created.  As an example, the document is worked on and checked in by Bob, resulting in version 1.1.  Now Sue edits the document and upon check in, it results in version 1.2.  This continues until they are ready for the document to be approved.  At this point, they choose to Publish a Major version.  The document approvers are notified of the submission and they review it.  Once they're happy with it and approve the document, SharePoint publishes the document as version 2.0.
 
And that is how these items work together in the SharePoint environment.  I hope this helps to shed some light on this subject.

How do I - Identify the SharePoint site template type and ID of a given sub web?

This one always comes up at some point in time, especially after migrations.  I've seen issues with migrated sites many times when custom site templates were used for sites, since SharePoint doesn't know how to upgrade these sites 100%.  A good example is the Fab40 templates that people loved to install in SharePoint 2007.  When migrating to 2010, the templates are not supported and if the templates were not installed on the target server, issues will arise with the sites.  The most common of these are that the home pages will simply throw a 404 error.  You can navigate through the site settings pages just fine, but the home pages just doesn't work.  For this reason, I always start my trouble shooting by asking what type of site I'm dealing with.  Since it's most unlikely that your site admin would know in most cases, it becomes necessary to be able to identify that.  Here's a quick Powershell script for doing so.
$web = Get-SPWeb "http://nirvanamode.india.com/Research/Encryption Algorithms"
write-host "Template Name: " $web.WebTemplate
write-host "Template ID: " $web.WebTemplateId
$web.Dispose()
NOTE:  The URL supplied to Get-SPWeb should be in quotes and should NOT contain unescaped characters i.e. http://nirvanamode.india.com/Research/Encryption%20Algorithms will NOT yield a valid SPWeb object, but "http://nirvanamode.india.com/Research/Encryption Algorithms" will.

Run stsadm.exe command from any command prompt

Many a times people think of running stsadm.exe commands from any command prompt.  So here is the way:
•  Open command prompt
•  Type in the following command:  @set PATH=C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN;%PATH%
•  You can now run the stsadm.exe commands from anywhere in the command prompt

Search does not work with Anonymous Access

This is a default behavior seen in SharePoint that anonymous users do not get search results.  Security trimming prevents anonymous users from seeing items in search by default.
RESOLUTION:
Enable “Always index all ASPX pages on this site” on the site collection.
Perform the following steps:
• Open the SharePoint Site
• Click on Site Actions, Site Settings and Modify Site Settings
• Click on Search Visibility
• Select the option that says “Always index all ASPX pages on this site”
• Perform a full crawl again
• Log into the site anonymously and perform search and you should get search results now

The document could not be opened for editing. A Windows SharePoint Services compatible application could not be found to edit the document.

This is very common issue with office documents.(Excel , Word)
Most of the time issue has been resolved by hot fixes provided by Microsoft
This issue I found with MS Office Project documents and this works for me.
Please follow below steps to resolve MS Office Project document compatibility issue with SharePoint


1. On the local computer, install Windows SharePoint Services Support from the Office installation media.(It is listed under Office Tools.)


2. The following registry keys must be added to the local machine.


[HKEY_CLASSES_ROOT\MSProject.Project]
@="Microsoft Office Project Document"


[HKEY_CLASSES_ROOT\MSProject.Project\CLSID]
@="{74B78F3A-C8C8-11D1-BE11-00C04FB6FAF1}"


[HKEY_CLASSES_ROOT\MSProject.Project\CurVer]
@="MSProject.Project.9"


[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App
Paths\Winproj.exe]
@="\"C:\Program Files\Softricity\SoftGrid for Windows Desktops\sfttray.exe" /launch
"Microsoft Office Project 2003 projecpm.311""
"UseUrl"="1"
"SaveUrl"="1"
--note that "Microsoft Office Project 2003 projecpm.311" refers to the actual name
of the package. The name will be different for every case.


[HKEY_CLASSES_ROOT\.mpp]
@="MSProject.Project.9"
"Content Type"="application/vnd.ms-project"
"SoftGridSource"="{C5F5D9DD-0FE3-4421-A2BE-F8203F53EAD9}"

Error 503 and unable to access the MOSS site

Problem Description:
Gets error 503 and unable to access the MOSS site anymore after installing a German language pack

Error Message:
503, service is unavailable
Farm Configuration:
Product / Version / Bit: SP2010/14.0.6335.0000/X64
Operating System / Service Pack/Bit: Win 2k8 R2 /SP2/X64
Farm Configuration: 3 WFE
Hardware (Physical/virtual): Hyper-V
Database Used: SQL server 2008 R2
Troubleshooting Done:
1.   Tried accessing all the sites, just to make sure that the problem is restricted to one site or across the whole farm
2.   Reviewed SharePoint logs
3.   Checked event logs
4.   Checked the connectivity between SQL and SharePoint
5.   Checked the application pools are running or not
Cause:
Found out that the applications pools are all stopped and that’s why the sites not running.
It looks like when the language pack is installed and then the issue started happening.
Resolution:
Started the application pool one by one and tried accessing the sites
All sites are accessible now without any issues…
Additional Notes:
Noticed that one of the content DB (SP_content_XXX) shows that a few sites are not upgraded to SharePoint 2010.
Detached the content Database and attached it back to the same web application, just to make sure that the DB gets upgraded.
Product Applies To:
SharePoint 2010
SharePoint 2007

Unable to edit Content Editor Webpart – Error on page

Issue
While moving the Content Editor Webpart from one place to another We get the following error message “Error On page” on the Bottom left of the IE.
Or
After moving the content Editor Webpart, when we click Exit edit mode. It gives “Unexpected error has occurred”
Cause
This usually happens whenever we copy the HTML code from one Content Editor webpart to another, due to which the Webpart ID is also copied and it conflicts.
Resolution
Modify the Content Editor Web part
Open the Source Code
Remove the following Tag from the code for e.g.:- ”id=WebPartWPXX WebPartID=”XXXX-XXXX-XXXX-XXXX-XXXXXXXX

Unknown Error Trying To Lock File

Issue:
An error screen while try to edit Office 2007 documents uploaded in SharePoint Document library
Unknown Error Trying To Lock File
This is mostly related to operating system and already been fixed in SP1, though sometimes we have to modify below registry settings.
Resolution:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters
On the Edit menu, point to New, and then click Multi-String Value.
Type AuthForwardServerList, and then press ENTER.
On the Edit menu, click Modify.
In the Value date box, type the URL of the server that hosts the Web share, and then click OK.
Exit Registry Editor.
Ref:      http://support.microsoft.com/kb/943280/en-us

Friday, May 3, 2013

Diff between WFE,applicationserver,database server in Sharepoint

Diff between WFE,applicationserver,database server in Sharepoint

 

These what are called server roles, all can be on the physical Server or can be on multiple servers.


WFE Role hosts SharePoint site and handle user requests,
Database Role hosts and manage SharePoint databases,


Application Role can host some services like Excel, Forms 

Thursday, May 2, 2013

Sandboxed Code Service is failing to start

I was working on a issue today where The processes associated with the service will appear to come up to the user but will disappear immediately. The SharePoint ULS logs show the following error:

'Process perf counters are disabled. Sandboxed code monitoring cannot continue.'

After alot of search i found that This issue occurs when the registry key 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PerfProc\Performance\Disable Performance Counters' value is set to 1.

To fix this issue, you will have to modify the registry

NOTE : This task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs.


RESOLUTION :

To fix the issue and run sandboxed code service successfully, the user should delete the registry key or set the value to '0'. To do this, follow these steps:
  1. Click Start, type regedit in the Start Search box, and then press ENTER.
  2. Locate and then click the following registry sub key:
         HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PerfProc\Performance\Disable Performance Counters
  3. On the Edit menu, click Modify
  4. In the Value data box, change the value to '0' and click on OK.
  5. Exit Registry Editor.




Users are not able to authenticate to a SharePoint site and receive an 'Access Denied' error.

Users are not able to authenticate to a SharePoint site and receive an 'Access Denied' error.

Authentication settings in Central Administration do not match the configuration in web.config

Cause :

The authentication settings for a SharePoint site need to be aligned with the settings in the web.config for the site to work correctly. SharePoint can be configured for Windows or Claims authentication. If you are using Claims authentication (Windows claims, Forms authentication or a Trusted Identity provider), the application will be configured for Forms authentication in the web.config, along with ensuring that Anonymous Authentication and Forms Authentication are enabled in IIS configuration. Conversely; if you are using classic Windows authentication then the application will be configured for Windows along with Windows Authentication being enabled in the IIS application settings.

These settings are configured when you make the appropriate selections during creation or configuration of the SharePoint web application, but can become out of sync. If there is a mismatch between the web.config and the settings in SharePoint, then the application will fail to authenticate and users are likely receive an 'Access Denied' error message.

Resolution :

  1. Ensure that the web.config contains the appropriate configuration information when compared to the web applications settings.
  2. Check the web application settings:
    • Navigate to Central Administration - Application Management - Manage web applications.
    • Select the web application in question
    • Click on the 'Authentication Providers' link from the ribbon
    • Choose the appropriate zone for the web application
    • The dialog box will display the type of membership provider (Windows or Claims-Based Authentication).
    • Record the name of membership provider for the specific zone in the 'Authentication Provider' dialog box.
  3. Locate the web.config file for the web application:
  4. Typically the web.config file is stored at C:\inetpub\wwwroot\wss\VirtualDirectories\Port_Number
  5. Verify the following section in the web.config file
    <configuration>
        <system.web>
          <authentication mode="" />
       </system.web>
    </configuration>
  6. If the membership provider name is Windows, then authentication mode should be set to "Windows".
  7. If the membership provider is Claims-based authentication, then the authentication mode should be set to "Forms".
 

Sharepoint 2010 User Profile Incremental Synchronization fails

User Profile Incremental Synchronization fails with stopped-server error if users upload and then delete the picture from 'My Profile' page



In a SharePoint Server 2010 environment, you have configured the User Profile Service Application to export User Profile Pictures to Active Directory by
mapping the 'Picture' property in SharePoint to the 'ThumbnailPhoto' attribute in AD.

one of the users uploads his profile picture through the 'My Profile' page and immediately changes his/her mind and deletes the picture.

In this scenario, subsequent incremental profile synchronization fails consistently with event ID 6801 until a full synchronization is run. In a production environment it is possible that this scenario will repeat for multiple users (if they upload and then delete the profile picture), so we can expect to see the failure very often. Additionally, you can see the following error logged in the event viewer

Event Log:

Log Name:        Application
Source:            FIMSynchronizationService
Date: 
Event ID:          6801
Task Category:  Server
Level:               Error
Keywords:         Classic
User:                N/A
Computer: 

Description:

The extensible extension returned an unsupported error.

The stack trace is:

 "System.Net.WebException: The remote server returned an error: (404) Not Found.
  at System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request)
  at System.Net.WebClient.DownloadData(Uri address)
  at Microsoft.Office.Server.UserProfiles.ManagementAgent.ProfileImportExportExtension.DownloadPictures(ProfileChangeData[] profiles)
  at Microsoft.Office.Server.UserProfiles.ManagementAgent.ProfileImportExportExtension.Microsoft.MetadirectoryServices.IMAExtensibleFileImport.
 GenerateImportFile(String fileName, String connectTo, String user, String password, ConfigParameterCollection configParameters, Boolean fFullImport,
 TypeDescriptionCollection types, String& customData)

 Cause

The events are processed sequentially to get a picture URL instead of the actual picture. Since the 'Add' event comes before the remove event, we try to download the picture and fail (it does not exist anymore). Hense profile import fails.

Resolution :

This issue has been addressed in the October 2012 Cumulative Update for SharePoint Server 2010 which can downloaded from

October CU 2012 - http://support.microsoft.com/kb/2687564
Hotfix package -   http://support.microsoft.com/kb/2687545