13 September, 2012

How does Client object model works

Q. How does Client object model works?
Ans. When we use SharePoint client API’s to perform a specific task, the SharePoint Foundation 2010 managed client object model bundles up these uses of the API into XML and sends it to the server that runs SharePoint Foundation. The server receives this request, and makes appropriate calls into the object model on the server, collects the responses, forms them into JavaScript Object Notation (JSON), and sends that JSON back to the SharePoint Foundation 2010 managed client object model. The client object model parses the JSON and presents the results to the application as .NET Framework objects (or ECMAScript objects for ECMAScript).

Q. How many types of Client Object model extension are available in 2010 and when would you use one or the other.
Ans. To develop rich client side solutions, three set of client-side APIs has been introduced in the Microsoft.SharePoint.Client namespace. The three APIs are targeted for three different types of clients.
1. .net Managed applications – These are used when we have to create console applications or window applications, web applications which are not running inside SharePoint Contex.
2. For Silverlight applications
3. ECMAScript – It is a client object model extension for using with JavaScript or JScript. This is used for creating applications which are hosted inside SharePoint. For example, web part deployed in SharePoint site can use this JavaScript API for accessing SharePoint from browser using JavaScript.

Q. What is the purpose of calling clientContext.ExecuteQuery() ?
Ans. ExecuteQuery gives you the option to minimize the number of roundtrips to the server from your client code. All the components loaded into the clientcontext are executed in one go.

Q. What Do you know about SharePoint Object Model?
Ans. In Sharepoint Object model there are two Important namespaces, Microsoft.Office.Server and Microsoft.SharePoint . The Microsoft.Office.Server namespace is the root namespace of all Office Server objects and Microsoft.SharePoint is the root namespace for all WSS objects.

Q. How Do you use\refer External Javascript and Css file in your WebPart?
Ans. You can use javascript,Css or Image files placed in _Layouts or any other location by registering them on the webpart page.

Q. How Do you bind a Drop-Down Listbox with a Column in SharePoint List ?
Ans.
Method 1 : You can get a datatable for all items in the list and add that table to a data set. Finally, specify the dataset table as datasource for dropdown listbox.

Method 2 : You can also use SPDatasource in your aspx or design page.

Q. What are the various tools used for creating the solutions?

Ans. Some of the common tools are

1. WsPBuilder

2. VSeWSS (Visual Studio extensions for WSS )

3. Stsdev

Q. Client Object Model vs Server Object Model in SharePoint 2010 ?
Ans. using Client Object Model we can access the data from the system where sharepoint server is not installed on the machine via Web Services , API , JavaScript etc

Where as In Server Object Model is like a Production Server Environment to access the data where SharePoint server installed on the machine .

Integration of InfoPath with SharePoint

InfoPath?
InfoPath is based on industry-standard Extensible Markup Language (XML). Extensible Markup Language (XML) is a condensed form of Standard Generalized Markup Language (SGML) that enables developers to create customized tags that offer flexibility in organizing and presenting information. When you design a form, InfoPath creates a form template (.xsn) file, with an .xsn extension. When someone fills out a form in InfoPath, the data in that form is saved in XML format. This makes it easy for organizations to reuse the data elsewhere, perhaps in an existing process that relies on XML, such as an expense reporting process.

However, you don't need to understand XML in order to design or fill out an InfoPath form. The important point is that the form's XML format makes it easy to repurpose and share the data you collect.

In InfoPath, you can do two things:

Design forms:
You can design and publish interactive, user-friendly forms in design mode. In addition to inserting standard controls into a form, InfoPath lets you insert controls that offer users the flexibility to add, remove, or hide sections of a form. The forms you design can range from simple forms for collecting data to complex forms that are part of a larger business process. You don't need programming or scripting expertise to design an effective form. However, if you know how to write script, you can use Microsoft JScript or Microsoft Visual Basic Scripting Edition (VBScript)  in your forms by accessing the Microsoft Script Editor (MSE) from within design mode.

Fill out forms:
Users who have InfoPath installed on their computer can fill out forms using familiar, document-like features, such as the spelling checker and rich text formatting. Depending on the form's design, users may also be able to merge data from multiple forms into a single form, or export data to other programs. Users can also save forms to their computer, work on them offline, and then submit them to the corporate network when they are reconnected. This is especially useful for people who have intermittent or limited access to network resources, such as employees who travel frequently.

Why to Use InfoPath?
InfoPath forms can be straightforward, simple forms that are used by a few people in a small workgroup For example, a 10-person sales team can use InfoPath to fill out and share information in sales call forms. These forms can be published to and accessed from a common location on the company network, such as a form library located on a Microsoft Windows® SharePoint™ Services site. Alternatively, the sales call form can be designed so that data is submitted directly to an existing database of customer information.

InfoPath forms can also be more sophisticated forms that are integrated into the existing business processes of a large organization. For example, if a company uses Microsoft BizTalk Server to manage the process of expense claim reporting, developers in the company's IT department might design an InfoPath expense claim form that submits data to BizTalk, which then routes that data to the appropriate department for approval or processing.

The following lists are some of the most important benefits of using InfoPath:

Reusable data: The data stored in an InfoPath form doesn't have to remain locked in the form forever; it can be easily separated from the form and reformatted or reused in a variety of ways. This enables form designers to integrate form data into existing business processes.

Accurate data:   As a user fills out an InfoPath form, the data they enter can be checked for data validation errors. If your form is connected to a database or Web service, users won't be able to submit data until they fix these errors. This helps you ensure that the data you collect is accurate and error-free, and that it conforms to whatever standards you specify.

Offline support:  Unlike Web-based forms, InfoPath forms don't have to be filled out while a user is connected to a network. Users can fill out forms offline, and then submit them later, when they are reconnected.

Flexible controls: In addition to standard controls, such as text boxes and list boxes, InfoPath also includes a number of new controls, such as repeating tables and optional sections these types of controls let you create a flexible form that is designed to accommodate your users. For example, in an expense report form, you can use a repeating table to allow users to enter only as many expense items as necessary.

Tablet PC support:  InfoPath allows you to design forms for Tablet PC users. In particular, you can include special controls, called ink picture controls, in your form. Tablet PC users can then add handwritten words or drawings inside these controls.

SharePoint?
Microsoft Office SharePoint Portal Server 2003 connects people, teams, and knowledge across business processes. It unifies disparate information, facilitates easy collaboration on documents, projects, and other efforts, and presents specific applications and customized content based on a user’s functional group and organizational role. SharePoint Portal Server works with Microsoft Windows Explorer, Microsoft Office applications, and Web browsers to help you create, manage and share content throughout your organization.

Integration

Form Library
The InfoPath form library is the primary integration point between Windows SharePoint Services and InfoPath. An InfoPath form library is a special type of document library that can contain and promote any information from any XML file. All documents stored within it are based on a specified InfoPath form template.

The form library is the main distribution point for a specified InfoPath form template; it allows the form to be maintained, deployed, and shared for use by the members of an organization. The form library can display columns of information extracted from the forms. With these columns, the user can create custom views to organize the forms and their content, called property promotion.

The form library also makes the extracted information available for searching as part of the SharePoint site. A form designer can use InfoPath to publish a form template directly to the form library and to define custom views for the forms.

Scenario
You can use SharePoint Products and Technologies in combination with InfoPath to improve status reporting with a project team.

Members of a project team compose and submit project status reports on a weekly basis. The status report covers topics such as tasks, progress, issues, hours logged, and budget expended. The project manager reviews the status report submission for each team member and consolidates relevant information from all team members into a single report, which is then specified to the project sponsor.

Existing Process
Project teams use a generic status report document and store all status reports on a file share. The status report process typically operates as follows:
·         Team Member Creates a Status Report   The team member opens a local, possibly outdated, copy of the generic status report document. The team member types new information for the current reporting period.
·         Team Member Submits a Status Report   The team member posts the completed status report to a file share and sends an e-mail message to the project manager; alternately, the team member mails the status report to the project manager.
·         Project Manager Collects Individual Status Reports   The project manager checks both the file share and e-mail periodically, looking for new status reports.
·         Project Manager Browses Status Reports   The project manager must open a specific report to examine its contents, even if the project manager wants only a quick summary of the status report.
·         Project Manager Searches Status Reports   The file share is not included in an index by a search engine, so searches against the contents of the status reports are not possible.
·         Project Manager Creates the Consolidated Status Report   Once all reports are submitted, the project manager goes through a time-consuming, manual process to generate the consolidated status report for the project sponsor.
·         Project Manager Submits the Consolidated Status Report   The project manager posts the completed status report to a file share and sends an e-mail message to the project sponsor; alternately, the project manager mails the status report to the project sponsor.

Symantec AntiVirus cannot perform this action on 1 of the files you selected

Symantec Antivirus found a virus called Trojan.Fakeavalert on my computer.   It is located at C:\windows\system32 and is file C:\windows\system32\sp.dll.   The filescan found it, but "clean failed.  Quarantine failed. Access denied."  I went into Windows and tried to delete it but could not.
The error messages that I received are as follows:


Resolution:
Found this link which has a very detailed explanation regarding problem description as well as the steps that we need to resolve this issue.

12 September, 2012

SSRS SharePoint Data Extension

Introduction:
Data processing extensions in Reporting Services enable you to connect to a data source and retrieve data. They also serve as a bridge between a data source and a dataset(used in SSRS )  If required custom data extensions  can be developed by using  .Net framework  and the unique extensibility architecture of Reporting Services  which enables  us to extend specific features of the product and its components.

SSRS SharePoint Data Extension is  a custom SSRS data processing extension that makes it possible to use Microsoft SQL Server Reporting Services 2005 /2008 for building reports over SharePoint data . This let us build sophisticated reports over SharePoint list, library, and InfoPath and document library. This lets you leverage all the power of Microsoft's reporting platform like exporting list data in multiple formats (Excel, PDF, CSV, XML  ... image), SSRS subscriptions to deliver report to email and file system.



