Wednesday, 19 November 2014

Configure Search in SharePoint 2010


In this article I am describing how to configure Search in SharePoint 2010.

1. Go to SharePoint Central Administration.

2. Click on Application management then select Manage Service application.

ConSerShare1.gif

3. Click New and select Search Service Application

ConSerShare2.gif

4. Give a name for your Service application.

5. Select Search Service account or register new Service account in the drop down.

6. Better create a new application pool for your Search service as shown below.

ConSerShare3.gif

7. Once done Click OK.

ConSerShare4.gif

8. It will take some time to configure the service.

9. Once configured correctly you will see the service created like below.

ConSerShare4.1.gif

10. Click on the Search Service Application 1 that we create now.

11. Select Content Source.

ConSerShare5.gif

12. Click on the Local SharePoint Site.

ConSerShare6.gif

13. Add the Web applications that you need to put in Search Services as shown below.

ConSerShare7.gif

14. You have to configure Full and incremental crawl schedules in the preceding screen.

15. Now go back and start a Full crawl.

ConSerShare8.gif

16. You will get the following screen.

ConSerShare9.gif

17. Even though you have done all these steps you may get some error while searching "The search request was unable to connect to the Search Service".

18. To avoid this you have to perform the following steps.

19. Go to Application management and select Configure Application Association as shown below.

ConSerShare10.gif

20. Click on your application.

21. From the "Edit the following group of connections" drop down select Custom.

22. Associate your search service with your web application.

ConSerShare11.gif

23. If you done this step you may have to start the crawl once again.


Reference:

http://www.c-sharpcorner.com/uploadfile/Roji.Joy/configure-search-in-sharepoint-2010/


How to Optimize SharePoint 2010 Search With Managed Property


In this article I am showing you how to create a managed property in SharePoint 2010. Normally we should use SharePoint to search and the results includes folders, documents and web pages. Sometimes SharePoint may take a long time to search a page looking for documents and web pages that meet the search criteria. In this article I am showing you a way to make it easier for users to identify content other than folders in their search results.
Create a Managed Property
The managed property can be used to help users filter search results to make it easier for them to identify relevant content.

Create a New Managed Property
  1. Navigate to Central Administration.
  2. Under Application Management, click the Manage Service Applications link.

    img1.jpg
     
  3. Click the Search Service Application link.
  4. In the left navigation panel, click the Metadata Properties link.
  5. At the top of the page, click the New Managed Property link.

    img2.jpg
     
  6. In the Name and Type section, typeDocumentType in the Property name text box.
  7. In the Mappings to Crawled Properties section, click the Add Mapping button.
  8. In the Crawled Property Selection dialog, type ows_contenttype in the Crawled Property Name text box, and then click the Find button.

    img3.jpg
     
  9. In the Select Crawled Property list, select the ows_contenttype (Text) crawled property, and then click the OK button.
  10. Check the Include values from a single crawled property based on the order specified option.
  11. In the Optimize Managed Property Storage section, check the Reduce storage requirements for text properties by using a hash for comparison option.
  12. Click the OK button to finish.
Start a Full Crawl on the Content Source
  1. Click the Content Sources link in the left navigation panel.
  2. Hover your mouse above the Local SharePoint sites and click the drop-down arrow.

    img4.jpg
     
  3. In the context menu, click Start Full Crawl.
  4. After the full crawl is completed, the new managed property can be used in the Refinement Panel Web Part in the next exercise.
  5. Please do an IIS reset, this is to refresh the managed properties cache.
Use a Managed Property in the Refinement Panel Web Part
The managed property can be added to the Refinement Web Part to help users filter search results. We start by adding a new refinement category to the web part. This is accomplished by creating and modifying XML and adding it to the Refinement Web Part's configuration. When this is done, you will do a search and filter the results using the new managed property.

The main task we are going to perform are listed below
  1. Navigate to the search results page and open the Refinement Panel Web Part for editing.
  2. Create and modify XML to add a new filter to the Refinement Panel Web Part.
  3. Execute a search and use the new category filter.
