Monday, August 9, 2010

SP2010 Ajax Issues

Problem:
Ajax is not working as expected in SharePoint 2007.

Solution:
1. First we need to install Ajax extensions on the SharePoint server.
2. After installed Ajax, We need to add the corresponding entries in web.config file to know the web application that the script manage, ajax requests etc... For this we need to change the configuration.
3. Copy all the ajax dlls to GAC and then follow the instructions below.

There are plenty of problems while integrating Ajax into SharePoint when i was very new to SharePoint. I solved those problems after a long research on Masterpage and Java scrpt.

Here are the steps i followed.
Before change any of the file as mentioned below please take the backup of every file and save it in some safe location.

When i was new to learn SharePoint, i implemented this. I am not completly sure that we need to change the authorizedTypes Tag in web.config of my site ot not, but it works.
The changed section looks like below.

Web.Config changes
































Master page changes:
Second, i removed the onload function from BODY tag. This was causing problem, i am not sure that whether we need to remove or not!!! But it's working as expected.

I removed following section from BODY of master page.
onload="javascript:if (typeof(_spBodyOnLoadWrapper) != 'undefined') _spBodyOnLoadWrapper();"

JAVASCRIPT CHANGES:
Third, Go to init.js file in 12\TEMPLATE\LAYOUTS\1033 folder.
find the method spFormOnSubmitWrapper()
in this function, just remove the line return false; in
if (_spFormOnSubmitCalled) statement;
this is because, if that page is already posted back, sharepoint won't post it back again.
but to work AJAX calls, we need to disable it. Because Ajax sends the XmlHttpRequests many times depends on user requests, SharePoint ignore all the calls except the very first call. This is the reason when very first time you integrate Ajax into SharePoint the first call always successful and from the second call no response.
Hope it helps. 

Sharepoint 2010 Known Issues - Resolutions

SHAREPOINT 2010 Knowledge Base
 
This area holds all the issues\challenges in SP2010 along with there resolutions.
 
1) Issue: SP2010 Ajax Issues
 
2) Issue: Features developed for SP2007 are not getting deployed in SP2010 and the error is "Invalid Type definition in the elements xml"
    Description: Issue is a bug in WSS, due to which several users coded the elements xml for a event receiver with Type parameter as integer value. This value need to be a Enum value and SP2010 got it fixed due to which all the earlier elements xmls with integer values will fail to deploy.
    Solution: Replace the integer values with the appropriate enum values in the elements xml and deploy.
 
3) Issue:  Left menu is not visible in Internal layout pages when not visually upgraded.
    Solution: Got it clarified from product team that this is by design as the sharepoint 2010 applies a minimal master page to  the upgraded sites before the visual upgrade.
 
4) Issue:
         a) Sharepoint sites having PageViewer webpart with html pages as sources will show a Save, Cancel dialog box.
         b) Sharepoint sites with flash and silverlight objects displaying a Save, Cancel dialog box.
    Description: This happens in windows 2008 R2 due to the IIS security restriction for HTML pages.
    Solution: Go to SP2010 Central Admin --> Application Settings --> Manage webapplication settings. Select the webapplication, edit the general settings and select the option "Browser File Handling" as Permissive

Sharepoint 2010 Upgrade - ContentDb Method

There are three types of methods for migrating an MOSS 2007 site to SharePoint 2010 site.
1>     InProcess method where you install SharePoint 2010 on the top of SharePoint 2007.
2>     ContentDb Migration (detailed steps are given below)
3>     Hybrid Migration (A combination of above 2 methods)
 Please find the step-by-step procedure for the migration of a MOSS 2007 site to SharePoint 2010.
