Tuesday, October 30, 2012

SharePoint 2010 root directory

In this blog we will discuss about SharePoint 2010 root directory.

In my previous articles we have discussed about Developer Dashboard, Difference between Team site and Publishing site in SharePoint 2010 and Client object model in SharePoint 2013.

You can also check out some SharePoint 2013 articles.

SharePoint stores some template files in a special directory on the local file system of each front-end Web server, which is know as SharePoint root directory. It is also know as 14 hive directory in SharePoint 2010 and 12 hive directory in MOSS 2007.

If SharePoint is installed in C drive then it usually will be in the below location:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14

For SharePoint foundation, it contains set of images, templates, features, and pages. But if you install SharePoint server then it contains images, templates, features, and pages and some template files which provides additional functionality apart from SharePoint Foundation.

Below is an image of a 14 hive directory of SharePoint server.

Below are some sub directory and the type of template files it contains:
/ISAPI:
This directory contains all the Web Services (.svc, .ashx, .asmx) as well as the required dlls for SharePoint like Microsoft.SharePoint.client.dll, Microsoft.SharePoint.dll etc.

/Resources:
 This directory contains all the Resource files (.resx). This is the ideal location to deploy your custom Resource files if you are using any.


/TEMPLATE/ADMIN:
 This directory contains Application pages used exclusively in Central Administration.

/TEMPLATE/CONTROLTEMPLATES:
This directory contains ASP.NET User Controls (.ascx) files, like user controls used in Visual Webpart.

/TEMPLATE/FEATURES:
 This directory contains Feature definition files (.xml).

/TEMPLATE/IMAGES:
This directory contains Images (.gif, .jpg, and .png) and if you have to use custom images then you can create a sub directory and put your custom images.

/TEMPLATE/LAYOUTS:
This directory contains Application pages (.aspx).

/TEMPLATE/LAYOUTS/1033/STYLES:
This directory contains all the default CSS Files (.css) files used in SharePoint. You can put custom css files in this directory.

/TEMPLATE/LAYOUTS/ClientBin:
This directory contains Silverlight components (.xap).

/TEMPLATE/SiteTemplates:
 This directory contains Site Definition files (onet.xml).

/TEMPLATE/XML:
 This directory contains Custom field type definition files (fdltype*.xml).

/LOGS:
This folder contains all the Log files maintain by SharePoint.

/Help:
This contains the help files.

Monday, October 22, 2012

Difference between Standalone Installation and Server Farm installation

In this article we will discuss about What is the difference between Standalone and Server Farm installation. You can also check SharePoint 2013 installation video and also you can check SharePoint workflow video tutorial.

There are two types of installation can be done, Standalone Installation and Server Farm installation. While installing SharePoint 2010, it will ask you which installation you want to do.

Friday, October 19, 2012

Backup and Restore Site Collections in SharePoint 2010 using PowerShell

In this post we will discuss how to take Backup and Restore site collections using PowerShell in SharePoint 2010.

In my previous articles I have explained about on Get System Accounts using PowerShell, Some PowerShell commands for SharePoint 2010.

Also check how to Switch from Classic to Claims Authentication in SharePoint 2010 and check how to

Wednesday, October 17, 2012

SharePoint 2013 workflow development tools

In this post we will discuss about various tools to work with SharePoint 2013 workflow. As we know SharePoint 2013 has improved workflow experience like Windows Azure Workflow.

There are several tools that come together to provide a rich workflow development experience, like:

1. Visual Studio 2013:
Visual Studio 2013 can be used to develop workflows similar to SharePoint Designer 2013. Apart from that you also can develop custom actions and tasks such as a workflow action that interacts with a custom application.

2. SharePoint Designer 2013:
SharePoint Designer 2013 provides a rich set of features specifically designed for workflow development against both the SharePoint 2010 Workflow platform and the SharePoint 2013 Workflow platform.

3. Visio 2013:
Visio 2013 is an Office application that is used to build diagrams by using shapes and connectors. You can use Visio 2013 to build workflows based on the SharePoint 2013 Workflow platform. You can import workflows from Visio 2013 into SharePoint Designer 2013, and vice versa.

4. InfoPath 2013:
InfoPath 2013 is a tool designed for form development. Using InfoPath 2013 you can customize the forms that a workflow uses as users interact with it.

5. A supported web browser such as Internet Explorer, Firefox, or Chrome Web browsers will be used to to interact with SharePoint Server 2013 sites. You can check browsers supported by SharePoint 2013.

Saturday, October 13, 2012

New master pages in SharePoint 2013

In this blog we will discuss about new master pages in SharePoint 2013. Master pages are very much useful for the look and feel of a site.

You can also check my last articles on Master Pages in SharePoint 2010, also you can check how to fix  centered fixed design here, also check How to change master page programmatically SharePoint 2010.

