Wednesday, January 27, 2010

Sharepoint and Workflow Interview Questions

• What is SharePoint?
Portal Collaboration Software.

• What is the difference between SharePoint Portal Server and Windows SharePoint Services?
SharePoint Portal Server is the global portal offering features like global navigation and searching. Windows SharePoint Services is more content management based with document libraries and lists. You apply information to certain areas within your portal from Windows SharePoint Services or directly to portal areas.

• What is a web part zone?
Web part zones are what your web parts reside in and help categorize your web parts when designing a page.

How is security managed in SharePoint?
Security can be handled at the machine, domain, or sharepoint level.

• How are web parts developed?
Web parts are developed in Visual Studio .Net. VS.Net offers many web part and page templates and can also be downloaded from the Microsoft site.
• What is a SharePoint farm?
Multiple machines running services for SharePoint. Otherwise known as Topology.
• What is a site definition?
It’s a methods for providing prepackaged site and list content.

• What is a template?
A template is a pre-defined set of functions or settings that can be used over time. There are many templates within SharePoint, Site Templates, Document Templates, Document Library and List Templates.

• How do you install web parts?
Web Parts should be distributed as a .CAB (cabinet) file using the MSI Installer.

• What is the difference between a site and a web?
The pages in a Web site generally cover one or more topics and are interconnected through hyperlinks. Most Web sites have a home page as their starting point. While a Web is simply a blank site with SharePoint functionality built in; meaning you have to create the site from the ground up.

• What are the differences between web part page gallery, site gallery, virtual server gallery and online gallery?
Web Part Page Gallery is the default gallery that comes installed with SharePoint. Site Gallery is specific to one site. Virtual Server gallery is specific to that virtual server and online gallery are downloadable web parts from Microsoft.

• What is the GAC?
Global Assembly Cache folder on the server hosting SharePoint. You place your assemblies there for web parts and services.

• What is a DWP?
The file extension of a web part. (Description of web parts)

• What is CAML?
Stands for Collaborative Application Markup Language and is an XML-based language that is used in Microsoft Windows SharePoint Services to define sites and lists, including, for example, fields, views, or forms, but CAML is also used to define tables in the Windows SharePoint Services database during site provisioning.

• What is a document library?
A document library is where you upload your core documents. They consist of a row and column view with links to the documents. When the document is updated so is the link on your site. You can also track metadata on your documents. Metadata would consist of document properties.

• What is a meeting workspace?
A meeting workspace is a place to store information, attendees, and tasks related to a specific meeting.

• What is a document workspace?
Document workspaces consist of information surrounding a single or multiple documents.

• What is a web part?
Web parts consist of xml queries to full SharePoint lists or document libraries. You can also develop your own web parts and web part pages.

• What is the difference between a document library and a form library?
Document libraries consist of your core documents. An example would be a word document, excel, PowerPoint, Visio, pdf, etc… Form libraries consist of XML forms.

• What are themes?
Themes provide a quick a easy way to change the appearance of your SharePoint site
.
• What is presence?
Allows users to see if other users are online and can send them instant messages.

• Can web parts be connected? If so, how?
Web Parts can be connected by modifying the Shared Part and providing the connection with the correct fields to share.

• What is a personal view and what is a shared view?
Personal views are specific to a user while Shared View is common across all users.

• What is an STP file?
The file extension that applies to site templates.

• What is an FWP file?
The file extension that applies to SharePoint sites that have been backed up.

• How does SharePoint support MS Outlook integration?
Via Web Parts available at the Microsoft Web Component Directory. Oh yeah and Active X Controls.

• How can you extend lists in SharePoint?
If you mean extend by adding columns of data and have specific data types for each column the answer is yes. You can also use Data Views in FrontPage 2003 to pull in XML data from other sites, lists or document libraries to make the information more presentable for users.

• Explain the document versioning in SharePoint document libraries
When versioning is enabled every time the document is edited from the SharePoint site it creates a new version. You can restore or delete old versions of documents. Version numbers are incremented by the system itself.

• Where are web part resources contained?
The SharePoint file system, SQL, and the GAC folder. They are also referenced in the web.config folder.

• What are the different installation methods for deploying web parts? and what are the pros/cons?
The best way is via a CAB file using the MSI Installer.

• What is a ghosted/unghosted page?
Page that is created from a template oppsed to being created from scratch.

• How is site data stored?
Site data is stored in your content database that either resides in SQL Server 2000 or MSDE.

 • Where is metadata for a web stored?
