Thursday, March 31, 2011

SharePoint 2007 Solution Package Conversion to SharePoint 2010

Upgrading custom SharePoint 2007 solution packages implemented in Visual Studio 2008 to SharePoint 2010 and Visual Studio 2010. can be accomplished by using the tool provided by Microsoft Community portal. You can download the tool in the following URL.

It will help you to convert most of the items.

http://archive.msdn.microsoft.com/VSeWSSImport

Wednesday, March 23, 2011

Error occurred in deployment step 'Activate Features': Feature with Id 'featureid' is not installed in this farm, and cannot be added to this scope

In this post we will discuss how to resolve the below error:
Error occurred in deployment step 'Activate Features': Feature with Id 'ffe9e751-aeef-4cdb-8eb8-e5f5082e6477' is not installed in this farm, and cannot be added to this scope.

Also you can check out my previous posts on:

- Add user to SharePoint security group using SharePoint client object model

- Tutorial on Create SharePoint 2010 designer workflow

- Populate profile properties in infopath in SharePoint 2010

Recently I was facing the below issue from last 2 week and finally got to solve. A very big thank to my Tech Lead K Kathiravan and MSDN forums.

To see the details about the error please follow the below forum URL  where I have posted in the Microsoft SharePoint forum.

http://social.technet.microsoft.com/Forums/en/sharepoint2010programming/thread/c8dc041a-5c5c-46dc-b487-78b5c563968f

We have tried all the solutions for the problem, searched 2 weeks for the error, but did not got the solution.

Finally got a clue from a reply from Stuart Starrs in the below forum topic.
http://social.technet.microsoft.com/Forums/en/sharepoint2010programming/thread/91d3b25c-4244-47b2-bb7a-5e183cb2a922

Solution:
The error was coming because of the multisever farm. Please check carefully the above forum topic.

Open the Central Administration -> System Settings ->Servers -> Manage Servers in this farm ->then remove the unused server (Please be careful since we have forget to remove the unused server we remove that now/ but if you have only one server then most probably there is some other issues.)

or Go to the URL: http://[Servername]/_admin/FarmServers.aspx  and do the needful delete server stuffs as i discussed above.

The above solution works for me, hope it will helpful to you.

What is job Satisfaction?

Few days back I asked a friend What do you mean by job satisfaction? He gave me a satisfied answer: Earning more than what your friends are earning. Wah brilliant answer. Honestly I like this answer.This is a nature of a human being.
I am sure everyone will not want this. Everyone has their own expetation from their job. If I will tell you, personally I always want a brand company. For me even if the work was fine, the culture was fine in a mid size company, but still I was not comfortable, comfortable in the sense I have always that thing in my mind. I had a very stupid thinking like I am ready to work on less salary but I want to work in a brand company, so that people will recocnize me. First I was thinking to work for 2 years in my first company and then will go to the brand company, but it took me 4 years to reach the goal. And finally I got a chance to choose from Logica, Wipro, HP through KPIT Cummins.

Tuesday, March 22, 2011

How to create a List in SharePoint 2010?

There are different ways you can create list in SharePoint 2010.
1. By using feature, you can create list by using the ListInstance
<ListInstance
TemplateType="105"
FeatureId="00bfea71-7e6d-4186-9ba8-c047ac750105"
Title="Customers"
Description="Wingtip customers list "
Url="Lists/Customers"
OnQuickLaunch="TRUE" >
</ListInstance>