Here are some new SharePoint 2013 master pages which are newly introduced.

- App.master

Working with SharePoint 2013 client object model

In this article we will discuss about SharePoint 2013 client object model.

In my previous articles I have also explained about What's new in Visual Studio 2012 for SharePoint? , Difference between SharePoint 2013 and SharePoint 2010 and Social networking feature in SharePoint 2013.

In this article we will discuss about how we can update web site properties like Title and Description using SharePoint 2013 client object model. Below is the code:

Thursday, October 11, 2012

Error were found when compiling the workflow. The workflow files were saved but cannot be run.

I got this error while working with SharePoint designer 2010 workflow. The full error message is "Error were found when compiling the workflow. The workflow files were saved but cannot be run.

Unexpected error on server associating the workflow".

I found a very good and simple solution in Snahta blog. The solution of the above error is very simple.

Open the web.config file of the web application which we usually found in

Tuesday, October 9, 2012

Get all users from web application in SharePoint using PowerShell

In this article we will discuss how to get list of all users in a web application using PowerShell in SharePoint 2010. You can also check this article for some powershell commands to work with SharePoint database.

We can retrive list of users inside a web application using PowerShell.

First Open PowerShell command window in Administrator mode. (Start -> All Programs -> Microsoft SharePoint 2010 Products and then Right click on SharePoint 2010 Management Shell)

Once it will open in Admin mode, type the command like below:

Get-SPWebApplication [Web application URL] | Get-SPSite | Get-SPWeb | Get-SPUser

Ex: Get-SPWebApplication http://bsahoo3:2500 | Get-SPSite | Get-SPWeb | Get-SPUser

Also you can try for each SPWeb object like below:

In the PowerShell command prompt type:

Get-SPUser
Then it will ask you to give the SPWeb name (as shown in the figure below)
Enter the web name like
 http://bsahoo3:2500/sites/TestSiteCollection

Then it will show the output of the list of users.

Check the figure below for both the commands.

Saturday, October 6, 2012

What's new in Visual Studio 2012 for SharePoint?

As we know Visual Studio 2012 has been released, in this article we will discuss about What's new for SharePoint in visual studio 2012. You can also check out some SharePoint 2010 and SharePoint 2013 articles.

Visual Studio 2012 comes in grey color now with a good look and feel. As usual it contains lots of templates for Windows, web, office, cloud, reporting, silverlight, wcf, windows phone, workflow & SharePoint etc in different languages like Visual Basic, Visual C#, Visual C++, Visual F# etc.

Here we will discuss about the feature for SharePoint.

Visual Studio 2012 simplifies the Project templates and Project item templates like below:

Project Templates:

It contains 5 project templates like below:

1. SharePoint 2010 Project: This project template helps us to create sharepoint 2010 projects.

2. SharePoint 2010 Silverlight Web Part: SharePoint 2010 Silverlight Web Part projects enable you to create web parts for SharePoint that display Silverlight applications.

3. SharePoint 2010 Visual Web Part: This template helps us to create visual web parts in SharePoint 2010.

4. Import SharePoint 2010 Solution Package: Import SharePoint 2010 Solution Package projects let you import all or part of an existing SharePoint 2010 site, exported to a SharePoint solution (.wsp) file, into Visual Studio.

5. Import Reusable SharePoint 2010 Workflow: Import Reusable SharePoint 2010 Workflow projects let you import a reusable, declarative workflow created in SharePoint Designer 2010 into Visual Studio.
Project Item Templates:
Apart from the above project templates Visual Studio 2012 contains the below project item templates. They are:

1- Silverlight Web Part:
Silverlight web part project items enable you to create web parts for SharePoint that display Silverlight applications.

2- Visual Web Part:
This template helps us in creating visual web parts. This contains items like Elements.xml definition file, a Web Part item, and a User Control.

3- Web Part:
This type of projects runs inside web part page and this template helps us to build a web part for SharePoint site.

4- Application Page (Farm Solution Only):
This templates works in farm solution only and this helps us to create an aspx page for SharePoint site.

5- Business Data Connectivity Model (Farm Solution Only):
This item enables you to integrate business data into SharePoint.

6- Content Type:
This item template helps us to create custom content type for SharePoint.

7- Empty Element:
This is a very helpful template and contains elements.xml file
8- Event Receiver:
This template helps us to create an event receiver for SharePoint.

9- List:
This template helps us to create a List for SharePoint.

10- Module:
This type of project item template helps us in deploying items to sharepoint server like image, css, master page etc.

11- Sequential Workflow (Farm Solution Only):
Through this type of project item template we can create Sequential workflow and this works in farm solution only.

12- Site Column:
This template helps us to create a site column for SharePoint.

13- Site Definition (Farm Solution Only):
This helps us to create custom site definition and it works only with farm solutions.