1)      Ensure that the current environment is 64 bit and october cumulative updates for sharepoint are installed on the server.
2)      Run pre upgrade check
Command : stsadm –o preupgradecheck
3)      Analyze the preupgrade check report for any potential issues and road blocks.
a.        Any issues regarding the views, large lists, OS and DB versions can be ignored.
b.       Any issues regarding missing webparts and features can be ignored.
c.        Conisder the data regarding the database schema, setup files and any critical issues mentioned.
4)      Run enumallwebs on each content DB to find orphaned site collections.
Command :  STSADM  -o enumallwebs -databaseserver -includefeatures -includesetupfiles -includewebparts -includeeventreceivers -includecustomlistview >> c:\EnumAllWebs.txt

Note : change the database server name to the content dB server name and the target file path (if necessary)
5)      Scan through the above report and identify any Orphaned sitecollections using the string InSiteMap="False". Any site collections with this string are orphaned.
6)      Run backup tree to find out different databases
a.       stsadm –o backup –showtree
7)      Run enumSSP to findout the webapplication list associated with SSPs.
a.        stsadm –o enumssp –title [nameofssp]
8)      Do a manual check in central admin for any installed solutions and site templates and note down the web applications\sites against which they were deployed
9)      Get a backup of all the solutions and site templates as .wsp packages
10)   Identify any third party components used and contact the vendor support for SP2010 compatibility.
11)   Get SSP DB from production Back up SSP
a.        stsadm -o backup -directory  -backupmethod full -item 
12)   Get Content DB from production Run preparetomove before detaching content DB
a.        Any database that is attached to a MOSS 2007 farm and consuming from an SSP has to have stsadm -o preparetomove executed prior to the actual detach from the farm
a.     b.       stsadm -o preparetomove
           {-ContentDB |
       -Site }
           [-OldContentDB ]
           [-undo]

b.     For detaching databases cleanly from the farm we really only care about the first 2 switches.  So your command might look like this.
                                                              i.      e.g., stsadm -o preparetomove -contentdb SQLSERVER:DBNAME -site http://www.rahulbach.blogspot.com 
13)   Get the 12 Hive backup, GAC folder, Inetpub folder for identifying the customizations
a.        GAC can be accessed in file system view using the command at Run prompt “%systemroot%\assembly\GAC_MSIL”
14)   Prepare the list of customizations by comparing the above files with the files in a standard environment.
15)   For identifying all the sites with the customizations found in the above list execute the windows application (App) and get the list.
16)   Move all the customizations to SP2010 environement
17)   Create webapplications in SP2010.
18)   Drop the current DB associated with the webapplications and restore and attach the SP2007 content DB.
19)   Restore the SSP database and attach the services to the web applications
20)   Deploy the solution packages and Site templates.
21)   Verify the logs for success and test the migrated sites
22)   During testing activate any custom features that are not activated as a part of restore operation.
23)   Update the document with findings and distribute.

Business Connectivity Services overview (SharePoint Server 2010)

Microsoft SharePoint Server 2010 and the Microsoft Office 2010 suites include Microsoft Business Connectivity Services, which are a set of services and features that provide a way to connect SharePoint solutions to sources of external data and to define external content types that are based on that external data. External content types resemble content types and allow the presentation of and interaction with external data in SharePoint lists (known as external lists), Web Parts, Microsoft Outlook 2010, Microsoft SharePoint Workspace 2010, and Microsoft Word 2010 clients. External systems that Microsoft Business Connectivity Services can connect to include SQL Server databases, SAP applications, Web services (including Windows Communication Foundation Web services), custom applications, and Web sites based on SharePoint. By using Microsoft Business Connectivity Services, you can design and build solutions that extend SharePoint collaboration capabilities and the Office user experience to include external business data and the processes that are associated with that data.
Microsoft Business Connectivity Services solutions use a set of standardized interfaces to provide access to business data. As a result, developers of solutions do not have to learn programming practices that apply to a specific system or adapter for each external data source. Microsoft Business Connectivity Services also provide the run-time environment in which solutions that include external data are loaded, integrated, and executed in supported Office client applications and on the Web server.

Typical solutions based on Business Connectivity Services

Solutions that are based on Microsoft Business Connectivity Services can take advantage of the integration of client applications, servers, services, and tools in the Microsoft Office 2010 suites. Information workers typically perform much of their work outside the formal processes of a business system. For example, they collaborate by telephone or e-mail messages, use documents and spreadsheets from multiple sources, and switch between being online and offline. Solutions that are based on Microsoft Business Connectivity Services can be designed to fit within these informal processes that information workers use:
  • They can be built by combining multiple services and features from external data systems and from the Office 2010 suites to deliver solutions that are targeted to specific roles.
  • They support informal interactions and target activities and processes that occur mostly outside formal enterprise systems. Because they are built by using SharePoint 2010 Products, solutions that are based on Microsoft Business Connectivity Services promote collaboration.
  • They help users perform tasks within the familiar user interface of Office applications and SharePoint 2010 products.
Here are some examples of solutions that are based on Microsoft Business Connectivity Services:
  • Help desk An enterprise implements its help desk, which provides internal technical support, as a solution that is based on Microsoft Business Connectivity Services. Support requests and the technical support knowledge base are stored in external databases and are integrated into the solution by using the Business Data Connectivity service. The solution displays both support requests and the knowledge base in the Web browser. Information workers can view their current requests either in a Web browser or in Microsoft Outlook. Tech support specialists view the requests assigned to them in a browser, by using Microsoft Outlook, and, when offline, by using Microsoft SharePoint Workspace. Workflows take support issues through each of their stages. Managers on the technical support team can view dashboards that display help desk reports. Typical reports indicate the number of support issues assigned to each support specialist, the most critical issues currently, and the number of support incidents that are handled by each support specialist during a given time period.
  • Artist tracker A talent agency integrates its database of artists into its internal Web site. The complete list of artists, their contact information, and schedules can be taken offline in Microsoft SharePoint Workspace or in Microsoft Outlook. Recording contracts can be generated and filled from the Web site, Microsoft SharePoint Workspace, or Microsoft Outlook, and a workflow guides each contract through its various stages. New artists can be added from the Web site or from Microsoft Outlook. By using this solution, agents always have the information that they need nearby and they can perform many key tasks by using familiar Office interfaces.
  • Sales Dashboard A sales dashboard application helps sales associates in an organization quickly find the information that they need and enter new data. Sales orders and customer information are managed in an external database and integrated into the solution by using Microsoft Business Connectivity Services. Depending on their roles, team members can view sales analytics information, individual team members’ sales performance data, sales leads, and a customer’s contact information and orders. Sales professionals can view their daily calendars, view tasks assigned to them by their managers, collaborate with team members, and read industry news, either from a Web browser, from Microsoft Outlook, or offline in Microsoft SharePoint Workspace. By using Microsoft Word 2010, managers can author monthly status reports that include data from the external systems.

Business Connectivity Services architecture

The following illustration shows the architecture of Microsoft Business Connectivity Services.
Business Connectivity Services architecture
A: The Business Data Connectivity service (BDC service) provides a means for storing and securing external content types and related objects. An external content type defines the following:
  • A named set of fields of data, such as "customer."
  • The operations for interacting with the data's external system, such as read, write, and create.
  • The connectivity information that lets solutions that use the external content type connect to the external system.
B: External content types are stored in a dedicated Business Data Connectivity service database.
C: The Secure Store Service securely stores credential sets for external systems and associates those credential sets with identities of individuals or with group identities. A common scenario for the Secure Store Service is a solution that authenticates against an external system in which the current user has a different account for authentication on that external system. When used with Business Data Connectivity service, the Secure Store Service provides a way to authenticate users and groups on external data sources.
D: Credential sets that the Secure Store Service uses are stored in a dedicated, secure database.
E: The Business Data Connectivity Server Runtime on front-end SharePoint servers uses the Business Data Connectivity data to connect to external systems and execute operations on the external systems for access by thin clients such as Web browsers.
F: The metadata cache provides caching of the runtime Business Data Connectivity service data. It can optionally be encrypted.
G: The Business Data Connectivity service supports connecting to SQL Server and other relational databases, Web services, and custom data connectors that comply with the requirements of Microsoft Business Connectivity Services.
H: SharePoint Web sites use Business Data Web parts and SharePoint external lists to interact with external data that Microsoft Business Connectivity Services expose.
I: Office client applications synchronize with the Business Data Connectivity service data and Secure Store Service data by using the Business Data Connectivity Server Runtime.
J: On supported Office clients (Microsoft SharePoint Workspace, Microsoft Outlook, and Microsoft Word), the Office Integration Client Runtime acts as a connector between Microsoft Business Connectivity Services running on the client and Office applications.
K: The Business Data Connectivity Client Runtime, on client computers, uses the Business Data Connectivity service data and Secure Store Service data to connect to and execute operations on external systems for access by supported rich clients.
L: Business Data Connectivity service data and Secure Store Service data is cached on client computers.

M: The Business Data Connectivity Runtime, on client computers, supports connecting to SQL Server and other relational databases, Web services, and custom data connectors that comply with the requirements of the Microsoft Business Connectivity Services.
N: The client cache refresh synchronizes the cache with the Microsoft Business Connectivity Services data and Secure Store Service data.
O: The Client Secure Store Service enables end users to configure their client mappings in the credential database that is associated with the Secure Store Service.
P: Solution developers can use Microsoft SharePoint Designer 2010 and Visual Studio 2010 to create external content types and BDC models.

Search in SharePoint 2010

There are two main enterprise search options coming with the SharePoint 2010 release:
1)      SharePoint Server 2010 Search – the out-of-the-box SharePoint search for enterprise deployments.
2)      FAST Search Server 2010 for SharePoint – a brand new add-on product based on the FAST search technology that combines the best of FAST’s high-end search capabilities with the best of SharePoint.
SharePoint Server 2010 Search represents an important upgrade to the existing search for SharePoint, while FAST Search for SharePoint 2010is a completely new offering and the first new product based on the FAST technology since FAST was acquired by Microsoft in April 2008. Customers and partners familiar with search in previous versions of SharePoint will see many important improvements in 2010, regardless of which product they deploy. For example, there is a new People Search feature for expertise identification and search-driven collaboration.

FAST Search for SharePoint 2010 adds a whole new level of search capabilities that are a superset of what comes in the out-of-the-box SharePoint 2010 Search option. Since there are now two search options in 2010, it’s useful to understand what is unique in FAST Search for SharePoint and when you might consider using it over the out-of-the-box SharePoint 2010 search. Some of the points to consider FAST Search for SharePoint 2010:
1)      Content Processing Pipeline:-

For people familiar with the FAST Enterprise Search Platform (ESP), the good news is that the most valued capabilities of ESP have been brought into FAST Search for SharePoint 2010 and made easier to access and deploy through tight integration with the SharePoint management and development tools.  The open framework in FAST ESP for creating custom content processing pipelines is a good example. Since it was first introduced in version 3 way back in 2002, FAST customers and partners have leveraged advanced content processing and advanced linguistic features to create a wide variety of novel search applications. This highly valued aspect of the FAST ESP will be available in FAST Search for SharePoint and has been architected and enhanced to take advantage of the SharePoint management interfaces and development tools like PowerShell.

2)      Meta-data Extraction:-


Meta-data is used in search for faceted refinement, relevancy tuning, targeted queries (e.g. search only the authors field), and other general techniques designed to improve findability. The problem is that unstructured documents are often devoid of useful meta-data. The ability to automatically extract meta-data to create useful structure on otherwise unstructured documents is a feature of FAST ESP that will also available in FAST Search for SharePoint 2010. Importantly, FAST Search for SharePoint 2010 takes advantage of simple administrative tools and the concept of “managed properties” in SharePoint to support adding custom meta-data extractors very quickly.


3)      Structured Data Search:-

Structured data search is possible with both search options in SharePoint 2010, but FAST Search for SharePoint 2010 adds an extra level of sophistication for searching data that contains numbers, dates, and other encoded and structured information. To start, the full FAST Query Language (FQL) is available to application developers who want the richness and expressiveness that FQL provides. This includes support for numeric and date data types, formula-based query operations, term weighting with the XRANK operator, and much more. Also, integration with the new Microsoft Business Data Connectivity services in 2010 means that ingesting structured data from external Line of Business applications is much easier in FAST Search for SharePoint.

4)      “Deep” Refinement (Faceted Search):-
Previously only available in SharePoint search through 3rd party add-ons, faceted search, called “refiners” in the default search interface (SharePoint Search Center), is now native in the out-of-box SharePoint 2010 search. FAST Search for SharePoint adds to this the ability to deliver faceted search across results sets of any size while retaining precise counts on the refinement facets. This is critical for research and analysis applications where precise counts on facets are important decision making criteria.
5)      Visual Search (Document Thumbnails and Previews):-

Visual document thumbnails and previewer Web Parts will be out-of-the-box with FAST Search for SharePoint 2010 to help users more quickly judge what is relevant in a search result list. This includes a graphical previewer for PowerPoint presentations based on Microsoft Silverlight that allows users to quickly find the “one slide” of interest without having to open up the entire presentation.

6)      Advanced linguistics:-

The quality of search against text data is highly dependent on the ability to apply the right language-specific processing techniques. FAST Search for SharePoint 2010 builds on the FAST ESP heritage and Microsoft tools to include advanced language processing (linguistics) for dozens of languages, including optimized processing for Chinese/Japanese/Korean.
7)      Visual best bets:-

SharePoint already supports the concept of search Best Bets – managed results delivered with the search for specific queries. FAST Search for SharePoint adds to this the ability to render visual best bests in the form of images and even videos. Management of search best bets, both standard and visual, is through the standard SharePoint administrative console.
8)      Best-in-class development platform:-

FAST Search for SharePoint 2010 builds on the comprehensive development framework of SharePoint 2010. The customization options range from configuring out-of-the-box search behavior (best bets) and user interface controls (Web Parts), to extending existing functionality using public Web Part code and SharePoint Designer, to creating brand new components and functionality with the available APIs. For FAST ESP aficionados, no compromises have been made in the area of extensibility with FAST Search for SharePoint, but many of the customizations in ESP are now much easier to do.
9)      Custom search experiences (per user/profile):-

FAST Search for SharePoint 2010 includes the same level of relevancy tuning available to FAST ESP. It will be possible, as it is in ESP, to create custom relevancy models tuned to differences in content sources, application needs, and user contexts. User context simply means that different users can have different search “contexts” that enable experiences optimized for their specific business needs. User context can be used to set the search sources, relevance rank profile, linguistic processing features, and other search features by user or user group. In an enterprise search setting, this means that a Sales Director does not have to see the exact same results as a Product Designer for a given query, even if they are searching the same sources.

10)  Extreme Scale and Performance:-

Scale and performance of the out-of-the-box SharePoint 2010 Search has been dramatically improved – with proven scalability to 100 million documents and more. For FAST Search for SharePoint 2010, the exact same scale-out model that exists in FAST ESP has been preserved to enable extremes of content (e.g. number of documents to search), queries (e.g. the number of queries or query rate), or both. This means search solutions that can support billions of documents and thousands of queries per second.

Friday, August 6, 2010


SharePoint 2010 Certifications

New SharePoint certifications are (nearly) here. By reading the content of these certifications, it seems that they are a little bit difficult compared to previous SharePoint certifications.
You will find more information by following the links:
Exam 70-667: TS: Microsoft SharePoint 2010, Configuring http://www.microsoft.com/learning/en/us/exam.aspx?ID=70-667&locale=en-us