Navigate to the Search Results Page and Open the Refinement Web Part for Editing
  1. Open your browser and navigate to your web application.
  2. On the Site Actions menu, click New Site.
  3. Select an Enterprise Search Center Site and enter Search for the URL and Title.
  4. Click Create.
  5. You will be navigated to the results page URL: http://hostaddress/SearchPages/results.aspx
  6. On the Site Actions menu, click Edit Page.
  7. In the Refinement Panel Web Part, hover your mouse over the upper-right corner until a blue drop-down arrow displays. Click the drop-down arrow to display the Web Part menu, and then Edit Web Part. This opens the Web Part tool pane.

    img5.jpg
     
  8. In the Refinement section, clear the Use Default Configuration check box.
Create and modify XML to add a new filter to the Refinement Panel Web Part.
In the Refinement section, click on the Filter Category Definition textbox, and then click the ellipsis button for the Filter Category Definition field. This opens the Text Entry window for the Refinement Panel Web Part's Filter CategoriesDefinition property.
  1. Next, insert the XML snippet at the place noted in the previous illustration. This represents the new filter category using the managed property you created earlier.

    Category XML
    <Category Title="Document Types" Description="Different types of documents" Type="Microsoft.Office.Server.Search.WebControls.ManagedPropertyFilterGenerator" MetadataThreshold="5" NumberOfFiltersToDisplay="4" MaxNumberOfFilters="20" SortBy="Frequency" SortByForMoreFilters="Name" SortDirection="Descending" SortDirectionForMoreFilters="Ascending" ShowMoreLink="True" MappedProperty="DocumentType" MoreLinkText="show more" LessLinkText="show fewer" />
     
  2. Click the OK button of the Text Entry window.
  3. Click the OK button of the Refinement Panel Web Part's tool pane.
  4. In the Page section of the Ribbon, click the Save & Close button.
Execute a Search and Use the New Category Filter
  1. In your browser, navigate to your home page of your site.
  2. In the search box, on the home page, type Document.
  3. Click the Magnifying Glass icon to execute a search.
  4. In the search results page, the Refinement Panel displays on the left. Click a different Document Types category, specifically Wiki Page.
Observe that when you click on a Document Type category, the search results are filtered to show just the results of that category. This helps the user narrow the results, making easier to browse.

Reference:

www.c-sharpcorner.com/UploadFile/roji.joy/how-to-optimize-sharepoint-2010-search-with-managed-property/


Configuring Managed Properties in Search Service on Server


Introduction

If you want to make your custom property searchable then you need to create a managed property for that custom property.

I have added a new property "Initials" to my User Profile Synchronization Service and mapped it to a property from AD. That works and the property is properly imported into the user's profiles. I have even managed to successfully show it in search results; however I still can search for it specifically.

This managed property acts as a bridge between the search and custom properties.

Section: Configuring Managed Properties in Search Service on Server

Step 1
In SharePoint Search Service, select the "Search Schema" option.

Search Schema

Step 2
Select "New Managed Property".

New Managed Property

Step 3
The following Managed Properties need to be created.
  1. Country

    • Property Name: Country
    • Type: Text
    • Searchable: Yes
    • Queryable: Yes
    • Retrievable: Yes
    • Allow Multiple Values: No
    • Refinable: Yes-active
    • Sortable: No
    • Safe: No
    • Alias: --
    • Token Normalization: Yes
    • Complete Matching: No
    • Include content from all crawled properties: Yes
Select "Add a Mapping".

Mapping

Map

Select "All Categories" then search for "Country" then click "Ok".
The property is mapped as given in the following screen shot:

Ok

Conclusion
This tracking has an impact on the relevancy of search results. For example, a search result that is often clicked by users will automatically be displayed higher up in the search results.

Reference:

http://www.c-sharpcorner.com/UploadFile/sagarp/configuring-managed-properties-in-search-service-on-server/

Friday, 7 November 2014

Sharepoint Interview Questions

http://pravahaminfo.blogspot.in/p/sharepoint-interview-questions-and.html#!/p/sharepoint-interview-questions-and.html

http://www.softwaredeveloperbootcamp.com/how-to-answer-software-developer-interview-questions/

