Configuring Enterprise Search in SharePoint 2010

SharePoint Server 2010 Search is a Service Application, which we have come to learn when launched SharePoint 2010, so now Search Service is runs independent of other services and is not longer tied up with Shared Service Provider[SSP] that was in MOSS 2007

SharePoint 2010 Search Architecture is made up of the
1. Crawler
2.Index Engine
3. Query Engine
4. User Interface and Query Object Model

So now we 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 are the steps mentioned to implement the Search
1. Configuring the Service ApplicationFirst we have go Central administration Site. From where we have to click Application Management link, then need to select Manage Service Application under Service Application
And from where click on New button after you have to choose Search Service Application
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)

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
This is the Windows service account for SharePoint Search Service.
Here we need to create Two new Application pool one for
1. Search Admin web Service and another one is for
2. Search Query web Service

Application Pool for Search Admin Web Service: Create a new application pool for your search admin web service application.

Application Pool for Search Query and Site Settings Web Service: Create a new application pool for your search query web service application.
Click Create
The search service application will begin its configuration process.
Now we 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 two additional services have been added to our list. These are.

1. Search Service Application (Typical Search Administration page which is similar to that in SharePoint2007. ) from here we can create
1. Content Crawl Rules
2. Reset Indexes
3. Setup Content Source etc.

2.WSS_UsageApplication(This is 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.
Lets now launch the Search Administration page by clicking on our Search Service Application.

Out Default Content access account should be set to the account that we had specified at the time of provisioning the Search Service Application, ie. Domain\SP_Search

Confirming Permissions:
There are couple of areas to note that we should check to ensure that our Default Content Access account [sp_search] has been provided with the appropriate access permissions. Lets first begin by Checking our User Profile Service Application By Navigating to Service Applications / User Profile. Just highlight the User Profiles and select Administrators from the ribbon.
Here our newly provisioned sp_search account should have “Retrieve People Data for Search Crawlers” select as permission.
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.
Ensure that the Search Crawling Account is set to the sp_search domain account
Content Sources
Lets venture into our content source listed in the quick launch navigation bar under crawling
As was the case with MOSS 2007 our local SharePoint site will be detected by default. Without a crawl schedule.
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 Application and the “sps3 User Profiles” address.
You can easily create your crawl schedule by clicking on Local SharePoint sites and scrolling down to Crawl Schedules.
Let’s initiate a Full Crawl by clicking on Start all Crawls from the Manage Content Source 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 “Basic Search Center” Site:
If you haven’t done so already, from your top level site, click on Site Action / New Site. Select “ Basic Search Center”
Enter a Name and URL and click on Create. This will provision the Search Center similar to the below.
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.
This will provision the Enterprise Search Center similar to the below. As we have already completed an initial Full Crawl earlier, so now I can test my new Search Centers by performing a couple of searches.

Search Content

Search People
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 No Crawl flag to prevent if from 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”

After enabling this indexing of My Sites, I was able to successfully perform My Site Content searches and the warning is no longer more displaying in the crawler log.
Happy Debugging and Happy Searching :)

Posted in General Interest | 68 Comments

What is New in SharePoint Search 2010

Today I 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.
1. Boolean query syntax has finally been introduced. These include AND, OR and Not Operators in your search queries.
2. Suggestion while typing and after running search queries, a feature that we have come to love with major search engines such as Google and Bing.
3.Integrating SharePoint enterprise Search with Windows 7, allowing end users to utilize the Windows 7 Search box to locate SharePoint 2010 content.
4. Results display has been refined to provide filters for search results such as document type, categories and managed properties.
5. View in Browser capabilities, allows end users to view documents within their own browser utilizing. Office Web Applications 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 Cage that may not be running the Microsoft Office Suit.
6. Last final but not least there have been number of improvements to People Search, including Phonetic name and NickName matching, and improved relevance and self search.

Posted in General Interest | 24 Comments

About Kerberos authentication

Kerberos is a secure protocol that supports ticketing authentication. A Kerberos authentication server grants a ticket in response to a client computer authentication request, if the request contains valid user credentials and a valid service principal name (SPN). The client computer then uses the ticket to access network resources. To enable Kerberos authentication, the client and server computers must have a trusted connection to the domain Key Distribution Center (KDC). The KDC distributes shared secret keys to enable encryption. The client and server computers must also be able to access Active Directory Domain Services (AD DS). For AD DS, the forest root domain is the center of Kerberos authentication referrals.

Posted in General Interest | 5 Comments

Why Client Object Model comes into the picture? Are there any specialties of them?

The main started point to think by SharePoint team are as follows.
1. Is it really necessary to have SharePoint installed on server for SharePoint development? – Yes, in SharePoint 2007 you have to install SharePoint on the server to write code and test it.
2. What is the advantage of writing more web services to serve what the clients are looking for? – This is completely not a feasible solution to give or expose web services for each and every single requirement to get and manipulate data. It has plenty of limitations and if Microsoft exposes 500 web services and you didn’t find what you really need and they are just waste. Instead write whatever you want and use them.
3. The great thinking and beautiful solution to the people who don’t allow server side coding in the SharePoint sites is ECMAscript client OM. You can create a simple javascript file and deploy into the server to get what you needed. As we know, most of the clients don’t allow server side coding but they want something to be developed. In SharePoint 2007 it’s very difficult to get this job done. But now in SP 2010 very easy.
So, these things take into high priority and makes them to come up with a great solution in the form of Client Object Model. The great advantage of it is completely looks [Syntax] like the SharePoint Object Model. So, nothing new for developers and no confusion. Infact very simple to manage and write code.