Exam 70-668: PRO: Microsoft SharePoint 2010, Administratorhttp://www.microsoft.com/learning/en/us/exam.aspx?ID=70-668&locale=en-us

Exam 70-573: TS: Microsoft SharePoint 2010, Application Developmenthttp://www.microsoft.com/learning/en/us/exam.aspx?ID=70-573&locale=en-us

Exam 70-576: PRO: Designing and Developing Microsoft SharePoint 2010 Applicationshttp://www.microsoft.com/learning/en/us/exam.aspx?ID=70-576&locale=en-us


SharePoint 2010: All about Document Set

There is a lot of situations that requires the use of multiple files. These files are grouped and has to be considered as an unique item.
With SharePoint 2007, the only way to group documents together were to use folders. Now we have a way to manage, edit and shared metadata between each element of a group of files directly in the user interface without any custom development. This feature is named Document Set.
Document set is new in SharePoint 2010 and is really an interesting concept that we were waiting for a long time. So let have a global overview of this new content type available as a site collection feature.
Quick overview
When adding a new document set, this screen pops up:




image
After saving the new document set, it is available as an item in a SharePoint document library.
image
Document set is displayed as a web page with some metadata about the document set and a list with contained documents.
image
As you may know, ribbon is new in SharePoint 2010 and is available on each page. When a document set is loaded, the following ribbon items are available. We will discuss each of these features in the next paragraphs.
image image

Versioning
There is the possibility to create version of a document set and also versions for the documents in the document set. So you can create a lot of documents versions before creating a document set version.
Document versioning is performed as usual. According to your settings, new version is created when uploading the document or modify it. Version history is similar to the feature that was available in SharePoint 2007.
image
Because Document Set is a content type, we can use versioning and so on. Document set version is a snapshot of related documents with the latest versions captured when clicking on Capture Version in the ribbon.
image
Because minor versions can be considered as draft, we can check which documents versions should be used:
  • Latest major versions only;
  • Latest major or minor versions.
We also have the possibility to add a comment to the document set version.
image
Document set version history will display versions of the document set itself but also the captured versions of the documents in the document set.
image
Metadatas
Metadatas can be shared (applied) across the different documents in the document set. So you just have to add the metas to the document set and every document in the document set will use the same metadatas.
It is a very simple feature but it is really something that was missing before. Now you can perform more efficient searches as every file has the metadata on it.
Workflows
Version capture and content changes can happened on document sets. These events can be used to run workflows. Really useful for global approve on a set of documents.
image
Because documents contained in the document set are group of unique documents, workflow can be attached to each document as we did with SharePoint 2007.
image
By using both workflow levels, we can run a lot of scenarios. Approval can be applied to individual documents and to a set of documents.
Permissions
Permissions set at document level are, by default, inherited from the document set itself.
 image
You can configure permissions on each individual document within the document set. Sometimes it is necessary to grant access to a document to a particular user but not all the other documents. That’s the same way to manage permissions within a document library.
Because there is a lot of other possibilities, we will just tell that every feature available at document level is available for document set level. Just remember that document set is considered as an item.
Download
Unfortunately, there is no way to download all the files in the document set.
Document Set Welcome page
Document set have welcome page that can be customized. As you can see on the following screen, there is the possibility to add some web part on the welcome page of a document set.
It can really be useful for displaying information about the document set itself as the document set is can be considered as an single item or a set of different files that are related each other.
image
How to set up document set?
Document set is a content type. Content type will be available as soon as Document Sets feature will be activated. You need to have permissions at site collection level before activating this feature.
To enable this content type, go through the following screens:
  • Click on Site Settings
image
  • Go to Site collection features
image
  • Activate the Document Sets feature
image
The new content type is now available but need to be activated at document library level.



  • Click on Library Settings for the library that will contains Document Sets
image
  • You have to go to the advanced settings page…
image
  • … and then check the allow management of content types box.
image
  • On the Settings page, click on Add a new content type
image
  • Now, Document Set is available in your document library
image

Sharepoint