In the content databases stored in SQL.

• What is an audience and describe the use?
Audiences are a pre-defined set of users that you can apply information to. You can apply information to their personal sites as well for Dailey information or job tasks.

• What are the trust levels and what is the default trust associated with SharePoint?
SSL and the basic IIS security. SharePoint comes with Integrated Windows Authentication turned on.

• What are the two logging mechanisms for usage statistics?
By default creates log files in the \%windir%\system32\LogFiles\STS directory on the front-end Web server, although an alternate location can be specified. The STS directory contains a folder for each virtual server on the Web server, each named with a GUID that identifies the respective virtual server. Each virtual server folder contains subfolders for each day, which in turn contain the daily usage log for each virtual server. In addition to containing information per virtual server, the Windows SharePoint Services logs are also useful because they associate users with page hits and with time stamps. what functionality does owssup.dll provide for client side activities?

• What is STSAdm and what can it be used for?
STSADMIN is a tool that can do many things from a command prompt like manage users, create new sites and add files to the file system.
• Can WSS search subsites?
Not without the new CorasWorks Search Web Part.
• Can you register alerts for users?
Not unless you are logged in as that user.

• Are PDFs searchable?
Out of the box only the metadata collected in the upload form is search able. Unless you download and install the Adobe iFilter.
• Describe a large deployment
Many front-end webserver with a SQL cluster with the possibility of multiple international locations.

• How can you synchronize custom Active Directory attributes to SharePoint?
Via the Profile Importer.

• If it is anticipated that our organization would need to store 1 terrabyte of documents, what is the recommended configuration and storage requirement?
Multiple front-end web servers with content databases across the server farm. The amount of web-servers can depend on how many users you have and what the typical size of a document is.

• Explain how you would deploy SharePoint on an extranet
Usually servers that are accessible from external sources are housed in DMZ’s. Depending on the requirements and the workflow for publishing content you could go with Multiple Servers hosting the same information. One server would reside inside with the SQL Cluster while the external server resides in the DMZ simply calling data. Security would be handled by the same or different active directory domain clusters as well increasing security.
• What is the BKM for maximum number of virtual servers configured for SharePoint on a single box?
I believe its 15.
• what are the migration strategies for moving sites around?
You could use the SharePoint Portal Server backup and restore tool as well as the STSADMIN and GUI STSAMIN tools. We have migrated databased from the SQL Level and have simply reconnected the front end.

Share point helps team members to connect and exchange information in a collaborative manner. It helps to centralize enterprise information for efficient functioning. For instance below is how a normal organization works. Files and documents scattered in individual PC and data is transported according to custom protocols. The communication protocol for sending these data is also person dependent. Some body would use a email , some body would share a drive etc etc.
 
Share point unites all the documents in to one centralize place and unifies the data transport mechanism. In one words a central enterprise information portal.
Microsoft has divided share point products in two parts. One is called as WSS (Windows SharePoint services) and the other is MOSS (Microsoft Office SharePoint server). WSS is the platform on which MOSS is built. The WSS part is licensed through Windows 2003 server and it does not cost. MOSS is separate product by itself and it needs licensing and it has a good amount of cost ? . WSS is good for small team and small projects. MOSS has extra functionalities in other words value added services. So the choice between WSS and MOSS will depend on budget of the project and the VAS provided by MOSS.
 
WSS does not work in an isolated fashion. It needs help of two more products IIS (Internet Information Server) and SQL Server.
 
In order to understand how WSS works with IIS we need first understand the concept of “HttpHandlers and HttpModules”. If you are not aware of it you can refresh about the same at
http://www.dotnetfunda.com/articles/article188.aspx

Using the HttpHandlers and HttpModules request is first passed through the Share Point runtime and then passed to the ASP.NET runtime (aspnet_isapi.dll).
 
If you open the web.config file of a WSS enabled IIS web application you can see the application run time handlers and modules.
 



....
...

 
We have highlighted the application runtime module.
 


...
...
Share point is all about enterprise data. When we talk about enterprise data it looks some as shown in the figure below. In other words grouping and sub groupings of data.SharePoint extends the IIS web application structure to accommodate the above defined data structure using site and site collections. We will see in the later section how to create site collections.

As said previously SharePoint is all about data and data should properly authenticated / authorized to proper users. By defining the structure in site and site collection we can now define roles and responsibilities according to data. For instance in the above figure we will assign all HR user to payroll, recruitment and assessment site. These users will not be assigned to account site collection. Same holds true for accounts user.