Benefits of Extension
·         Many organizations use SharePoint lists /libraries  to keep track of critical business processes / enterprise data  and these data can be useful  for  business analysis and reporting , un fortunately there is no  out of box  data extension in SSRS 2005/2008  to support  SharePoint as an data source. This custom data extension helps in transform your SharePoint site into a fully fledged application by building sophisticated and customized reports 
·         With the help 0f this extension  SharePoint data can be exported to other formats  , use Reporting Services features to export the data into excel , word(SSRS 2008), XML .etc
·         This provides options to configure access permission to specific SharePoint data. You can build reports that will display data from sites and lists for which users do not have permissions because report can execute using the credentials you specify and if required it can be configured to use credentials of the user running the report.
·         This extension development in one time investment with approximate efforts of 2- 3 weeks. Later can be reused in all those projects which need reports to be generated from SharePoint data.
·         This extension can be extended / customized based on business requirement with fewer efforts.
·         This data extension has can use CAML (Collaborative Application Markup Languages)to query on SharePoint data which leads to increase in performance because only selected rows and column will be fetched from SharePoint
·         This support easy to design query and let the developer concentrate on report layout design. Because it abstracts complex web service API of SharePoint from SSRS report designer
·         This also can query on SharePoint user profile data

Alternative of SSRS SharePoint Data Extension

Out of Box XML- Data Processing Extension
Disadvantages 
·         Design of complex  xml structure 
·         No intelligence support
·         Doesn't Support CAML Query ,Fetches  all the Data from List/ library
·         Unable to do  Join, Union, Group
Third Party Data Extension  like  Enesys RS Data Extension
·         Costly alternative

Integrating AD RMS and SharePoint

By preparing SharePoint infrastructure to store IRM-protected documents, where the protection capabilities are embedded in the document, it will make these protected documents unsearchable since they cannot be tagged or indexed while the document contents are encrypted.  This is no longer the case with AD RMS and SharePoint 2007 since the IRM policies are only applied when the documents are downloaded and they are stored unencrypted in the libraries, hence making them index able and later searchable.

With SharePoint, IRM protection is available for files that are located in document libraries. SharePoint uses the access control list (ACL) on the library or list to determine the permissions that it applies to a document for the user downloading it. Protection includes the following options with integration of SharePoint with AD RMS:
·         Whether or not users can print documents that are rights managed.
·         Whether the user can run Microsoft Visual Basic for Applications (VBA) and other custom code in the file.
·         The number of days for which the license is valid; after the specified number of days, the license expires and the user must download the file again from the document library.
·         Whether to let users upload file types that do not support IRM.
·         Optionally, the date to stop restricting permissions to the document library; after the specified date passes, Office SharePoint Server removes all rights-management restrictions from the documents in the library.
There are basically three simple steps to integrate AD RMS with SharePoint 2007 as follows:
(Notes: If we are using Windows Server 2008, as it already includes AD RMS client, there is no need to install a separate Windows RMS client as in Windows Server 2003)

Add permissions for the SharePoint server to the AD RMS certification pipeline
·         Log on to the AD RMS server as a local administrator
·         Click Start, and then click Computer
·         Navigate to c:\Inetpub\wwwroot\_wmcs\Certification
·         Right-click ServerCertification.asmx, click Properties, and then click the Security tab
·         Click Advanced, click Edit, select the Include inheritable permissions from this object's parent check box, and then click OK two times
·         Click Edit
·         Click Add
·         Click Object Types, select the Computers check box, and then click OK
·         Type the name of the SharePoint web front-end server, and then click OK twice.
·         Repeat the above three steps for other web front-end servers
·         Click OK to close the ServerCertification.asmx Properties sheet. By default the Read & Execute and the Read permissions are configured
·         Reset IIS

Specify RMS server location in SharePoint using Central Administration
·         Open SharePoint 3.0 Central Administration site
·         Click Operations, and then click Information Rights Management
·         Select Use the default RMS server specified in Active Directory.
·         Click OK

Before installation of Windows Rights Management Services Client.


After installation of Windows Rights Management Services Client


Note:  Ensure that Windows Rights Management Services Client (WindowsRightsManagementServicesSP2-KB917275-Client-ENU-X64.exe) is installed on the server. It is very small installation and takes less time. It will come by default with Windows server 2008.

Enable IRM policy to control access to the contents of a document library
1.       Open a SharePoint site and go to the document library where we want to enable the IRM policy
2.       Click Settings, and then click Document Library Settings
3.       Under Permissions and Management, click Information Rights Management
4.       Select the Restrict permission to documents in this library on download check box
5.       In the Permissions policy title box, type in the policy title
6.       In the Permission policy description box, type in the policy description
7.       Click OK

SharePoint will now automatically apply AD RMS rights to the document when it is downloaded from the document library. These rights are determined by the user permission for that library. For example, a user who has Read permission will not be able to modify the document when it is downloaded from the document library.

Notes: When AD RMS protected documents (created outside SharePoint environment) are uploaded to the library with IRM policy enabled, the original document protection policy will supersede the library protection policy when those documents are downloaded or accessed by users.  AD RMS end-to-end security prevents SharePoint from decrypting documents created outside of the SharePoint environment, hence applying the SharePoint library IRM policy to those documents.