Posted in General Interest | 788 Comments

SharePoint 2010 – Complete details about Client Object Model

In earlier versions, I mean till SharePoint 2007 the code runs using the SharePoint object model to run against the server which is running SharePoint. Other than the SharePoint server object model, other way is, simply reference the web service and use that to get and manipulate data. Then what is the need of SharePoint 2010 Client object model[Cleint OM] concept?

Continue reading

Posted in General Interest | 14 Comments

Database Migration from WSS 2.0 to MOSS 2007

I have a stand alone server running with Sharepoint server 2003 , there is one Team site and One Publishing Portal of my company client. So here we have the requirement is that how we can upgrade this team site and Publishing site on another machine which running with MOSS 2007. The steps is given below
What we need to do for site and Database Migration from wss 2.0 to MoSS 2007
Step 1: Check Service Pack Level :

The first thing to verify before you do anything is to check the service pack level of your current 2.0 SharePoint installation. I found that it was still running SP1 and had never been upgraded to SP2. This presented a huge problem. At a minimum your SharePoint 2.0 installation has to be at the SP2 level. If found this out when I had the database backed up and restored to my new database server and tried to attach it to MOSS 2007. It came back saying that the database was too old and couldn’t be upgraded. So if you get a similar error message, double check the service pack level for your 2.0 installation

Step 2: Pre Scan [PRESCAN.EXE]

With the installation of Services 3.0 or MOSS 2007 comes a nice little utility to help you pre scan the 2.0 install for things that might cause errors when you migrate. You can find this utility on your 2007 server under <%root%>\program files\common files\Microsoft Shared\web service extensions\12\bin directory. Transfer the EXE to your 2.0 server and kick it off from the command line. The command line statement “Prescan /all” will start the utility and have it start enumerating all of the sites on the box.
When it is complete it will put a log file in to your Documents/Local Files/Temp directory with information as to what it found. It details any errors that it encountered, it details lists that it re-organized, and also will give you details on page customizations and the like. Verify that there are no errors, if there are, fix them before you do the migration. Rerun the prescan utility after repairing any errors to be sure that things have been rectified and are good for migration.

Step 3: Backup/Restore
We can take backup by using system admin Command [stsadm.exe]or can do by SQL Server management studio The issues can encountered here is that every time you will try to transport the backup files from one server to the next it kept on corrupting. So the solution was to use a compression utility to zip up all of the data and then transport it. That seemed to do the trick.

Step 4: Create New SharePoint Web Application on MOSS 2007 Box

Now if you have been working with and configuring SharePoint 2007 then more than likely this will be second nature to you, but there is one little step that is a bit different here. When you create a new web application usually it will default to create a new content database usually with a name like “WSS_Content_”. If we were just going to create a new web app this would be fine, but we are looking to attach a copy of the old WSS 2.0 database to this web application. So, replace the defaulted name of the database to the name of the newly migrated and restored database from the WSS 2.0 and let it rip.
SharePoint will take over and create the web application, but instead of creating a new content database it will upgrade the 2.0 database to the correct schema that 2007 uses. Once that is done you should be able to access your content through the new url root. I did go through and verify that it did bring over all of the content as well as the security settings for the sites.
Step 4b: If we don’t want a new SharePoint Web Application

Yes , so what if you don’t want a new web application? Well you can always do the same thing by attaching the migrated database to an existing web application on the 2007 box. You can do this either by the content databases interface in Central administration OR you can do it with STSADM. I would recommend the STSADM method for the only purpose that when you do the attaching and upgrade the process can take a bit of time and can possibly time out the Central Administration operation. The only issue I found with this process of attaching and upgrading is that if your 2.0 site structure had a top site (which most of all will) it will not be pulled in and overwrite the current site collection of the existing web application. At least, I found that the content at the old top site I had couldn’t be accessed. So I chose to go the path of Step 4 above.

The STSADM command line statement looks a bit like this: stsadm –o addcontentdb –url -databasename [there other optional switches you can add on if you would like but this is the base execution].
Well, I hope that this has proved useful for anyone in the need to do this type of upgrade. Again, during this process I didn’t have to really mitigate any major errors or deal with any major customizations that might have been done to the 2.0 installation. I guess I was lucky in that respect, but with other sites that might have 3rd party web parts or other customized parts you might want to really proof out the process you will use to do the migration.

Happy debugging :)

Posted in General Interest | 718 Comments

Commonn Questions Regarding SharePoint 2010

Q. Can we re-deploy the old custom solutions in SharePoint 2010.What Changes are needed to the old Solution files.
Ans. SharePoint 2010 object model contains many changes and enhancements, but our custom code will still compile and, will run as expected. You should however, rewrite and recompile any code that refers to files and resources in “12 hive”.
For Details See :
See SharePoint 2010 Object Model – Backward Compatibility

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 applications3. 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 are the security improvements in SharePoint 2010 ?
Ans. In SharePoint 2010 a variety of security methods have been introduced.