So when you design your hierarchy of site and site collection you need to keep in mind the enterprise hierarchy structure and design the same accordingly.
 
SQL Server is used to store content and configuration information. We have two types of databases one is the content database and the other is the configuration database. We had said previously that content is according to every site. So every site has his own content database. For instance if we have a payroll site and recruitment site they have their own content database. Configuration database is for the entire site as they are used in web farms, site configuration and lot of other things which are generic and common across all the sites.
 

Any project has two parts one is the standard and common part and the other is the customized version. In ASP.NET we have two types of pages for any project one is common ASPX pages and the other is customized ASPX pages. Common pages are stored on file directories while customized versions of pages are stored in content database.

So in other words we need an abstract mechanism by which we can render pages from SQL Server content database and also from the virtual directories. This is achieved by using the virtual provider provided by SharePoint. So for all customized pages virtual provider reads from the content database and passes the same to the ASP.NET runtimes. For all common pages it goes to the directory, parses it and the passes the same across to the ASP.NET runtime.
 
Virtual provider is an abstraction which loads the page from the content or the file system depending on whether it’s customized or common pages and passes the same to the ASP.NET runtime.
In SharePoint most of the site pages derive from templates. The custom pages only store the difference between them. The template is loaded in memory and applied to the custom pages on fly. In other words the template is stored in a cache. This definitely brings in performance and flexibility. Flexibility is in terms that when we change the template page it’s applied to all custom pages. These pages are loaded from the file system. So pages which are loaded from the file system are termed as ghosted pages.
 
If the page data is loaded from the content database it’s termed as unghosted pages.

As a note let me clarify the concept of document and content table as we are already trying to understand the concept of ghosting and unghosting. As we know that SharePoint stores all pages in the database. Looking from a 50,000 feet it has two tables one is the document table which has the entry of page and the other is the content which has the source code of the ASPX page.

So when a page is requested it first checks in the document table and then goes to the content table to load the page. If it does not find data of the page it goes to the file directory to load the page. This loading is done by ASP.NET runtime himself. But if there is data present in the content table then it’s loaded by the ‘safe mode’ parser.
 
As said the previous section there are two tables one is the document and the other content. If the page is stored in the content database it’s loaded by the SafeModeParser which is page parser provided by SharePoint. If there is no data found in the content it’s loaded from the file directory by simple ASP.NET runtime.
 
Site pages are customized pages and are saved in to content database. So when you use the SharePoint designer to make custom changes it saves the changes in to content database. If you want to make generic pages in a site collection which will be used by every one, like for instance the ‘Settings.aspx’ page then you need to use application pages.

In other words Site pages are nothing but customized pages stored in content, while application pages are generic pages which will be used by all the sites in a site collection.
 
What are the types of input forms that can be created for a workflow ?
You can create four different types of input forms including
1. An association form
2. An initiation form
3. A modification form
4. A task edit form.

Note that these forms are optional when you create a workflow template.

What are ways to create input forms for workflow ?
Two
1. You can create your forms by using custom application pages, which are standard .aspx pages deployed to run out of the _layouts directory. ( disadv: lot of code required when compared to Infopath approach)
2. Using Microsoft Office InfoPath 2007 (disadv: picks up a dependenct on MOSS, i.e. it cannot run in a standalone WSS environment)

What is the difference between method activity and event activity in WorkFlow ?
A method activity is one that performs an action, such as creating or updating a task. An event activity is one that runs in response to an action occurring.

What are content types?
A content type is a flexible and reusable WSS type definition (or we can a template) that defines the columns and behavior for an item in a list or a document in a document library. For example, you can create a content type for a leave approval document with a unique set of columns, an event handler, and its own document template and attach it with a document library/libraries.
Can a content type have receivers associated with it?
Yes, a content type can have an event receiver associated with it, either inheriting from the SPListEventReciever base class for list level events, or inheriting from the SPItemEventReciever base class. Whenever the content type is instantiated, it will be subject to the event receivers that are associated with it.

What two files are typically (this is kept generally) included when developing a content type, and what is the purpose of each?
There is generally the main content type file that holds things like the content type ID, name, group, description, and version. There is also the ContentType.Fields file which contains the fields to include in the content type that has the ID, Type, Name, DisplayName, StaticName, Hidden, Required, and Sealed elements. They are related by the FieldRefs element in the main content type file.

What is an ancestral type and what does it have to do with content types?
An ancestral type is the base type that the content type is deriving from, such as Document (0x0101). The ancestral type will define the metadata fields that are included with the custom content type.

Can a list definition be derived from a custom content type?
Yes, a list definition can derive from a content type which can be seen in the schema.XML of the list definition in the element.

When creating a list definition, how can you create an instance of the list?
You can create a new instance of a list by creating an instance.XML file

What is a Field Control?
Field controls are simple ASP.NET 2.0 server controls that provide the basic field functionality of SharePoint. They provide basic general functionality such as displaying or editing list data as it appears on SharePoint list pages.

What base class do custom Field Controls inherit from?
This varies. Generally, custom field controls inherit from the Microsoft.SharePoint.WebControls.BaseFieldControl namespace, but you can inherit from the default field controls.

Can multiple SharePoint installs point to the same DB?
Multiple SharePoint installs can use the same database server. Not literally the same database on that server. That server must be SQL Server 2000 or SQL Server 2005. It cannot be Oracle or another vendor.

How to create links to the mapped network drives?
Creating links to mapped drives in WSS v3 or MOSS 2007 can be done via
the new content type for .lnk files.

While creating a Web part, which is the ideal location to Initialize my new controls?
Override the CreateChildControls method to include your new controls. You can control the exact rendering of your controls by calling the .Render method in the web parts Render method.

What are the two base classes a WebPart you are going to use within SharePoint 2007 can inherit from?
There are two base classes that a WebPart which is going to be consumed by SharePoint can inherit from, either the
SharePoint WebPart Base class
or the
ASP.NET 2.0 WebPart base class.
When inheriting from the SharePoint WebPart Base class your derived WebPart class will inherit from Microsoft.SharePoint.WebPartPages.WebPart. When inheriting from the ASP.NET 2.0 WebPart base class your derived WebPart class will inherit from System.Web.UI.WebControls.WebParts.WebPart. It is considered good practice to use the ASP.NET WebPart base class since the old base class is meant for backwards compatibility with previous version of SharePoint, however there are four exception when it is better to leverage functionality from the SharePoint WebPart base class:
Cross page connections
Connections between Web Parts that are outside of a Web Part zone
Client-side connections (Web Part Page Services Component)
Data caching infrastructure

What are the differences between the two base classes and what are the inherit benefits of using one over another?
The difference is the Microsoft.SharePoint.WebPartPages.WebPart base class is meant for backward compatibility with previous versions of SharePoint. The benefit of using the SharePoint WebPart base class is it supported:
Cross page connections
Connections between Web Parts that are outside of a Web Part zone
Client-side connections (Web Part Page Services Component)
Data caching infrastructure
ASP.NET 2.0 WebParts are generally considered better to use because SharePoint is built upon the ASP.NET 2.0 web architecture. Inheriting from the ASP.NET 2.0 base class offers you features that inherit to ASP.NET 2.0, such as embedding resources as opposed to use ClassResources for deployment of said types.

What is the WebPartManager sealed class? What is its purpose?
The WebPartManager sealed class is responsible for managing everything occurring on a WebPart page, such as the WebParts (controls), events, and misc. functionality that will occur in WebPartZones. For example, the WebPartManager is responsible for the functionality that is provided when you are working with moving a WebPart from WebPartZone to WebPartZone. It is known as the “the central class of the Web Part Control Set.”

What does AllowUnsafeUpdates do ?
If your code modifies Windows SharePoint Services data in some way, you may need to allow unsafe updates on the Web site, without requiring a security validation. You can do by setting the AllowUnsafeUpdates property.

What does RunWithElevatedPrivileges do?
There are certain object model calls model that require site-administration privileges. To bypass access-denied error, we use RunWithElevatedPrivileges property when request is initiated by a nonprivileged user. We can successfully make calls into the object model by calling the RunWithElevatedPrivileges method provided by the SPSecurity class.
What does SPWeb.EnsureUser method do?
Checks whether the specified login name belongs to a valid user of the Web site, and if the login name does not already exist, adds it to the Web site.
e.g SPUser usr = myWeb.EnsureUser("hitenders");

What is a SPSite and SPWeb object, and what is the difference between each of the objects?
The SPSite object represents a collection of sites (site collection [a top level site and all its subsites]). The SPWeb object represents an instance SharePoint Web, and SPWeb object contains things like the actual content. A SPSite object contains the various subsites and the information regarding them.

What does a SPWebApplication object represent?
The SPWebApplication objects represents a SharePoint Web Application, which essentially is an IIS virtual server. Using the class you can instigate high level operations, such as getting all the features of an entire Web Application instance, or doing high level creation operations like creating new Web Applications through code.

Would you use SPWebApplication to get information like the SMTP address of the SharePoint site?
Yes, since this is a Web Application level setting. You would iterate through each SPWebApplication in the SPWebApplication collection, and then use the appropriate property calls (OutboundMailServiceInstance) in order to return settings regarding the mail service such as the SMTP address.

How do you return SharePoint List items using SharePoint web services?
In order to retrieve list items from a SharePoint list through Web Services, you should use the lists.asmx web service by establishing a web reference in Visual Studio. The lists.asmx exposes the GetListItems method, which will allow the return of the full content of the list in an XML node. It will take parameters like the GUID of the name of the list you are querying against, the GUID of the view you are going to query, etc.
Side Question: I got asked how I built queries with the lists.asmx web service. In order to build queries with this service, one of the parameters that the GetListItems method exposes is the option to build a CAML query. There are other ways to do this as well, but that was how I answered it.

When retrieving List items using SharePoint Web Services, how do you specify explicit credentials to be passed to access the list items?
In order to specify explicit credentials with a Web Service, you generally instantiate the web service, and then using the credentials properties of the Web Service object you use the System.Net.NetworkCredential class to specify the username, password, and domain that you wish to pass when making the web service call and operations.

What is CAML, and why would you use it?
CAML stands for Collaborative Application Markup Language. CAML is an XML based language which provides data constructs that build up the SharePoint fields, view, and is used for table definition during site provisioning. CAML is responsible for rending data and the resulting HTML that is output to the user in SharePoint. CAML can be used for a variety of circumstances, overall is used to query, build and customize SharePoint based sites. A general use would be building a CAML query in a SharePoint WebPart in order to retrieve values from a SharePoint list.

What is impersonation, and when would you use impersonation?
Impersonation can basically provide the functionality of executing something in the context of a different identity, for example assigning an account to users with anonymous access. You would use impersonation in order to access resources on behalf of the user with a different account, that normally, that wouldn’t be able to access or execute something.

What are WebPart properties, and what are some of the attributes you see when declaring WebPart properties in code?
WebPart properties are just like ASP.NET control properties, they are used to interact with and specify attributes that should be applied to a WebPart by a user. Some of the attributes you see with ASP.NET 2.0 properties are WebDescription, WebDisplayName, Category, Personalizable, and WebBrowsable. Although most of these properties come from the System.Web.UI.WebControls.WebParts class, ones like Category come out of System.ComponentModel namespace.

Why are properties important in WebPart development, and how have you exploited them in past development projects? What must each custom property have?
Properties are important because WebParts allow levels of personalization for each user. WebPart properties make it possible for a user to interact, adjust, and increase overall experience value with the programmatic assets that you develop without having the need to use an external editor or right any code. A very simple example of exploiting a property would be something like allowing the user to change the text on the WebPart design interface so that they can display whatever string of text they desire.
Each custom property that you have must have the appropriate get and set accessor methods.

What are ClassResources? How do you reference and deploy resources with an ASP.NET 2.0 WebPart?
ClassResources are used when inheriting from the SharePoint.WebPart.WebPartPages.WebPart base class, and are defined in the SharePoint solution file as things that should be stored in the wpresources directory on the server. It is a helpful directory to use in order to deploy custom images. In ASP.NET 2.0, typically things such as images are referenced by embedding them as resources within an assembly. The good part about ClassResources is they can help to eliminate recompiles to change small interface adjustments or alterations to external JavaScript files.

What is a SharePoint Solution File? How does it differ from WebPart .cab files in legacy development? What does it contain?
A SharePoint solution file is essentially a .cabinet file with all a developers ustom componets suffixed with a .wsp extension that aids in deployment. The big difference with SharePoint solution files is is that a solution:
allows deployment to all WFE’s in a farm
is highly manageable from the interface allowing deployment, retraction, and versioning
Can package all types of assets like site definitions, feature definitions (and associated components), Webparts, etc.
Can provide Code Access Security provisioning to avoid GAC deployments
And much more..

What is a .ddf file and what does it have to do with SharePoint Solution creation?
A .ddf file is a data directive file and is used when building the SharePoint solution bundle specifying the source files and their destination locations. The important thing for someone to understand is that the .ddf file will be passed as a parameter to the MAKECAB utility to orchestrate construction of the SharePoint solution file.

What file does a SharePoint solution package use to orchestrate (describe) its packaged contents?
The solution Manifest.XML file.

What deployment mechanism can you use to instigate Code Access Security attributes for your WebParts?
SharePoint solution files can add in order to handle code access security deployment issues. This is done in the element in the SharePoint solution manifest.XML, which makes it easier to get assemblies the appropriate permissions in order to operate in the bin directory of the web application.

What are event receivers?
Event receivers are classes that inherit from the SpItemEventReciever or SPListEventReciever base class (both of which derive out of the abstract base class SPEventRecieverBase), and provide the option of responding to events as they occur within SharePoint, such as adding an item or deleting an item.

When would you use an event receiver?
Since event receivers respond to events, you could use a receiver for something as simple as canceling an action, such as deleting a document library by using the Cancel property. This would essentially prevent users from deleting any documents if you wanted to maintain retention of stored data.

What base class do event receivers inherit from?
Event receivers either inherit from the SPListEventReciever base class or the SPItemEventReciever base class, both which derive from the abstract base class SPEventReceiverBase.

If I wanted to not allow people to delete documents from a document library, how would I go about it?
You would on the ItemDeleting event set: properties.Cancel= true.

What is the difference between an asynchronous and synchronous event receivers?
An asynchronous event occurs after an action has taken place, and a synchronous event occurs before an action has take place. For example, an asynchronous event is ItemAdded, and its sister synchronous event is ItemAdding

8. What are ways to create input forms for workflow ?
Two different approaches can be used to develop custom input forms for a WSS workflow template.
You can create your forms by using custom application pages, which are standard .aspx pages deployed to run out of the _layouts directory. ( disadv: lot of code required when compared to Infopath approach)
using Microsoft Office InfoPath 2007 (disadv: picks up a dependenct on MOSS, i.e. it cannot run in a standalone WSS environment)

9. What is the difference between method activity and event activity in WF ?
A method activity is one that performs an action, such as creating or updating a task. An event activity is one that runs in response to an action occurring.

10. What does SPWeb.EnsureUser method do?
Checks whether the specified login name belongs to a valid user of the Web site, and if the login name does not already exist, adds it to the Web site. e.g SPUser usr = myWeb.EnsureUser("mmangaldas");

11. While creating a Webpart, which is the ideal location to Initialize my new controls ?
Override the CreateChildControls method to include your new controls. To make sure that the new controls are initialized.. call 'EnsureChildControls' in the webparts Render method. You can control the exact Rendering of your controls by calling the .Render method in the webparts Render method.

12. How to query from multiple lists ?
Use SPSiteDataQuery to fetch data from multiple lists.

13.How Does SharePoint work?
The browser sends a DAV packet to IIS asking to perform a document check in. PKMDASL.DLL, an ISAPI DLL, parses the packet and sees that it has the proprietary INVOKE command. Because of the existence of this command, the packet is passed off to msdmserv.exe, who in turn processes the packet and uses EXOLEDB to access the WSS, perform the operation and send the results back to the user in the form of XML.

14. What is the difference between Syncronous & Asyncronous events?
Syncronous calls ending with 'ing' E.g. ItemDeleting Event Handler code execute BEFORE action is committed WSS waits for code to return Option to cancel and return error code
Asyncronous calls ending with 'ed' E.g. ItemDeleted Event Handler code executes AFTER action is committed WSS does not wait for code to return Executed in its own Worker thread.

15. What is ServerUpdate() ?
Any changes in the list, i.e. new addition or modification of an item.. the operation is complete by calling the Update method.But if a List is set to maintain versions .. and you are editing an item, but don't want to save it as a new version, then use the SystemUpdate method instead and pass in 'false' as the parameter.

16. What is query.ViewAttributes OR How can you force SPQuery to return results from all the folders of the list?
If you use SPQuery on any SPlist .. it will bring back results from the current folder only. If you want to get results from all the folders in the list.. then you need to specify the scope of the query by the use of ViewAttributes..
e.g. query.ViewAttributes = "Scope=\"Recursive\"";
- What are the types of authentication available for Sharepoint 2010 ?
  • Claims
  • Windows
  • Forms-based authentication
- What is claims based authentication ?
Claims is a new authentication method that SharePoint 2010 can utilize. This allows a single authentication store for multiple types of authentication (Windows NTLM, SQL FBA, LDAP, etc) which allows all of these types of authentication to access SharePoint under a single URL.

Claims creates a SAML token based on the sign-in, that contains the user’s identity.

Ref: http://blogs.technet.com/ritaylor/archive/2009/06/03/claims-based-authentication-an-overview.aspx
- How do we use the claims identity outside of SharePoint?
  • LOB systems
  • External partner services
  • Separate SharePoint farms
- What is LINQ to Sharepoint ?
  • LINQ is a feature of the programming languages C# 3.0 and Visual Basic .NET
  • LINQ adds, to each of the languages, a SQL-like syntax and vocabulary for querying data sources.
  • LINQ to Sharepoint allows developers to use SQL-like syntax to query Lists and Libraries in Sharepoint.
  • LINQ to Sharepoint internally converts the LINQ query to a CAML query to fetch records
  • Advantage : Strongly typed access to the entities of the list.
  • Disadvantage : If the new columns are added or its datatype changed, the datacontext class used by LINQ is no longer valid and may break the code
  •  
- Name the tool used to create DataContent classes for use in LINQ queries?
SPMetal.exe
- What are the advantages and disadvantages of LINQ to Sharepoint ?
Advantages:
  • Intellisense
  • Strongly typed access to the entities of the list
  • Faster development
  • Simplify complex queries
Disadvantages:
  • If the new columns are added or its datatype changed, the datacontext class used by LINQ is no longer valid and may break the code
  • Extra layer to the actual CAML query
  •  
In Sharepoint 2010, at what levels can a workflow be activated ? ( Alt Q: What is the additional scope a workflow be activated in Sharepoint 2010 ) ?
Can a workflow created in Sharepoint Designer be edited in Visual Studio ?
- Can MS Visio be used to create a Sharepoint workflow ?
MS Visio cannot be used to create the Sharepoint workflow itself, but can be used for workflow visualization. What this means is that, the flow diagram designed in Visio can be imported in Sharepoint Designer where all the functionality can be added and deployed to Sharepoint.
Note:
To use Visio 2010 for workflow visualization, you must be running the Enterprise version of SharePoint Server 2010 and Visio 2010 Premium.
- Whats new in Shared Service Provider (SSP ) in Sharepoint 2010 ? ( Alt Q: What is "Service Application" ? )
“Service Application” or “Service App” is a concept in Sharepoint 2010, where SSP Services are split out into separate services.
What is replaced :
  • Profiles, Audiences = People Service App
  • Search = Search Service App
  • Excel = Excel Service App
Whats new :
  • Project Server = Project Server App
  • Visio Services = Visio Service App
Advantages :
  • Web applications can be configured to only use a subset of the deployed services.
  • You can deploy multiple instances of the same service in a farm by giving the new service instances unique names.
  • You can share services across multiple web applications in a farm.

Monday, January 25, 2010

Create Association Form with People Picker

Step1:
Open The Infopath Form Template and create new with enable browser compatible check box checked.
Step2: Create the DataSource:
a> Add group named Service Approval with right click on my fields.
b> Now with right click on Service Approval Add the repeating group named Person.
3> With right click on Person Add three fields named DisplayName, AccountId, AccountType like below screen shot.



Step3: Add the another group named DepositApproval in myfields.
Step4: with right Click on Person in ServiceApproval click on Reference. after clicking this new window open like:




Select the DepositApproval group and click OK. The repeating group People copied to the DepositApproval group.

Step5: Drag and Drop ServiceApproval group and click on ContactSelector.



Step6: Repeate step4 for DepositApproval.



Step7: For Association Form Add the Submit button on Form and create a Context.xml file. To create this file open the notepad ,write given text and save it as xml format.



Step8: Add a Primary Data Connection:
On the infopath form select the Tools->DataConnection->Add->CreateNew Connection->Submit Data->Select To the Hosting environment->Next-> Finish.

Step9: Add a secondary data source XML file.
On the infopath form select the Tools->DataConnection->Add->CreateNew Connection->Receive Data->XML Document->Resource File->Add->Select the Context.xml File-> Click Ok-> Next-> Finish.



Step10: Add Datasource on Button. Double Click on the Submit button->Rules->Add->Add Action-> Select the Submit Using Data connecction and click ok. and again click on Add Action->Select Close The Form and Press OK.-> ok and Apply.



Step11: Security Setting is very important step for infopath form.
click on the Tools->Form Option-> Security and Trust-> select Domain-> OK.

Step12: Now on the Infopath menu : click File and then click on save as datasource.and also after that publich the form on Network Location->Next -> select the location-> Next-> delete the selected text->Next->OK->Publish-> Close.

Step13: Add the Published Form in the project.

Step14: open the command prompt and go to C:\Program Files\Microsoft Visual Studio 9.0\SDK\v3.5\Bin location where xsd.exe file exist. if there is no file than plz download the xsd.exe from internet.

write the following commands:
xsd /c /l:CS.
This Command create the myschema.cs file in C:\Program Files\Microsoft Visual Studio 9.0\SDK\v3.5\Bin location.



Step15: Add this myschema.cs file in the project and rename it same as the infoapth form.

Step16: Go to the Published infoapth form and in the file manu click on Properties. Copy the propertyID of the infopath form.



Step17: In the Project open the workflow.xml file and paste the id in tag as:




Step18: open the feature.xml file from the project and add the infopath form name in tag and add the form folder name (if all infopath form are in the Form Folder) in Properties tag like:



Step19: Build the Project, deploy it and than test.

Tuesday, January 19, 2010

Sharepoint Links and problem solution

Best Links for sharepoint tutorials:

http://www.fastsharepoint.com/

http://sharepointhosting.com/video_tutorials.html

Sharepoint Video Tutorials:

http://www.sharepointhostingprovider.com/sharepoint-tutorials/

Monday, January 18, 2010

Infopath form and Workflows

Workflow Examples with video and also downloading tutorials:
http://rshelton.com/archive/2007/10/05/free-workshop-sharepoint-document-workflow-for-developers---part-1.aspx


Send Email with Infopath Form :

http://www.bizsupportonline.net/browserforms/send-email-infopath-browser-form-sharepoint.htm


Simple SharePoint Workflow with InfoPath Task Form Example :
I’ll be using the following tools here:
  • InfoPath 2007
  • Visual Studio 2008 (with VSeWSS 1.3 installed)
My aim is to describe the following theory:
  1. Publishing the form in InfoPath
  2. How to reference the form in your workflow
  3. Sending data to the form
  4. Receiving data from the form

for more details click on this link:
http://sharepointgear.wordpress.com/2009/03/22/simple-sharepoint-workflow-with-infopath-task-form/

The best blog link for study the infopath form is:
http://blogs.msdn.com/infopath/archive/2007/02/26/passing-data-into-a-form-input-parameters.aspx

MVC Basics Links

http://www.asp.net/(S(pdfrohu0ajmwt445fanvj2r3))/learn/mvc/tutorial-01-cs.aspx

http://www.asp.net/mvc/

Deploy Sharepoint Solution with stsadm.exe

Solution Deployment:
Solutions are deployed in one of two ways: either locally or by using a timer service. This applies both to new deployments, as well as to deployments of solution upgrades. Both local and timer-based deployments can be triggered either by using command-line instructions by stsadm.exe or programmatically by using the object model.
Local deployments that are initiated from the command line by a user with administrator privileges run in the context of the administrator. If initiated by using the timer service, however, the deployment runs in the context of the timer job itself, which uses administrator pool account credentials.


@set PATH=C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN;%PATH%

stsadm -o execadmsvcjobs


To install the feature:
stsadm -o installfeature -name WebPartFeatureName -force

To Activate the feature:
stsadm -o activatefeature -name FeatureName -url http://localhost

To Deactivate the feature:
stsadm -o deactivatefeature -name FeatureName -url http://localhost

To uninstall the feature:
stsadm -o uninstallfeature -name WebPartFeatureName -force

To Add the solution :
stsadm -o addsolution -filename bin\SolutionABC.wsp

To Deploy the solution:
stsadm -o deploysolution -name SolutionABC.wsp -immediate -allowGacDeployment 

To Retract the solution:
stsadm -o retractsolution -name SolutionABC.wsp -immediate -allcontenturls

To delete solution:
stsadm -o deletesolution -name SolutionABC.wsp -override


To Update the Existing Solution :
STSADM.Exe -o upgradesolution -filename filename.wsp -name name.wsp -immediate - allowgacdeployment -allowcaspolicies

To check the running deployments on server:
stsadm -o enumdeployments

IN Last Reset the IIS:
iisreset