http://sharepointquicksolutions.blogspot.in/2012/02/tcs-and-hcl-interview-questions.html

http://sharepointquicksolutions.blogspot.in/2012/10/sharepoint-interview-questions-and.html

http://microsoft-techies.blogspot.in/2014/03/tcs-sharepoint-interview.html

http://microsoft-techies.blogspot.in/2014/03/dell-sharepoint-interview.html

http://microsoft-techies.blogspot.in/2014/03/value-labs-sharepoint-interview.html

http://microsoft-techies.blogspot.in/2014/03/cts-sharepoint-interview.html

http://microsoft-techies.blogspot.in/2014/03/tcs-sharepoint-interview.html

http://microsoft-techies.blogspot.in/2014/03/microsoft-sharepoint-interview.html

http://microsoft-techies.blogspot.in/2014/03/hcl-sharepoint-interview.html

http://chithararantech.blogspot.in/2012/07/sharepoint-2010-interview-questions_12.html

http://chithararantech.blogspot.in/2012/07/how-to-move-sharepoint-sites-from.html

http://chithararantech.blogspot.in/2012/07/sharepoint-2010-interview-questions.html

http://chithararantech.blogspot.in/2012/07/sharepoint-2010-code-samples.html

http://chithararantech.blogspot.in/2012/07/sharepoint-interview-questions-july-12.html

http://chithararantech.blogspot.in/2012/07/sharepoint-interview-questionscts.html



http://subhashnetworld.blogspot.in/search/label/sharepointinterviews

http://www.rajeshg.me/2013/05/sharepoint-developer-2010-interview.html

SharePoint 2013 Interview questions

http://www.learningsharepoint.com/2013/03/14/sharepoint-2013-interview-questions/

http://www.learningsharepoint.com/2011/09/03/sharepoint-2010-developer-interview-questions-and-answers/

http://www.learningsharepoint.com/2010/07/26/sharepoint-2010-workflow-interview-questions/

http://www.learningsharepoint.com/2010/06/27/sharepoint-2007-object-model-interview-questions/

http://www.learningsharepoint.com/2010/06/12/sharepoint-programming-interview-questions/

http://infomoss.blogspot.in/p/sharepoint-interview-question-and.html

http://www.nonlinearcreations.com/Enterprise/how-we-think/articles/2011/04/Six-critical-questions-for-any-SharePoint-developer.aspx

http://sharepoint.infoyen.com/sharepoint-faq/sharepoint-faq-1/

http://interviewquestionsharepoint.blogspot.in/2010/03/sharepoint-interview-questions-for.html

http://interviewquestionsharepoint.blogspot.in/2010/02/sharepoint-interview-questions-for_10.html

http://mysharepointwork.blogspot.in/2010/03/sharepoint-interview-questions-moss.html

http://sharepointontop.blogspot.in/2013/03/sharepoint-2013-development-interview.html

http://sharepointontop.blogspot.in/2012/08/differences-between-sharepoint-2010-and.html

http://blog.robgarrett.com/2011/03/09/interview-questions-for-sharepoint-developer-position/

http://www.c-sharpcorner.com/uploadfile/manni_prince/sharepoint-interview-questions-and-answers/

http://sharepointdeveloperinterviewquestions.blogspot.in/

http://sharepointdeveloperinterviewquestions.blogspot.in/p/sharepoint-developer-interview-questions.html

http://blog.pluralsight.com/sharepoint-resumes-interviews

http://blog.pluralsight.com/sharepoint-job-descriptions

http://www.sharepointsecurity.com/sharepoint/sharepoint-development/sharepoint-developer-interview-questions-answers/

http://dotnetdatastuff.blogspot.in/2013/02/sharepoint-2010-developer-interview_14.html

http://www.softwaredeveloperbootcamp.com/how-to-answer-software-developer-interview-questions/











 

Thursday, 9 October 2014

Deploying asp.net applications on IIS web server

Excellent step by step article by Thamilselvan Jagadeesan

