Friday, 22 June 2012

Example on using Workflow - Initiation Form Parameters

Show Custom Error In sharepoint site

As a developer, one of the first things I do after I have setup a web application & site collection is:
Open the web.config (“C:\inetpub\wwwroot\wss\VirtualDirectories\<port>”) and set:
  1. Debug=”true” instead of the default of Debug=”false” (I do a find on “debug” in Visual Studio)
  2. CallStack=”true” instead of the default of CallStack=”false” (I do a find on “callstack” in Visual Studio)
  3. CustomErrors=”Off” instead of the default of CustomErrors=”On” (I do a find on “CustomErrors” in Visual Studio) 

Workflow tutorial

Monday, 4 June 2012

Using tabs in the Enterprise Search Center in SharePoint Server 2010

Using tabs in the Enterprise Search Center in SharePoint Server 2010

When I give search presentations, one of the demos I always do is about showing users how to do some quick and easy customizations to the Enterprise Search Center to improve the search experience a little better. 

Just a quick note before we get into things too deeply. This blog post is specifically for users with SharePoint Server 2010 or Search Server Express 2010.  If you happen to have FAST Search for SharePoint (FS4SP) the process for creating scopes will be different, but the same concepts would apply.  In fact, you’ll be able to create scopes if you FS4SP the way I describe but you might get incorrect results. 

For more information on creating scopes with FS4SP check out these great blog posts:
http://blogs.msdn.com/b/jorgeni/archive/2010/02/26/search-scopes-in-fast-search-for-sharepoint-part-1.aspx
http://blogs.msdn.com/b/jorgeni/archive/2010/03/11/search-scopes-in-fast-search-for-sharepoint-part-2.aspx

Scenario:
Just about every organization has a need for scopes.  If you aren’t familiar with what a search scope is, you can think of it this way: All of the content that has been crawled by SharePoint is tossed into an index – like the index of a book.  But the issue is, that sometimes you might just one to look at a small piece of that content.  Maybe just content from a specific department, or all content tagged with a specific piece of metadata (maybe you wanted to only search within documents that were tagged as “proposals”).  A scope is what makes this possible.

One thing I suggest in my session, is that you could move old content to an archive location.  This could be a specific site, separate site collection or web application, or even a metadata flag on the content itself.  Either way, the goal is the same – get the older information out of your active search results.  But sometimes, users want to search the archives.

    In this example, I’ll walk you through the steps about how to create a scope and set up the Enterprise Search Center with a separate tab your users can use to specifically search the archive.

    1. For this demo I’m using an Enterprise Wiki as my starting point.  If you are using a different template, your steps might be slightly different.  But for the first step, you’ll want to create an Enterprise Search Center if you don’t already have one.  To do this, you’d simply need to click Site Actions > New Site then click on the Enterprise Search Center.  Give the site a title and URL and hit the Create button.

2. The next step is to create a scope.  You’ll need to make sure you have Site Collection Administrator permissions.  Click on Site Actions > Site Settings and then from under the Site Collection Administration section click on Search Scopes.


3. From the Toolbar click the New Scope button.
The create scope page will open, for the purposes of this demo you can simply fill in a Title for the scope and then hit OK.

4. This will take you back to the View Scopes page.  You should see your newly created scope listed here, but you’ll notice that under the Update Status column it will say “Empty – Add rules.”  To add rules, click on the Add Rules link.

5. On the Add Scope Rule page, at the top you’ll see you’ve got 3 options for scopes: Web Address, Property Query, and All Content.  In this example we’ll use the Web Address option.  However, the Property Query option is useful if you wanted to create a scope based on specific metadata values.
For the folder value, I’m just going to use one of my existing document libraries. So I’m going to cut and paste the URL into this field and remove the /Forms/AllItems.aspx part of the URL since it isn’t needed.

Then for the behavior section at the bottom, I’m going to leave Include selected and hit the OK button.

image


6. You’ll notice that when the View Scopes page loads that your new scope will likely need some time before it gets populated.  In my case, it’ll be another 6 minutes.  I With many other search related activities there’s a bit of waiting involved.  I usually take this time to catch up on my web surfing Smile