Claims-Based Authentication - Claims based authentication is based on identity. and trust.

Code Access Security – in which you can specify your own code access
security (CAS) policy for your web parts.

Sandbox Solutions – Sandbox Solutions which when deployed to the server, SharePoint runs in a special process that has limited permissions.

Cross-Site Scripting – Introduced to prevent Cross – Site Scripting (XSS) attacks.

Q. Whats New with SharePoint WebParts?
A developer can create two types of webparts using Visual Studio 2010.

1. Visual Webparts – Allows you to Drag and Drop the controls from the Toolbox to WebPart Design surface. You can of course write your custom code in the code file. You can also package and deploy your webparts directly to Sharepoint from VS by pressing Clt+F5. Visual studio 2010 also provides you with three different views for developing webparts. The views are split view, design view and Source view(as we have in designer 2007).

Note : The Visual Webpart project Item basically loads a User Control as a WebPart.

2. ASP.Net WebParts – Where a developer can build up User Interface and logic in a class file. You do not have designer for drag and drop of controls. This webpart inherits from standard ASP.Net webpart. For Deployment we can again use ctrl+f5 to deploy this webpart.

Q. What are the Visual Studio 2010 Tools for SharePoint?
Ans. Visual Studio 2010 includes SharePoint-specific project types and project item types, and includes powerful packaging, deployment, and debugging features that help increase your efficiency as a SharePoint 2010 developer.

Some of the Templates avaiable are :
1.Visual Web Part project template.
2. List defination template.
3. Content Type template.
4. Empty Project template.
5. Event Receiver template.
6. some workflow template.
7. the Site Definition template
and many more….

Q. What are SharePoint Sandboxed soultions ?
Ans. SharePoint 2010 provides a new sandboxed environment that enables you to run user solutions without affecting the rest of the SharePoint farm. This environment means that users can upload their own custom solutions without requiring intervention from administrators, and without putting the rest of the farm at risk. This means that the existing sites\pages or components will not be affected by the newly added solution.

Q. What are Requirenments for SharePoint 2010.
Ans. SharePoint Server 2010 will support only 64 – bit. It will require 64 bit Windows Server 2008 or 64 bit Windows Server 2008 R2. In addition to this, it will require 64 bit version of SQL Server 2008 or 64-bit version of SQL Server 2005.

Q. What is LINQ. How is it used in Sharepoint ?
Ans. LINQ is a feature of the programming languages C# 3.0 and Visual Basic .NET. LINQ allows you to query in an object-oriented way, supports compile-time check, gives you intellisense support in Visual Studio and defines a unified, SQL like syntax to query any data source. But unlike other languages and query syntaxes which vary from one type of data source to another, LINQ can be used to query, in principle, any data source whatsoever. It is commonly used to query objects collections, XML and SQL server data sources.

The LINQ to SharePoint Provider is defined in the Microsoft.SharePoint.Linq namespace. It translates LINQ queries into Collaborative Application Markup Language (CAML) queries.
Q. What Changes are made in SharePoint 2010 to enforce Referential Integrity?
Ans. In SharePoint 2010, Referential Integrity is enforced using two options, available with Look-up columns.

While creating a Look-up column, you can either choose a) Restrict Delete or b) Cascade Delete to define a relationship between the Look-up list and the list containing the look-up Column. Read Details at SharePoint 2010 Referential integrity – Using LookUp Column

Q. Whats Ribbon in SharePoint 2010?ans. Sharepoint 2010 Provided a new Toolbase on almost every Page from this Toolbase we can quickly perform our general action like Publishing, save, new , edit, submit, delete etc. operation.

Q . Whats New in SPALerts ?
Ans. In SharePoint 2007, alerts were send only through e-mails, but in SP2010 users can also send an alert to mobile devices as SMS Message. A New property DeliveryChannels is introduced to indicate, whether the alert is delivered as E-mail or as an SMS Message.
Q . Whats New in SPALerts ?
Ans. In SharePoint 2007, alerts were send only through e-mails, but in SP2010 users can also send an alert to mobile devices as SMS Message. A New property DeliveryChannels is introduced to indicate, whether the alert is delivered as E-mail or as an SMS Message.
Q. What Has Changed with SSP in SharePoint 2010.
Ans. In SharePoint 2010 Shared Service Providers (SSP’s) are replaced by Service Applications. Services are no longer combined into a SSP. They are running independent as a service application. The service application architecture is now also built into Microsoft SharePoint Foundation 2010, in contrast to the Shared Services Provider (SSP) architecture that was only part of Office SharePoint Server 2007.

A key benefit here is that all services are installed by default and there is no SSP setup.
Q. What are the Hardware and Software requirements for SharePoint 2010.
Ans.

Hardware requirements :
# Processor 64-bit, four-core, 2.5 GHz minimum per core.

# RAM 4 GB for developer or evaluation use, 8 GB for single server and multiple server farm installation for production use.

# Hard disk 80 GB for installation