This article describes step by step process of how to host the asp.net application on the IIS web server and configure application pool in a simple way. I’m using Windows 7 enterprise edition and IIS 7.5 for this demonstration.                       


Introduction



Assume you have completed the development process and testing and want to deploy in a server, here I’m providing few steps to deploy the application. Actually every developer wants to deploy their application but opportunities can’t get for everyone however see the below steps.

IIS server installation

First we need to make sure that the all IIS related components are installed properly in the system. To verify this, go to Control Panel à Click Get programs as below
You will reach the below screen and click àTurn Windows feature on or off on left side panel

Once you clicked the above link you will get Windows feature screen as like below and need to verify whether IIS related components are installed or not. Below highlighted rectangle box shows IIS related components and should be checked necessary components. If not then needs to check the checkboxes and install it using windows 7 CD.


Build setup

So now you have verified IIS components and everything installed perfectly then we need to prepare application build to deploy in the server. So publish the build from application solution as shown below and provide path to place the build.

Right click on the project and click publish the you will get Publish Web window, here we need to provide the build target location to store then click publish.

Once publish is done, you will get the application build in specified path as like below

Open IIS


So now we have application build in the specific location and deploy this build in IIS. To open/access the IIS web server, go to Run window and type “inetmgr “ as like below
Or Control PanelàAll Control Panel ItemsàAdministrative Tools and click Internet Information Services (IIS) Manager then you will reach IIS web server as shown below

Add Application Build

Right click on the left side Default Web Site under Sites and click again Add application in the menu to add the application build in IIS web server. Once you clicks Add application, you will get Add application windows as shown below and provide application Alias name and map the physical location of build where we placed the application build and click OK.

Add Application Pool

After added the application, you will see the application name under Default Web Site. Now we have to configure Application pool for the application. A web server may contain more then one application and each application belongs to application pool. Actually application pool isolates the application from other application. So click Application pool Under TESTAPP as shown below and click Add Application Pool in the menu
Here we need to provide the Application pool name and click Ok
Once done the above and go to Defult Web site and right click on “myfirsthosting” application àManage Application à Advanced Settings.. then you will get below window
Click top right side small button rectangle box showing opposite to Application pool then you will get Select Application pool window and select existing Application pool name which we created earlier in the application pool section and click Ok, that’s it now we have configured the Application pool, Remaining part is browse application through IIS web server.

Browse Application

All setup is ready now and need to browse the application from IIS, for that right click on application name in IIS and click Manage Application in the menu and click Browse option as shown below.

See the below snapshot, displaying the default page of the application successfully
So now you have deployed the application in IIS web server and hope this will help for developers to deploy the application in development or test machine. Please priovide your feedback and suggestions.


Reference:

http://www.dotnetgallery.com/kb/resource7-Deploying-aspnet-applications-on-IIS-web-server.aspx


Other Good Articles

http://www.codeproject.com/Articles/28693/Deploying-ASP-NET-Websites-on-IIS

http://www.brainbrushups.com/2013/05/how-to-deploy-or-publish-aspnet-website.html

http://www.msdotnet.co.in/2013/05/how-to-host-aspnet-website-on-iis-server.html

http://www.beansoftware.com/ASP.NET-Tutorials/Set-Up-IIS-ASP.NET.aspx

http://www.aspdotnet-suresh.com/2012/04/aspnet-host-website-on-local-machine.html


 

Tuesday, 30 September 2014

Importing Thumbnail Photos from AD(Active Directory) into SharePoint 2010

Good Article by Harmeet

Problem
Lately I have seen several people having difficulties in importing thumbnail Photos from Active Directory. In this post I would be explaining the step by step process of importing thumbnail Photos
PreReq
I am assuming that you have a working User Profile Service application and MySites configured. You should be successfully able to import users
Setup
I have OU called “PictureOU” inside my domain “Contoso.com”
I have a single user called “Harmeet”






At present there is no picture associated to this user inside Active Directory.




Note- You will not see all the user attributes if you have not turned on the “Advanced Features”. You can also view the same information from ADSI.
How to import Pictures
Now our Goal is to import Harmeet profile along with his picture, we will also upload his picture in AD.
1) First we need to make sure we are able to import users. So I will create connection to OU – PictureOU and import users






Note- I am only importing users from OU PictureOU
2) Let’s check Harmeet’s profile in SharePoint and make sure there is no picture associated to it.





Picture for this user is set to be blank
3) Upload Pictures to Active Directory.
Lots of people also have trouble in finding out ways to upload pictures in Active Directory. Following are the two best methods that I am aware off
A. Run these commands in Windows Powershell. We need to have Windows Administrative tools loaded for this to work
Import-Module ActiveDirectory
$photo=[byte[]](Get-Content C:\harmeet.jpg -Encoding byte)
Set-ADUser "harmeet" -Replace @{thumbnailPhoto=$photo}
B. We can use AD Photo Edit tool available at http://www.cjwdev.co.uk/Software/ADPhotoEdit/Info.html . Please note that this is not a Microsoft supported tool
Note- By default users do have permission to change their own picture, if you are doing it for a different user then make sure you have required Permissions on Active Directory
4) Let’s check User properties in Active Directory and make sure if has Picture value set





5) Map the Picture property to Thumnail Photo
A) Browse to User Profile Service Application from Central Administratoion and then click on Manage User Properties
Central Administration > UPA > Manage User Properties
B) Click on Picture and then Edit





C) We need to Map this to Attribute “thumnailPhoto” and Select Import from the Direction. Make sure you click on on Add





D) After clicking on Add make sure it shows up under the “Property Mapping for Synchronization”section







E) Click on OK
6) Start incremental Import
7) Let’s check the User properties and see if the image has been populated






So Picture still showing blank
8) Let’s check MIIS client and see if it made an attempt to import the picture. For this we will need to DS_DELTASYNC







So it does appear that FIM picked up the image successfully from Active Directory
9) Let’s check the Sync DB by running the following query
Select sAMAccountName,SPS_MV_OctetString_PictureURL from MMS_Metaverse with(nolock) Where SAMAccountName like '%UserName%'




So it appears Sync DB has successfully got updated with the Image.

10) Now let’s check the Profile DB by running the following query
Select NTname,PictureURL from UserProfile_full with(nolock) where NTName like ‘%harmeet%’





So it appears that Picture has not made it to the Profile DB
11) Run the following in SharePoint Management Shell
Update-SPProfilePhotoStore -CreateThumbnailsForImportedPhotos 1 -MySiteHostLocation http://mysite
http://support.microsoft.com/kb/2394320
12) Now if you go back to the user profile you will see that the image has been updated





Troubleshooting:
How to find if an image for a user has been imported in Sync DB
Select sAMAccountName,SPS_MV_OctetString_PictureURL from MMS_Metaverse with(nolock) Where SAMAccountName like '%UserName%'
How to find if an image for a user has been imported in Profile DB
Select NTname,PictureURL from UserProfile_full with(nolock) where NTName like ‘%UserName%’
We first import images from AD into Sync DB and then populate it into the Profile DB. By default images do not auto populate in Profile DB,we need to run the following CMDlet
Update-SPProfilePhotoStore -CreateThumbnailsForImportedPhotos 1 -MySiteHostLocation http://mysite
Image type issues
Best way to troubleshoot this issue is by creating a simple JPG file from MSPaint and then upload it to the Active Directory, if this comes through then you will need to check out the file types or the size issues.


Reference

http://blogs.technet.com/b/harmeetw/archive/2011/09/10/importing-thumbnail-photos-from-ad-active-directory-into-sharepoint-2010.aspx

 

Operation is not valid due to the current state of the object



Whenever you see this error
 
add "aspnet:MaxHttpCollectionKeys" in web.config file or app.config file in your application as shown below
 
Solution:To solve this error, increase MaxHttpCollection value. Try adding the following setting in your web.config's <appsettings> block.

<appSettings>
<add key="aspnet:MaxHttpCollectionKeys" value="3000" />

</appSettings>


you can change the value accordingly as per your need.


Thanks,
Praveen

Reference

http://dotnetknowledgebox.blogspot.in/2012/10/operation-is-not-valid-due-to-current.html