image


7. Once your scope has been created, it is time to head over to the Enterprise Search Center you created in the first step.  Specifically, the results page.  In my case the URL is: http://demo.contoso.com/search/Pages/results.aspx


It is okay if the page throws an error if there are no results.  But if it would make you feel better, you can always execute a query.

8. Put the page into edit mode by clicking Site Actions > Edit Page.
At the top of the page click the Add New Tab link:

image
9. On the tab page, be sure to give it a Tab Name and enter a value for the Page.  In this case, it is important to remember that when you enter the page name you need to include the full name of the page.  In my case, it was archive.aspx.  Then hit the Save button.

image

10. You’ll notice that the new tab has been created, but if you click on it you’ll get an error.  Don’t worry.  All we need to do is just create the page.  And to do that click on Site Actions > New Page.  Then press the Create button.  In this case, we’ll call the page ‘Archive’ – no need for the .aspx.  I know it isn’t consistent.  Don’t blame me – I just write blog posts.

image

11. Once the new page has been created, there’s a couple quick modifications we’ll need to make to a couple of the web parts.  First, modify the Search Box web part by clicking the Edit Web Part.  When the web part properties menu opens, expand the Miscellaneous section and edit the Target search results page URL to point to itself.  The goal here is that when someone does a search from this tab, we want to make sure it doesn’t redirect them to another page.  Once complete scroll down to the button and press OK.

image

12. Next, edit the Search Core Results web part.  Expand the Location Properties section and enter the name of the scope you created earlier. This will make sure that the results displayed in this web part are restricted to the scope we created.  Press OK when you are done.

image

Then all you’ve got to do is Check in your page and give it a test. Just remember to publish the page if you want to enabled all users to see this.  You can run a query against the All Sites scope and you should get back a big number, and then you click over to the new tab you’ll be only getting results back from your new scope – which should yield far fewer results.
ref:
http://searchingsharepoint.wordpress.com/2011/06/10/using-tabs-in-the-enterprise-search-center-in-sharepoint-server-2010/ 

Configuring Enterprise Search in SharePoint 2010


Configuring Enterprise Search in SharePoint 2010

We all have to agree that search plays an integral part of any successful SharePoint deployment and is an area that Microsoft continues to invest in with each new release of SharePoint. Microsoft went as far as acquiring FAST 2 years ago which it now offers as a separate add-on to SharePoint for those willing to invest in high end enterprise search.  In addition to FAST, SharePoint 2010 search comes in a number of flavors each offering their own feature set and capabilities which I have duplicated at the end of this article as an Appendix for convenience.
Today we will introduce SharePoint Server 2010 Search and eventually work our way up to Microsoft’s latest and greatest FAST Search Server in a near future article.  Before we deep dive into the step by step guide I will begin by listing some of the new features that you will come to expect from SharePoint Server 2010 Search.   These are as follows;
  • Boolean query syntax has finally been introduced.  These include AND, OR and NOT operators in your search queries.
  • Suggestions whilst typing and after running search queries, a feature that we have come to love with major search engines such as Google and Bing.
  • Integrating SharePoint enterprise search with Windows 7, allowing end users to utilise the Windows 7 search box to locate SharePoint 2010 content.
  • Results display has been refined to provide filters for search results such as document type, categories and managed properties.
  • View in Browser capabilities, allows end users to view documents within their own browser utilising Office Web Apps and not having to rely on launching the necessary Microsoft Office Application, or even the need of having it installed on their local machine.  This is handy when browsing your SharePoint site via Kiosks and Internet Cafes that may not be running the Microsoft Office Suite.
  • Last but not least, there have been a number of improvements to People Search, including phonetic name and nickname matching, and improved relevance and self search.
Now that we have a taste for what’s to come, let’s begin our configuration.
SharePoint Server Search is a service application which we have come to learn about over the past few articles that it is independent of other services and is no longer tied to the Shared Services Provider (SSP) that was introduced in SharePoint 2007.
SharePoint 2010 search architecture is made up of the Crawler, Indexing Engine, Query Engine and the User Interface and Query Object Model.  We now have greater flexibility and expandability with our search design in 2010 and can setup not only multiple Query Servers but can now scale out our Index server and add multiple instances.
Below is a logical overview of the components that will make up our SharePoint 2010 search configuration.
image thumb20 Configuring Enterprise Search in SharePoint 2010
Configuring the Service Application
As always we begin our journey in Central Administration / Application Management / Manage Service Applications.
Click New / Search Service Application.
Name: Enter a name for your Service Application.
FAST Service Application: Select “None” (we will leave the configuration of FAST for a future article)image thumb21 Configuring Enterprise Search in SharePoint 2010
Search Service Account: Click on Register new managed account and ensure your domain account has already been provisioned in Active Directory.  I have created a separate search account; e.g. DOMAIN\sp_search
image thumb22 Configuring Enterprise Search in SharePoint 2010
Application Pool for Search Admin Web Service: Create a new application pool for your search admin web service application.
image thumb23 Configuring Enterprise Search in SharePoint 2010
Application Pool for Search Query and Site Settings Web Service: Create a new application pool for your search query web service application.
image thumb24 Configuring Enterprise Search in SharePoint 2010
Click Create
The search service application will begin its configuration process.
image thumb25 Configuring Enterprise Search in SharePoint 2010
You will eventually be presented with confirmation that the search service application was created successfully.
If we now navigate back to Application Management / Manage Service Applications, you will notice that 2 additional services have been added to our list.  These are;
  1. Search Service Application (Typical Search Administration page which is similar to that in SharePoint 2007. From here we can create content crawl rules, reset indexes, setup content sources etc).
  2. WSS_UsageApplication (This is a new service in SharePoint 2010 that specifically handles our Usage and Health Data Collection Service Application.  This service application handles web analytics such as usage, search query usage, rating usage etc  More on this in a future article).
Let’s now launch the Search Administration page by clicking on our Search Service Application.
image thumb26 Configuring Enterprise Search in SharePoint 2010
Our Default content access account should be set to the account that we had specified at the time of provisioning the Search Service Application; i.e. DOMAIN\sp_search
Confirming Permissions
There are a couple of areas to note that we should check to ensure that our Default content access acount (sp_search) has been provided with the appropriate access permissions.  Let’s first begin by checking our User Profile Service Application by Navigating to Service Applications / User Profiles.  Just highlight the User Profiles and select Administrators from the ribbon.
image thumb37 Configuring Enterprise Search in SharePoint 2010
Our newly provisioned sp_search account should have “Retrieve People Data for Search Crawlers” selected as a permission.
image thumb38 Configuring Enterprise Search in SharePoint 2010
We will also confirm that our sp_search account has the necessary “Read” permissions against the Web Applications being crawled.
Navigate to Central Administration / Application Management / Manage Web Applications.  Again, highlight the Web Application in question and from the ribbon select User Policy.
image thumb39 Configuring Enterprise Search in SharePoint 2010
Ensure that the Search Crawling Account is set to the sp_search domain account.
image thumb40 Configuring Enterprise Search in SharePoint 2010
Content Sources
Let’s venture into our content sources listed in the Quick Launch navigation bar under Crawling.
As was the case with SharePoint 2007, our Local SharePoint sites will be detected by default, albeit without a crawl schedule.
image thumb27 Configuring Enterprise Search in SharePoint 2010
Check to see that your Start Addresses are located within your content source via editing the content source from the drop down menu.  These includes all SharePoint Web Applications and the sps3 “User Profiles” address.
image thumb28 Configuring Enterprise Search in SharePoint 2010
You can easily create your crawl schedule by clicking on Local SharePoint sites and scrolling down to Crawl Schedules.
image thumb29 Configuring Enterprise Search in SharePoint 2010
Let’s initiate a Full Crawl by clicking on Start all Crawls from the Manage Content Sources page.
Once your crawl has completed, you should confirm that there were no errors encountered during the initial crawl.  Usually any errors noted are most likely due to incorrect permission assignments.
Creating a “Basic Search Center” Site
If you haven’t done so already, from your top level site, click on Site Actions / New Site.
Select “Basic Search Center”
image thumb30 Configuring Enterprise Search in SharePoint 2010
Enter a Name and URL and click on Create.
This will provision the Search Center similar to the below.
image thumb31 Configuring Enterprise Search in SharePoint 2010
Creating an “Enterprise Search Center” Site
Let’s also create an Enterprise Search Center for comparison.  The key difference here is that we are provided with two tabs for searching, one for Sites and the other for People.  The “Enterprise Search Center” will be the search site of choice for most organizations running SharePoint Server.
From Central Administration / Application Management / Site Collections, click on Create site collections.   Ensure you are creating the Site Collection below the relevant Web Application.
Enter your Title, Description etc and select the Enterprise Tab under Template selection.  Select the Enterprise Search Center, specify your site collection administrators and click OK.
image thumb32 Configuring Enterprise Search in SharePoint 2010
This will provision the Enterprise Search Center similar to the below.
image thumb33 Configuring Enterprise Search in SharePoint 2010
As we have already completed an initial Full crawl earlier, I can now test my new search centers by performing a couple of searches.
Searching Content
image thumb34 Configuring Enterprise Search in SharePoint 2010
Searching People
image thumb35 Configuring Enterprise Search in SharePoint 2010
Now I ran into an issue when trying to search for content located in My Sites.  The crawl log displayed the following warning;
“This item and all items under it will not be crawled because the owner has set the NoCrawl flag to prevent it from being searchable”
In order to fix this issue (and this is true for any Site Collection), is to navigate to your My Site host and click on Site Actions / Site Settings.
Click on “Search and offline availability” under Site Administration, and ensure that you have Indexing Site Content, Allow this site to appear in search results? set to “Yes”.
image thumb36 Configuring Enterprise Search in SharePoint 2010
After enabling the indexing of My Sites, I was able to successfully perform My Site Content searches and the warning disappeared from the Crawl Log.
That’s all that is to it in setting up a search center in its most basic form.  From here you can expand your service applications over multiple servers providing you with redundancy, scalability and increased performance .  Until next time, happy searching icon smile Configuring Enterprise Search in SharePoint 2010

http://sharepointgeorge.com/2010/configuring-enterprise-search-sharepoint-2010/

Rules and archive sharepoint 2010

http://srinutamada1.wordpress.com/2012/01/04/retention-policies-in-sharepoint-2010/

Workflow ceration step by step

http://sergeluca.wordpress.com/2011/01/06/step-by-step-tutorial-creating-workflows-for-sharepoint-2010-step-115/

he complete Reference for Workfolw in Sharepoint 2010

 http://manning.com/wicklund/SPWAsamplechapter1.pdf


Friday, 1 June 2012

Calender and Events

1.  http://weblogs.asp.net/sharadkumar/archive/2010/03/12/aggregate-sharepoint-event-items-into-your-  calendar-view-using-calendar-overlay.aspx
2. http://weblogs.asp.net/sharadkumar/archive/2010/03/29/aggregate-sharepoint-event-items-with-exchange-appointments-into-your-calendar-view-using-calendar-overlay.aspx

Creating survey in sharepoint 2010

1. http://blog.fpweb.net/creating-adding-to-and-modifying-a-sharepoint-survey/
2. http://pollingwebpart.codeplex.com
     freeware web parts for polls

download ADOMD.NET

Windows Identity Foundation download

Lessons learned to install SharePoint 2010 on Windows 7 Home Premium

I have done issue for setting basic authentication for central administration.
its very help full link
http://kellyquwebdevelopment.blogspot.in/2011/10/lessons-learned-to-install-sharepoint.html

SharePoint 2010 instalattion on Windows 7