For production use, you need additional free disk space for day-to-day operations. Add twice as much free space as you have RAM for production environments.

Software requirements :
# The 64-bit edition of Windows Server 2008 Standard with SP2. If you are running Windows Server 2008 without SP2, the Microsoft SharePoint Products and Technologies 2010 Preparation Tool installs Windows Server 2008 SP2 automatically.

For more see : Prerequisites for SharePoint 2010

Q. What Has Changed with SSP in SharePoint 2010.
Ans. In SharePoint 2010 Shared Service Providers (SSP’s) are replaced by Service Applications. Services are no longer combined into a SSP. They are running independent as a service application. The service application architecture is now also built into Microsoft SharePoint Foundation 2010, in contrast to the Shared Services Provider (SSP) architecture that was only part of Office SharePoint Server 2007.

A key benefit here is that all services are installed by default and there is no SSP setup.

Additional improvements for the service application model include:
• The services architecture is extensible, allowing third-party companies to build and add services to the platform.

• Services are managed directly in Central Administration (rather than a separate administration site).

• Services can be monitored and managed remotely.

• Services can be managed and scripted by Windows PowerShell™.

• Shared services communications take place over HTTP(S). Shared services do not directly access databases across farms.

• Most new services are built on the Windows Communications Framework. They have optimization built into their protocol, using binary streams instead of XML for data transfer. Test results show improvements in network throughput with this change.
Q. What are the advantages of Service Applications over
SSP ?

Ans. The key limitation of the SSP architecture was that it was configured by using a set of services, and all Web applications associated with the SSP bore the overhead of all the services even if they weren’t being used. To change the service configuration for a particular Web application, a new SSP would have to be created.

Users can deploy the below four things as sandboxed soultions :
1. WebParts.
2. Event Receivers.
3. List Definations.
4. Workflows.

Q. Can we create a Single set of Services that will be shared across the farm?
Ans. Similar to the SSP model in Office SharePoint Server 2007, a single set of services can be shared by all sites in a farm. By publishing a service application (from the sharing group, under Service application tab), you can share it across server farms. This capability does not apply to all service applications, and some services can be shared only within a single server farm.

Q. What are Managed Accounts?
Ans. To reduce the load of managing various service accounts in Microsoft SharePoint Server 2010, the concept of managed accounts has been introduced. Much like managed accounts in Windows Server 2008, they allow SharePoint Server to take control of all the service accounts you use. After SharePoint Server has control of these accounts, it can either manage their passwords — automatically changing them as necessary — or it can notify you when an accounts password is about to expire, allowing you to make the change yourself.

Q. What are the Methods of Backup and Recovery in SharePoint 2010?
Ans. Microsoft SharePoint Server 2010 provides a broad range of levels for performing backups, including the entire farm, farm configuration information, site collections, subsites, or lists.

SharePoint Server 2010 uses two different tools to configure backup and recovery.
1. Central Administration : Central Administration provides a user interface where SharePoint Administrators will be prompted via menu structures to select the information that needs to be backed up. (see the Image below)

2. Windows PowerShell : Windows PowerShell is a command line tool that provides SharePoint administrators a way to perform backup and recovery with additional options such as file compression or working with SQL snapshots.

Listed below are a few of the benefits available when working with Windows PowerShell:

• Windows PowerShell scripts can be developed and scheduled (with Windows Task Scheduler), whereas Central Administration is used for single-use backups and restores.

• Windows PowerShell has the advantage of running against SQL snapshots instead of the production database. One of the parameters of the Windows PowerShell command will cause a SQL snapshot to be generated, and then Windows PowerShell will run the action against the snapshot instead of the production database. This will reduce the resource impact of the backup operation on the production environment.

• With Windows PowerShell, SharePoint administrators will have more granular control of options for the backup or restore.

Q. How to Move content Databases using PowerShell ?
Ans. To attach\detach an existing content database use

Mount-SPContentDatabase “” –DatabaseServer “” –WebApplication http://WebapplicationName
is the content database to be attached.

is the name of the database server.

http://WebapplicationName is the name of the Web application to which the content database is being attached.

To detach a content database:

Dismount-SPContentDatabase “
See more Commands at Windows Powershell Common Commands

Q. How to Export a Site or List in SharePoint 2010?
Ans. SharePoint Server 2010 provides several new features that provide a granular level of backup for various components of site content. This includes content at the site, subsite, and list level.

Through Central Administration(Granular level Back-up) a SharePoint Administrator can configure a backup of a subsite or list. An Administrator can choose a site and a specific list to be exported.The administrators can also choose to export security and select the different versions that will be exported with the list. Fraud greed

Posted in General Interest | 1,146 Comments

Interview Questions and FAQ For InfoPath

Q. What is InfoPath
A. Office InfoPath 2007 is office Toll that help to design User Interface Form for Submitting and accessing data It can help you efficiently gather information through rich, dynamic forms. The information collected can easily be reused throughout organizations and across business processes because Office InfoPath 2007 supports industry-standard XML using any customer-defined schema. Office InfoPath 2007 customers who share information across their organizations and business processes can have greater business impact. Processed
Q. What does Office InfoPath 2007 provide?
A. Office InfoPath 2007 provides you with an easy and efficient way to create rich, flexible forms. In addition, Office InfoPath 2007 provides a user-friendly interface for entering information into these forms and automatically updates the data in XML format. Ready-to-use sample forms in Office InfoPath 2007 provide templates for common usage scenarios. Extend the power of Office InfoPath 2007 to browser-based environments by integrating it with Microsoft Office Forms Services. Q.Who is Office nfoPath 2007 designed for?
 
  Office InfoPath 2007 was developed for teams and organizations that need to collect and use information. Office InfoPath 2007 is valuable to any business, IT professional, or organization that needs an efficient and flexible way to collect information that can be standardized, validated, and integrated with an organization’s server systems.

•             Take advantage of existing IT investments and knowledge to ease deployment costs.

 What are some of the typical ways teams and organizations might use Office InfoPath 2007?

 A.            Office InfoPath 2007 can be applied to many different scenarios, either within organizations and workgroups, or across suppliers and partners. Using Office InfoPath 2007:

•             A division manager can design and implement a performance appraisal system.

•             A company can implement a timecard or expense reporting system.

•             A health insurance company can create and implement its forms, and then integrate them into its database system and with the business processes of member hospitals.

•             A team or workgroup can submit weekly status reports.

  Pricing and Ordering

Q. How much does Office InfoPath 2007 cost?
A. Find pricing and licensing information on the 2007 Microsoft Office System Pricing page.

 

  Will Office InfoPath 2007 be included with the 2007 Microsoft Office release?
A. Yes. Office Infopath 2007 comes with EnterPrise Edition of Microsoft Office, Find packaging information on the 2007 Microsoft Office Packaging page.

. How does Office InfoPath 2007 fit in with other Microsoft Office system programs?
A. The Microsoft Office system provides customers with a set of programs that they can choose from to best address their business needs. Office InfoPath 2007 can be used as the interface to help gather information more effectively. Microsoft Office Excel 2007 is a spreadsheet program that can help you analyze numerical data. Microsoft Office Word 2007 provides word-processing capabilities for documents. Microsoft Office Access 2007 is a database management program for storing information and creating reports. Use Microsoft Office PowerPoint 2007 to graphically present information.

 

 

Integration and Compatibility

Q. What are the system requirements for Office InfoPath 2007?
A. See the system requirements for Office InfoPath 2007.
Q. How does Office InfoPath 2007 work with existing servers and databases?
A. Office InfoPath 2007 works with any XML-enabled database or server by providing support for Web services and database interoperability.
Q. What is XML and what does it have to do with Office InfoPath 2007?
A. XML is an open, industry-standard language for organizing and storing data. Having data in XML means that the information is transportable and can be easily shared and reused.The default file format for Office InfoPath 2007 is XML, and InfoPath 2007 supports any customer-defined schema, which means that information gathered using InfoPath forms more easily integrates with server systems. Using Office InfoPath 2007 to gather information can improve the flow of information throughout the organization. Office InfoPath 2007 is a great example of how Microsoft Office system programs take advantage of XML technology to help people, teams, and organizations manage and use information more productively.
Q. How does Office InfoPath 2007 relate to Microsoft .NET connection software?
A. Microsoft .NET is a set of software technologies for connecting people, systems, information, and devices. It is built on a foundation of XML Web services, so that new and existing applications can connect with software and services across operating systems, programs, and programming languages. Office InfoPath 2007 works well as a client for Web services because it was built to work with XML and can help customers connect information with business processes and solutions.
Q. What are the advantages of having Office InfoPath 2007 as a rich client application?
A. Office InfoPath 2007 provides powerful functionality such as business logic validation, rich text formatting, AutoCorrect, and spelling checker.

 What are browser-compatible forms?

Browser-Compatible forms are open in Browser, there is no need of InfoPath Installed on Client machine if your InfoPath form is designed as Browser Compatible  design InfoPath 2007 introduced the possibility to fill out InfoPath forms by using a browser such as Internet Explorer, Firefox, Netscape, or Safari. These types of forms are called InfoPath 2007 browser-compatible forms. For a complete list of browsers that can be used to fill out InfoPath form.

 Can I use browser-compatible forms without installing Microsoft Office SharePoint Server 2007 (MOSS)?

Yes, you can, but you will have to install Forms Server to be able to run browser-compatible forms. On your SharePoint site, there must be feature Office Publishing Infrastructure activated.

 What is Forms Server?

Forms Server is the extracted version of Forms Services that comes with Microsoft Office SharePoint Server 2007 (MOSS). It is sold and can be used separately from MOSS to run and fill out InfoPath 2007 browser-compatible forms.

How do I make InfoPath 2007 forms compatible with InfoPath 2003?

 Open the form template that you want to save in InfoPath 2003 format.

On the File menu, click Save As.

In the Save as type list, click InfoPath 2003 Form Template.

Click Save.

In C# code:

XPathNavigator nav = MainDataSource.CreateNavigator(); // xPathNavigator is Class is used to walk in DataSource of your Infopath Form

string fieldValue = nav.SelectSingleNode(“//my:field1″, NamespaceManager).Value; // Here “//my:field1″ is the XPath of your Field in Infopath Form you can get by Tool Pane – DataSource , select Field, RightClick and Choose CopyXPath.

 In VB.NET code:

Dim nav As XPathNavigator = MainDataSource.CreateNavigator()

Dim fieldValue As String = nav.SelectSingleNode(“//my:field1″, NamespaceManager).Value

 How do I set the value of an InfoPath field through code?

 In C# code:

XPathNavigator nav = MainDataSource.CreateNavigator();

nav.SelectSingleNode(“//my:field1″, NamespaceManager).SetValue(“myValue”);

 In VB.NET code:

Dim nav As XPathNavigator = MainDataSource.CreateNavigator()

nav.SelectSingleNode(“//my:field1″, NamespaceManager).SetValue(“myValue”)

How do I call a web service through code?

In C# code:

First we need to create the Connection with Given web Service then we write the following Code here I take the example of HelloWorld Name of our DataConnection with our Given webService.

// Create an XPathNavigator object to navigate the secondary data source of the web service

XPathNavigator nav = DataSources["HelloWorld"].CreateNavigator();

// Set the value of the parameter to pass to the web service

nav.SelectSingleNode(“//dfs:queryFields/tns:HelloWorld/tns:name”, NamespaceManager).SetValue(“myValue”);

// Call the web service

DataSources["HelloWorld"].QueryConnection.Execute();

// Retrieve the results returned by the web service

string results = nav.SelectSingleNode(“//dfs:dataFields/tns:HelloWorldResponse/tns:HelloWorldResult”, NamespaceManager).Value;

where HelloWorld is the name of a data connection to a web service.

In VB.NET code:

‘ Create an XPathNavigator object to navigate the data source of the web service

Dim nav As XPathNavigator = DataSources(“HelloWorld”).CreateNavigator()

‘ Set the value of the parameter to pass to the web service

nav.SelectSingleNode(“//dfs:queryFields/tns:HelloWorld/tns:name”, NamespaceManager).SetValue(“myValue”)

‘ Call the web service

DataSources(“HelloWorld”).QueryConnection.Execute()

‘ Retrieve the results returned by the web service

Dim results As String = nav.SelectSingleNode(“//dfs:dataFields/tns:HelloWorldResponse/tns:HelloWorldResult”, NamespaceManager).Value

Where HelloWorld is the name of a data connection to a web service.

Date and time basics in Microsoft Office InfoPath

Problem with date Field in InfoPath Form

You want to filter data on the current month, display the date in a way that is not available in Microsoft Office InfoPath, or perform calculations with dates.

Solution

Use the fact that Microsoft Office InfoPath represents dates and times internally as YYYY-MM-DDThh:mm:ss to be able to filter, display, and perform calculations with dates and times within InfoPath.

Discussion

InfoPath comes with 3 date/time data types:

1. Date (date)

2. Time (time)

3. Date and Time (dateTime)

The following table lists the corresponding internal representations InfoPath uses for each data type:

Data Type Internal InfoPath Representation

Date (date) YYYY-MM-DD

Time (time) hh:mm:ss

Date and Time (dateTime) YYYY-MM-DDThh:mm:ss

InfoPath uses the format you set on a date/time field through the Properties dialog box of the field and the Format… button to display dates and times. InfoPath will show dates/times in any way you have indicated, like e.g. 9:46 P.M., 21:46, 2/19/2006, or 19-02-2006. Keep in mind that this is only a visual display. When InfoPath performs validation on date and time fields, it still uses its own internal date and time representations.

This is important to know when you want to write date and time values to fields using code. If for example you set a field’s data type to Date (date) and you write 2006-02-19T13:00:23 to the field through code, you will get the following validation error:

 To correct this error, change the field’s data type to Date (date) and write 2006-02-19 to the field, or change the field’s data type to Date and Time (dateTime) and write 2006-02-19T13:00:23 to the

Posted in General Interest | 2 Comments

Microsoft actually improve the documentation on SharePoint 2010 LINQ and “fix” SPMetal to work with Lookup Columns.

In SharePoint 2010 comes new libraries to perform LINQ to SharePoint (Microsoft.SharePoint.Linq to be exact).

In a very common word, this enables you use LINQ against an ADO.NET DataServices like DataContext, which is considerably faster then using LINQ against the SPList.Items collection.

In first of all , you need to generate the “proxy” classes.  For this  Microsoft provided us with this “magical” tool in SPMetal[SPMetal is a command line tool that generates entity classes, which provide an object oriented interface to the Microsoft SharePoint Foundation content databases.] which resides in [The tool is included with SharePoint Foundation and is located in %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\BIN.

], which, if you’ve got a basic site and content structure, shouldn’t be an issue.  when we work with  content types that contain Site Lookup Columns, SPMetal throws this error message (“Error, the given key was not present in the dictionary”. 

So SPMetal WON’T work with Site Lookup Columns, you discover it can utilise a parameters.xml file.  This is really helpful when deciding what content you actually require in your proxy classes.

<?xml version=”1.0″ encoding=”utf-8″?>

<Web AccessModifier=”Internal” xmlns=”http://schemas.microsoft.com/SharePoint/2009/spmetal”>

  <ContentType>

    <Column Member=”ClassId” />

    <Column Member=”Name” />

    <ExcludeColumn />

  </ContentType>

</Web>

To solve above issue you ’ve got your parameters.xml file generated, you need to re-run SPMetal adding this extra param – /parameters: parameters.xml.

Which should generate a few classes for us.

        [ContentTypeAttribute(Name = "Name of Your content Type",Id = "0x01006b2a7fb4b26842eb9c010f4fe9d1697b")]

        public partial class Name of your class  : Item

        {

            private string _Name;

            private int _Id;

            [ColumnAttribute(Name = "ID",Storage = "_Id", FieldType = "Number")]

            public int ID {

                get { return _Id; }

                set {

                    if ((value != this._Id)) {

                        this.OnPropertyChanging(“ID”, this._Id);

                        this._Id = value;

                        this.OnPropertyChanged(“ID”);

                    }

                }

            }

            [ColumnAttribute(Name = "Title", Storage = "_Name", FieldType = "Text")]

            public string Name {

                get { return _Name; }

                set {

                    if ((value != this._Name)) {

                        this.OnPropertyChanging(“Name”, this._Name);

                        this._Name = value;

                        this.OnPropertyChanged(“Name”);

                    }

                }

            }

            partial void OnLoaded();

            partial void OnValidate();

            partial void OnCreated();

            public ClassName()

            {

                this.OnCreated();

            }

        }

Here now you have got a class generated, we need to add the Lookup Field property.  What we’ve got is a simple Lookup Field, which is a content type inheriting from Item.

Now if you take a look at the EntityRef definition on MSDN, you’ll notice that they only briefly explain the concept of the Association attribute.  What they show is you are using the “Name” of the actual field, now this is incorrect, and I only found out this the hard way.  If you take a peek into the PropertyMap class in Microsoft.SharePoint.Linq and navigate to the GetSPFieldValue class.

In SharePoint 2010 comes new libraries to perform LINQ to SharePoint (Microsoft.SharePoint.Linq to be exact).

In a very common word, this enables you use LINQ against an ADO.NET DataServices like DataContext, which is considerably faster then using LINQ against the SPList.Items collection.

In first of all , you need to generate the “proxy” classes.  For this  Microsoft provided us with this “magical” tool in SPMetal[SPMetal is a command line tool that generates entity classes, which provide an object oriented interface to the Microsoft SharePoint Foundation content databases.] which resides in [The tool is included with SharePoint Foundation and is located in %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\BIN.

], which, if you’ve got a basic site and content structure, shouldn’t be an issue.  when we work with  content types that contain Site Lookup Columns, SPMetal throws this error message (“Error, the given key was not present in the dictionary”. 

So SPMetal WON’T work with Site Lookup Columns, you discover it can utilise a parameters.xml file.  This is really helpful when deciding what content you actually require in your proxy classes.

<?xml version=”1.0″ encoding=”utf-8″?>

<Web AccessModifier=”Internal” xmlns=”http://schemas.microsoft.com/SharePoint/2009/spmetal”>

  <ContentType>

    <Column Member=”ClassId” />

    <Column Member=”Name” />

    <ExcludeColumn />

  </ContentType>

</Web>

To solve above issue you ’ve got your parameters.xml file generated, you need to re-run SPMetal adding this extra param – /parameters: parameters.xml.

Which should generate a few classes for us.

        [ContentTypeAttribute(Name = "Name of Your content Type",Id = "0x01006b2a7fb4b26842eb9c010f4fe9d1697b")]

        public partial class Name of your class  : Item

        {

            private string _Name;

            private int _Id;

            [ColumnAttribute(Name = "ID",Storage = "_Id", FieldType = "Number")]

            public int ID {

                get { return _Id; }

                set {

                    if ((value != this._Id)) {

                        this.OnPropertyChanging(“ID”, this._Id);

                        this._Id = value;

                        this.OnPropertyChanged(“ID”);

                    }

                }

            }

            [ColumnAttribute(Name = "Title", Storage = "_Name", FieldType = "Text")]

            public string Name {

                get { return _Name; }

                set {

                    if ((value != this._Name)) {

                        this.OnPropertyChanging(“Name”, this._Name);

                        this._Name = value;

                        this.OnPropertyChanged(“Name”);

                    }

                }

            }

            partial void OnLoaded();

            partial void OnValidate();

            partial void OnCreated();

            public ClassName()

            {

                this.OnCreated();

            }

        }

Here now you have got a class generated, we need to add the Lookup Field property.  What we’ve got is a simple Lookup Field, which is a content type inheriting from Item.

Now if you take a look at the EntityRef definition on MSDN, you’ll notice that they only briefly explain the concept of the Association attribute.  What they show is you are using the “Name” of the actual field, now this is incorrect, and I only found out this the hard way.  If you take a peek into the PropertyMap class in Microsoft.SharePoint.Linq and navigate to the GetSPFieldValue class.

Notice that they’re using the “InternalName” to try and get the field from the SPListItem.  Now this is fantastic if you use SPMetal to generate your classes all the way, as it uses the correct InternalName of the fields.  But if you’ve got to create the lookup column yourself, then we’ve got an issue.

The InternalName it uses isn’t, in fact, the Full InternalName of the Site Column.  What SharePoint does in its wisdom, is to cutoff the InternalName value if it exceeds 32 characters in Length when it associates the Site Column with an SPListItem.  So if you do SPField.InternalName it will return the full internal name which is great, but if you do SPListItem[fullInternalFieldName] it will throw an lovely ArgumentException and won’t return the actual Field for LINQ.

When we are creating our EntityRef property for our class, we need to know the actual internalName of the column in the SPListItem NOT the fullInternalName.  Now if it’s a simple field without spaces, IE “UserName”, it will simply be “UserName”, but if said field has spaces, and has been autogenerated by SharePoint, you will need to kick up a Console App, get the SPList and navigate through its Internal Field dictionary. Here’s an example of one (“WWW_x005F_x0020_Content_x005F_x0”).

Now that we’ve got the internalName of the Lookup Field we need to add a couple of Properties to our ClassName class.

private EntityRef<LookupColumnItem> _nameofSiteLookupColumn;

            [Association(Name = "NameOfSiteLookupColumn", Storage = "_nameofSiteLookupColumn",

                MultivalueType = AssociationType.Single, List = "Lookup List")]

            public LookupColumnItem LookupColumnName {

                get { return this._nameofSiteLookupColumn.GetEntity(); }

                set {

                    if (_nameofSiteLookupColumn == null) _nameofSiteLookupColumn = new EntityRef<LookupColumnItem>();

                    this._nameofSiteLookupColumn.SetEntity(value);

                }

            }

You’ll notice, a few things there, we need to specify the List Name of the actual lookup list where the values are, the generic type we are specify in the EntityRef is another simple class generated by SPMetal which is the Content Type of “NameOfSiteLookupColumn”.

I hope you get something out of this and Microsoft actually improve the documentation on SharePoint 2010 LINQ and “fix” SPMetal to work with Lookup Columns.

 Question and Comments always welcome

Posted in General Interest | 1,052 Comments

SharePoint 2010 New Feautres

Today is 13th July and Microsoft announced about the 2010 technical Preview. This sneak pick displays only some limited features for their customers and partners the details for this you can find from Sharepoint Conference this October.

1.       New GUI

which provides the extra tool which offers the new buttons  and links on sharepoint document library for creating new documents, folders check in checked out , delete, publish and send option . this will also allows user the select multiple files and  perform checkout /  check in action.

2.       Edit web page:

 When we edit our web page now in 2010 we can see the live Preview which is same as office client. Which allow us to change image and text size as easy then current one? . change font size and select image from your client repository or web address will show the live demo, and resize the image by drag and drop.

 3.       Silverlight web part :

Sharepoint 2010 comes with out of box silver light webpart  which allow user to view an interactive rich text content, as well as these out of the box webpart provides the Zoom in/out  the content.

4.       Rich Theming:

Change sharepoint site’s look and feel using PowerPoint  themes. It will also provide the themes preview and color with different font sizes. We can upload the power point themes which is able to select sharepoint site theme, then select color plate display. By clicking the apply them sharepoint site will be changed according to your PowerPoint slide theme.

5.       Multiple browser Support:

Sharepoint 2010 created site will support multiple browser such as IE, Firefox and safari as well. SharePoint 2010 supports an extended set of browsers. It’s designed to support XHTML 1.0–compliant browsers and will support Internet Explorer (IE) 8.0 and IE 7.0, Firefox, and Safari. Notably, IE 6.0 isn’t supported. So far, there’s been no official mention of Google Chrome or Opera.

6.       Visio Services:

In sharepoint 2010 we can directly publish the Visio diagram to the sharepoint and using browser we can open Visio diagrams. There is we no need to install Visio client on client machine.

7.       SharePoint Designer 2010:

In sharepoint 2010 designer provides the new UI, enhanced new modeling capabilities and improved workflow capabilities makes designer and developers to collaborate seamlessly , in 2010 there is given a new concept entities handle the back end integration. Sharepoint provides seamlessly integration with back end system.

8.       Central administration:

New improved Central Administration screens.

9.       Sharepoint Client Object model:

Client side libraries which can be used by custom clients to interact with SharePoint data. These can be called from JavaScript, .NET or Silverlight apps.

 10.   FAST Search:

The new SharePoint release will incorporate the FAST Search technology that Microsoft acquired from the Norway-based Fast Search & Transfer company. The FAST technology provides a superset of the original SharePoint search capabilities. As its name implies, FAST Search is designed for high-end scalability. It supports a number of enhanced capabilities, including a content-processing pipeline, metadata extraction, visual search, and advanced linguistics.

11.   Usage reporting and logging

SharePoint 2010 includes a new database designed to support usage reporting and logging. The usage database is extensible, allowing third-party vendors to create custom reports based on the information it contains.

12.   BCS integration with Fast Each integration:

13. SharePoint best practices analyzer: Rule based engine for monitoring and self-healing.

14. Visual Studio 2010 SharePoint Tools: Designer for creating Web Parts visually and Business Connectivity Services Entities

Posted in General Interest | 18 Comments