Please replace [ with < or > according to the match opened tag.

2. By code using Visual Studio 2010

Difference between site pages and application pages in SharePoint 2010

In this post we will discuss about Difference between site pages and application pages in SharePoint 2010.

Also you can check out:

- What is Document Sets and How to create Document Sets in SharePoint 2010?

- Call jQuery to SharePoint page using Custom Action

- SharePoint 2013 deployment Scenarious

Site pages support page customization through the browser and with SharePoint Designer 2010. Examples of site pages include the home page (default.aspx) for a site, as well as the pages associated with lists and document libraries, such as AllItems.aspx, NewForm.aspx, and EditForm.aspx.

The downside to site pages is that they require an elaborate processing infrastructure that has implications on security, performance, and scalability.

Customized site pages run in safe mode and, consequently, do not support inline code. To process the request for a customized site page, SharePoint Foundation must retrieve the
content of pages from across the network in the content database. SharePoint Foundation must also parse each customized site page individually, as well as execute it in a special no-compile mode.

Since each customized page instance must be loaded separately into memory, it will affect the performance of large server farm.

Application pages do not support customization, which gives them a few distinct advantages over site pages.

Advantages:
- Application pages are not tracked in the content database.

- They never run in safe mode and they can contain inline code.

- Each application page is always compiled into a single assembly DLL so that it performs and scales better than site pages that can be customized.

- Since application pages must be deployed inside the SharePoint Root directory, they cannot be used within sandboxed solutions. If you are required to build a SharePoint solution that targets the sandbox, the only type of page that you can add to a site is a site page.

Application page is SharePoint

Introduction:
In this article we will discuss What are application pages in SharePoint 2010. You can visit a very good article on difference between site page and application pages in SharePoint 2010.

Description:
An application page is an .aspx file that is deployed physically inside the SharePoint Root directory under the following path. C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS.

An application page is different from a site page because it is not tracked by the content

Monday, March 21, 2011

SPLimitedWebPartManager Class in SharePoint 2010

In this post we will discuss about SPLimitedWebPartManager Class in SharePoint 2010.

Also you can check out:

- How to create a custom list definition using visual studio 2010?

- Connected web part in SharePoint 2010 using Visual WebPart in SharePoint 2010

- Create a list-based autohosted app in SharePoint 2013

SPLimitedWebPartManager Class allows developer with direct access to the collection of Web Parts on a Web Part page.

It allows to add, customize, personalize, and delete Web Part instances.
SPLimitedWebPartManager is available in SharePoint solutions deployed at the farm level, but it cannot be used in sandboxed solutions.

Here is the SharePoint 2010 object model code sample to delete all the web parts in a page

// Get Web Part Manager for home page
SPWeb site = (SPWeb)properties.Feature.Parent;
SPFile homePage = site.GetFile("default.aspx");

SPLimitedWebPartManager wpm;
wpm = homePage.GetLimitedWebPartManager(PersonalizationScope.Shared);
// delete all Web Parts on page
while (wpm.WebParts.Count > 0) {
wpm.DeleteWebPart(wpm.WebParts[0]);
}

SPFile is used to get a web part page.

Saturday, March 19, 2011

Happy Holi to all of you

Hello All Friends,

I wish you all a very very happy and safe HOLI...

Send Orkut Scraps




Thanks
Bijay

Wednesday, March 16, 2011

Single Sign-on in SharePoint 2010

Introduction:
In this article we will discuss about Single Sign-on in SharePoint 2010. Also you can check some SharePoint 2010 security articles.

Description:
The objective of Single Sign-on (SSO) is to allow users access to all applications from one logon. Concept of log in once and be authenticated to all your network resources onto existing applications. Users are not required to remember multiple IDs and passwords.

For developers benifit if the SSO mechanism is independent, then developers don't have to

Monday, March 14, 2011

ULS Viewer Tool

Introduction:
In this article we will discuss about ULS viewer which is a very good tool to check out SharePoint error logs. Through this tool you can see the error logs from 14 hive directory.

Description:
When you develop any feature or any custom webpart and when you try to deploy it using Visual Studio 2010, sometime you may not get the exact error message instead you will get only the corelation id of the error message. Its very difficult to go through the sharepoint log and find out the error message.

SharePoint Professionals Required

If any one have experience in SharePoint 2010 or MOSS 2007, Please send the resume to my id- fewlines4biju@gmail.com or bijaya.sahoo@kpitcummins.com

Qualification: MCA or BTech
Experience: 2+ years
SharePoint Experience: 1+
Location: Bangalore

Knowledge required in SharePoint 2010, Visual web parts, Custom site definations, workflows, infopath forms, SharePoint designer, SharePoint object model etc

Sunday, March 13, 2011

Folder Names for the corresponding template files in SharePoint 2010

There are some folders where got created after SharePoint 2010 installation. These folders are presented inside 14 hive folder which is located at C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14
Below are the lists of folder:
/ISAPI                                     Web Services (.svc, .ashx, .asmx)
/Resources                            Resource files (.resx)
/TEMPLATE/ADMIN            Application pages used exclusively in Central Administration
/TEMPLATE/CONTROLTEMPLATES              ASP.NET User Controls (.ascx)
/TEMPLATE/FEATURES                                    Feature definition files (.xml)
/TEMPLATE/IMAGES                                          Images (.gif, .jpg, and .png)
/TEMPLATE/LAYOUTS                                       Application pages (.aspx)
/TEMPLATE/LAYOUTS/1033/STYLES            CSS Files (.css)
/TEMPLATE/LAYOUTS/ClientBin                     Silverlight components (.xap)
/TEMPLATE/SiteTemplates                               Site Definition files (onet.xml)
/TEMPLATE/XML                                                 Custom field type definition files (fdltype*.xml)

Saturday, March 12, 2011

How to enable Developer Dashboard in SharePoint 2010 programmatically using SharePoint object model?

The Developer Dashboard is a user interface component built into SharePoint 2010 Foundation that displays diagnostic information that can be useful to developers and to farm administrators in diagnosing problems with the farm.

By default, the Developer Dashboard is disabled.

You can enable developer dashboard programmatically using SharePoint 2010 object model as follows:
To enable the dashboard:
SPDeveloperDashboardSettings settings = SPWebService.ContentService.DeveloperDashboardSettings;

Friday, March 11, 2011

SharePoint 2010 interview Questions

Here are some SharePoint 2010 interview questions I was asked and I asked in interviews. You can also check some interview questions and answers here Part-1 , Part-2 , Part-3 , Part-4 , Part-5.
  1. What is your role in your latest SharePoint project?
  2. What are the features available in SharePoint 2010 which are not available in MOSS 2007 ?
  3. What is a visual web part?
  4. How to deploy a visual web part in SharePoint 2010?
  5. Have you used power shell for deployment?
  6. What are the default master pages available in SharePoint 2010?
  7. What is a Page Layout and master page ?
  8. How to create and deploy a custom master page?

Error occurred in deployment step 'Retract Solution': Cannot start service SPUserCodeV4 on computer "computer name" in SharePoint 2010

In this post we will discuss how to resolve below SharePoint 2010 error:

Error occurred in deployment step 'Retract Solution': Cannot start service SPUserCodeV4 on computer "computer name".

Also you can check out my previous posts on:

- Enable Anonymous Access in SharePoint 2010

- Enable Sign in as Different User Option in SharePoint 2013

- What's new for mobile devices in SharePoint 2013 ?

This error might come due to 2 causes- one is: Check whether is sandboxed solution.

If yes then go to the project properties (Select the project then click on the properties icon) then change Sandboxed solution to false.

And 2nd cause is Check Microsoft SharePoint Foundation Sandboxed Code Service is activate or not. By default it is not active.

If it is not in active stage then follow below steps to activate:

Go to Central Administartion -> System Settings -> Manage services on server -> Services on Server then Activate Microsoft SharePoint Foundation Sandboxed Code Service

The above solution works for me, hope it will work for you also.

Use of caml.net.intellisense.vsix in SharePoint 2010

Few days back my tech lead at HP gave me a beautiful and useful tool for sharepoint 2010.
Dowload URL http://visualstudiogallery.msdn.microsoft.com/15055544-fda0-42db-a603-6dc32ed26fde/
As the name suggest it will provide Intellisense support for CAML xml files like elements.xml file etc.

Thursday, March 10, 2011

How to delete or uninstall a custom site defination in sharepoint 2010?

Introduction:
In this article we will discuss how to delete or uninstall custom site definition in SharePoint 2010. Before reading this you can check how to create a Site Definition using Visual studion 2010 in SharePoint 2010?


Details:
Follow the below steps:
Step-1
Go to the features directory of 14 hive folder and delete the folder name same with your site definition name.

Wednesday, March 9, 2011

ListViewByQuery control with custom code in SharePoint 2010

Renders a list view within a Web Part or ASPX page according to a specified query.

Namespace: Microsoft.SharePoint.WebControls
.aspx code or web part control code:

<SharePoint:ListViewByQuery ID="myListQuery" runat="server"/>

.cs file code:

ListViewByQuery view = new ListViewByQuery();
SPWeb currentweb = SPContext.Current.Web;
SPList list = currentweb.Lists["Shared Documents"];

Tuesday, March 8, 2011

You may be trying to access this site from a secured browser on the server. Please enable scripts and reload this page

In this post we will discuss about how to resolve sharepoint error: You may be trying to access this site from a secured browser on the server. Please enable scripts and reload this page

Also you can check out my previous posts on:

- New for visual webpart for SharePoint 2013 and Visual Studio 2012

- Check if list exists or not using TryGetList method in SharePoint 2010

- Add script reference dynamically through code in SharePoint

I got the above error in the below System configuration:
Windows server 2008 R2
Visual Studio 2010
SharePoint 2010

Start -> Administrative Tools ->Server Manager ->in the right hand side Configure IE ESC ->Select Off for Administrators and click OK.

URL Reference: http://social.technet.microsoft.com/Forums/en/winservergen/thread/e87585de-d365-48c8-b08f-1050d68724ed

Hope it will work for you.

Out of box Site Templates


Template ID
Title
Name
0
Global template
GLOBAL#0
1
Team Site
STS#0
1
Blank Site
STS#1
1
Document Workspace
STS#2
2
Basic Meeting Workspace
MPS#0
2
Blank Meeting Workspace
MPS#1
2
Decision Meeting Workspace
MPS#2
2
Social Meeting Workspace
MPS#3
2
Multipage Meeting Workspace
MPS#4
3
Central Admin Site
CENTRALADMIN#0
4
Wiki Site
WIKI#0
9
Blog
BLOG#0
7
Document Center
BDR#0
14483
Records Center
OFFILE#0
22
Personalization Site
SPSMSITE#0
39
Publishing Site
CMSPUBLISHING#0
53
Publishing Site
BLANKINTERNET#0
53
Publishing Site with Workflow
BLANKINTERNET#2
33
News Site
SPSNHOME#0
34
Site Directory
SPSSITES#0
38
Report Center
SPSREPORTCENTER#0
47
Collaboration Portal
SPSPORTAL#0
50
Search Center with Tabs
SRCHCEN#0
51
Profiles
PROFILES#0
52
Publishing Portal
BLANKINTERNETCONTAINER#0
54
My Site Host
SPSMSITEHOST#0
90
Search Center
SRCHCENTERLITE#0
90
Search Center Advance
SRCHCENTERLITE#1

FAST Search Center
SRCHCENTERFAST#0


Visio Process Repository

visprus#0



These are list of site templates in SharePoint.

Friday, March 4, 2011

I forget what to write

After a lon time I am back to write a blog, that to a personal blog. The last 3 months are very much crucial for me. A lot of changes happen in my personal life as well as in professional life. But now I feel a bit happy, as well as it feels that some hard work paid for me. I have taken some decissions which were right or wrong, no idea on that. One of the major change is: I relocated to Bangalore and left Gurgaon, I was there in Gurgaon from the last 4 years. There are lots of happy and sad moments with me. I have also changed job, got an opportunities to work with a brand company which was my air from the very beginning. I forget what to write more ... SORRY !!!

Ask Me

Hey All,


You can ask me questions related to Personal, SharePoint, Asp.Net, C#.Net, SQL Server, mainly on Microsoft Technologies and will definitely try to give the answers as per my knowledge. The idea behind this is not only to give answers but also to gain something which can be possible only by discussions.


You can ask the way you are giving comments to a post.


Thanks
Bijay Kumar Sahoo
http://www.fewlines4biju.com
mob: +91-7676432738

The address is not valid while opening .chm file

You will get The address is not valid while opening .chm file.
Solution:

  • Right-click the CHM file, and then click Properties.
  • Click Unblock.
  • Apply and then OK
  • Double-click the .chm file to open the file.

Now you will be able to open the file.
This works for me in XP machine.

Thursday, March 3, 2011

What is a SharePoint farm and service applications in SharePoint 2010?

What is a SharePoint farm?
A SharePoint farm is a set of one or more server computers working together to provide
SharePoint Foundation functionality to clients.
You can set up a SharePoint 2010 farm by installing and configuring everything you need on a single server computer.
A SharePoint farm in a typical production environment runs SQL Server on a separate,
dedicated database server and can have multiple front-end Web servers

What is a Web Application?
A Web application is a collection of one or more IIS websites configured to map incoming HTTP requests to a set of SharePoint sites.

Tuesday, March 1, 2011

SPMetal in SharePoint 2010

Introduction:
In this article we will discuss about the SPMetal and also how to use SPMetal in SharePoint 2010. Also you can visit article on LINQ to SharePoint 2010.
Details:
SPMetal is a command-line tool that generates entity classes. These classes are primarily used in LINQ to SharePoint queries. The classes it generates are partial, so you can add members to them in separate, manually created, code files.

SPMetal comes in SharePoint 2010 and it founds in %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\BIN.

By using this you can generate a code file that contains classes for your objects in a specific site.
This will include a data context object, along with objects for all of your list level content types.
All the objects are strongly typed objects.
Syntax:
SpMetal.exe -url: -list: [-out:] [-language:]
[-user: -password: [-domain:]]

-url: URL to the root of the SharePoint site
-list: Name of the list
-out: Output file
-language: Code language used for output (VB or CS)
(Default: CS)
-user: User name for connection to SharePoint site
-password: Password for connection to SharePoint site
-domain: Domain for connection to SharePoint site

Ex. SPMetal /web:http://SiteName/SubSiteName /code:FileName.cs
Also you check some good SharePoint Tools.