SharePoint 2010 instalattion on Windows 7
We have seen lots of events throughout the year 2010 for SharePoint 2010, VS.NET 2010, Office 2010, Cloud computing and many more. The time went so fast and I was so busy on several activities this year and had not got any chance to contribute much. Anyway, hopefully people will enjoy this post about few lesson learned on WSS 4.0 installation during happy holidays :)
SharePoint 2010 installation steps are already described at Microsoft site http://msdn.microsoft.com/en-us/library/ee554869.aspx . Just to recap in very short, from hardware respective, it is required to have 64 bit machine and at least 4 GB ram. However I would strongly recommend you to use 8 GB ram at least, and if you are planning to use VM, then must think to use 16 GB of ram.
SP2010 can be installed on Windows server 2008 (for both the edition) and windows 7 (64 bit) except windows 7 home premium edition. However SharePoint foundation i.e. WSS 4.0 can be installed on Windows 7 home premium editions (64 bit must).
Regarding the software prerequisite, following are the items which should be present
  • NET Framework 3.5 SP1 (I recommend to install Microsoft .NET Framework 4 Setup i.e. dotNetFx40_Full_setup)
  • Windows PowerShell 2.0
  • Windows Installer 4.5 Redistributable
  • Microsoft Sync Framework
  • SQL Server Native Client (for Sp2010 server, you can use the SQL Server 2008)
  • Chart Controls (not required for WSS 4.0)
  • SQL Server Analysis Services – ADOMD.Net (not required for WSS 4.0)
  • Windows Identity Foundation (Windows6.1-KB974405-x64.msu)
Let me explain a few errors in this blog which I face during my installation of WSS 4.0 on Windows 7 Home edition. Before leaving this paragraph, I would like you to check the features which need to be enable through Windows Feature on Windows 7 as recommended at Microsoft blog.
The steps are very similar. First thing you need to install all the prerequisite software and enable the Windows feature as recommended. Once your operating system is ready to install WSS 4.0, download the SharePoint Foundation from Microsoft site  http://www.microsoft.com/downloads/en/details.aspx?FamilyID=49c79a8a-4612-4e7d-a0b4-3bb429b46595&displaylang=en).
1. Follow the Step2 at Microsoft site and create a directory SharepointFiles in C:\ drive. To extract the files, the command that has been published on Microsoft site i.e. c:\SharePointFiles\SharePoint /extract:c:\SharePointFiles  is wrong and it will be c:\SharePointFiles\SharePointFoundation/extract:c:\SharePointFile (typo mistake :) )
The next steps are pretty simple. Just change your config.xml, located in the following path: c:\SharePointFiles\files\Setup\config.xml and add the line only <Setting Id=”AllowWindowsClientInstall” Value=”True”/>. Don’t just copy the entire config file which is published at Microsoft site on your local before installing WSS 4.0. once it is done, run the setup.exe.
During installation through the wizard, the following error may occur:
System.IO.FileNotFoundException: Could not load file or assembly ‘Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35′ or one of its dependencies. The system cannot find the file specified.
File name: ‘Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35′
Could not load file or assembly 'Microsoft.IdentityModel'
Make sure you installed the .NET 4.0/.NET 3.5 with SP1 and Windows Installer 4.5 Redistributable.
Another error could be as follows:
The job definition “Microsoft.SharePoint.Administration.SPTimerRecycleJobDefinition” (id “01780abf-ece1-4216-a44e-b66d212a6035″) requires the Administration Windows Service (“SPAdmin”), but this service is not currently running.
Make sure you setup Windows Feature on Windows 7 correctly as recommended by Microsoft. Also check what credential you are using to install this product. You need to have Administrative privilege for doing so.
Once it is done, the following successfully message will appear.
SP2010-Instalation-Sucessfull

One more tip still left :) . After installation if you found the blank page after loading the page for the default portal or for Central Administration site (if you view the page HTML, only three to four line will be there without any error message), it signifies a few things need to be change at IIS level.
Open the IIS and go to the web application where SharePoint default portal installed and in the authentication section make sure Asp.NET Impersonation and Basic Authentication is in enable state. Reset your IIS and try again. Hopefully it will not frustrate you more and SP2010 page will appear.

IIS setup