14- State Machine Workflow (Farm Solution Only):
Through this type of project item template we can create state machine workflow and this works in farm solution only.

15- User Control (Farm Solution Only):
We can add asp.net or sharepoint controls to user control and deploy to the sharepoint server.

In the above as there are written Farm Solution Only, means we can add project items to farm solution only, it will not work in sandboxed solution environments.

Thursday, October 4, 2012

Disable Mobile access in SharePoint 2010

In this article we will discuss about how to disable mobile access in SharePoint 2010, so that mobile users will able to see the original version of the site rather than the mobile version of the site.

Also you can check out:

- Communities in SharePoint 2013

- SharePoint 2013 JavaScript Client Object Model Example

- SHAREPOINT\System account in SharePoint 2010

Recently I came accross a situation where my client wants to see the original version of the site rather than the mobile version of the site, whenever wants to see from mobile. By default SharePoint 2010 has a good feature for mobile users. If any request comes from mobile users then SharePoint will redirect the user to the mobile version of the site.

There will be 2 URLs for a site collection one is the Site URL and another one is the Mobile Site URL. If you will go to the site settings page then you will able to see the details in the Site Information section as shown in the figure below.

There are some modifications needed to disable the mobile access URL.

For this Open the directory C:inetpubwwwrootwssVirtualDirectories80App_Browsers

Inside that there will be a file called as compat.browser. Open that file using Notepad.

Now find for <capability name="isMobileDevice"  value="true" />

And Replace the above line with
<capability name="isMobileDevice" value="false" />

Then do an IISRESET which is very much important.

Now it should work.

Wednesday, October 3, 2012

Communities in SharePoint 2013

In this article we will discuss about the new communities feature in SharePoint 2013. You can also check more SharePoint 2013 articles.

Also you can check out:

- Architectural changes in SharePoint 2013

- SharePoint 2013 JavaScript Client Object Model Example

- Introduction to SharePoint 2013 REST service

SharePoint 2013 provides 2 new site templates to work with, namely Community Site and Community Portal. These templates are working same as SharePoint 2010 discussion board. Though SharePoint 2013 supports discussion boards also, but it has some advanced feature in these 2 new templates.

Community Site:
Community site is like forum where people in a organization go and do discussion in some topics. This helps in exchanging information between members inside organization.

Also you can organize discussions into various categories. Visitors can view the discussions and become members if they want to contribute to those discussions. Moderators manage the community by setting rules, reviewing and addressing inappropriate posts, marking interesting content as featured discussions, and so on. Moderators can also assign gifted badges to specific members to visually indicate that the member is recognized as a specific kind of contributor in the Community Site, such as an expert or a moderator. Each Community Site contains information about member and content reputation, which members earn when they actively post in discussions, and when their content is liked, replied to, or marked as a best answer.

There are different ways to deploy a community site:
1- By deploying a stand-alone community:
With a stand-alone community, you can create the Community Site at either a site collection or a site level.

2- By activating community features:
You can activate community features on any site, which provides the core Community Site pages, moderation, membership, and reputation functionality within the existing site without creating a separate Community Site.

The 2nd option is very much helpful, if you want to add community feature to your existing sites.

Community Portal:
The Community Portal is a search-driven page that surfaces SharePoint site collections and sites in the SharePoint farm that use the Community Site template. Users can visit the Community Portal to discover popular communities and to search for communities that they might want to join. The Community Portal relies on enterprise search for security trimming, and displays only Community Sites for which a user has at least read permissions.

Tuesday, October 2, 2012

Newsfeed in SharePoint 2013

In this article we will discuss about Newsfeed in SharePoint 2013. You can also check what are the features removed from SharePoint 2013?

Newsfeed is one of the popular improved feature in SharePoint 2013. The new Newsfeed is more likely to facebook or twitter. If you are familar with Twitter or Facebook, you will definitely like SharePoint 2013 Newsfeed.

The new UI is linke Facebook wall. In the new Newsfeed In the left hand side you will able to see your pics and links like about me, Task, Edit Profile, Site Contents. This links are helpful as its like quick links.

In the right hand side you can see the search box. And also see the your follow details. like how many people or documents or sites you follow. You can see this article to know more about follow/unfollow feature of SharePoint 2013.

In the middle portion of the wall, you will able to post Newsfeed like micro-blogging and also like in facebook you can give security for those content. Like you can set wether Everyone will be able to see the content or only sites you are following. For each thread you can also Like or give thread Reply also. You can also post youtube videos or document links also.
SharePoint 2013 supports @ and # tag. When entering a tag, SharePoint helpfully provides some recommendations for the user to select from with auto complete feature. If a user is identified using the @ tag, they will receive a Mention in their Newsfeed.

You can see Chris O'Brien wall for a UI looks:

Also you can check out: