Monday, July 22, 2013

Use the force attribute to explicitly re-install the feature.

Sometimes when we try deploy the visual web parts solution to share point site, we might get an error like

"Error occurred in deployment step 'Add Solution': A feature with ID 15/bb6298f9-f2c1-4dba-b8fa-1ae0c752bcf2 has already been installed in this farm.  Use the force attribute to explicitly re-install the feature"

In order to resolve this issue, set AlwaysForceInstall atttribute to True in featurename.Template.xml file.



<?xml version="1.0" encoding="utf-8" ?>
<Feature xmlns="http://schemas.microsoft.com/sharepoint/" AlwaysForceInstall="TRUE">
</Feature>
 
Alternatively, we can use power shell command also.


Install-SPSolution <solutionname>.wsp -GACDeployment -Force  

Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the \\ section in the application configuration.

Exception Details: System.Web.HttpException: Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration>\<system.web>\<httpModules> section in the application configuration.


It's an error that could make you loose some of hair if you don't get some precautions. 

How to proceed to solve:


  • Verify if your enableSessionState is set to true. There is a tag in your web.config file, as you can see here: 

<pages enableSessionState="true" enableViewState="true" enableViewStateMac="true" ..

  • When you're still looking the web.config check the httpmodule: 

<add name="Session" type="System.Web.SessionState.SessionStateModule" />

Friday, July 19, 2013

How to install / deploy .wsp file on SharePoint 2013



1)      Run the below command on SharePoint 2010 Management Shell.

   Add-SPSolution -LiteralPath "path to wsp file\EventReceiverProject.wsp"
   example : Add-SPSolution -LiteralPath "C:\EventReceiverProject.wsp"
 

2)      On the Central Administration Home page, click System Settings.


3)      In the Farm Management section, click Manage farm solutions.


4)      On the Solution Management page, click the solution that you want to deploy. 


5)      On the Solution Properties page, click Deploy Solution


6)      On the Deploy Solution page, in the Deploy When section, select one of the following:

a)      Now

b)      At a specified time. If you select this option, specify a time by using the date and time boxes. We recommend that you select a time when the load on the destination servers is low.


7)      In the Deploy To? Section, in the A specific web application list, click either All web applications or select a specific Web application.


8)      Click OK.


9)      Now open your site, go to site settings ->Site features


10)      Activate the feature if it is not active.

Monday, July 15, 2013

Sign in as Different User and SharePoint 2013

Sign in as Different User and SharePoint 2013

It’s been noted that the “Sign in as a Different User” menu command is missing in SharePoint 2013
This “Sign in as Different User” menu item is very useful when testing applications, but it can lead to problems especially when opening documents, say in Microsoft Word. So, it may be for these reasons that the option has been removed in SharePoint 2013.
You can add the menu item back in, but I would suggest only doing this on test or development SharePoint servers. To do this, repeat this edit on all servers in your SharePoint farm:
  • Locate the file \15\TEMPLATE\CONTROLTEMPLATES\Welcome.ascx and open in a text editor.
  • Add the following element before the existing element with the id of “ID_RequestAccess”:
<SharePoint:MenuItemTemplate runat="server" ID="ID_LoginAsDifferentUser"
 Text="<%$Resources:wss,personalactions_loginasdifferentuser%>"
 Description="<%$Resources:wss,personalactions_loginasdifferentuserdescription%>"
 MenuGroupId="100"
 Sequence="100"
 UseShortId="true"
 />

  • Save the file.
Now, the menu item shall be displayed:

Thursday, July 11, 2013

How to enable SharePoint portal/site for Smartphones



To enable SharePoint portal/site for Smartphones, It requires the Administrator to turn off the WAP interface.



Below are the steps to do so.
  • Modify the web.config in the root of the web app
  • Add three lines of code that set all browsers to not be redirected
  • Does not allow for browsers to be handled individually
  • File is on the server in C:\Inetpub\wwwroot\wss\VirtualDirectories\PORT\bin folder of your SharePoint site, where PORT is the port of your site
  • Add this section right before the close tag: </system.web>
Code to add:
<browserCaps>
<result type="System.Web.Mobile.MobileCapabilities, System.Web.Mobile, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
<filter>isMobileDevice=false</filter>
</browserCaps>

Monday, June 24, 2013

What is the Difference Between SharePoint2010 List and Library?

List Description
The SharePoint lists are like SQL Data Tables and these List stores the same kind of content. The List contains the list fields, list properties and list columns.
The List item can have attachment (one or many) But List does not support Check in and Check out operations.
Templates - List
  • Announcements
  • Calendar
  • Contacts
  • Tasks
Library Description
The SharePoint Library is a collection of files and it stores the documents and contains Library Fields, Library Properties and  Library Columns.
Library item can associated with file.(not multiple). The Library does support Check in and Check out operations.

Templates - Library
  • Document library
  • Form Library
  • Picture library
  • slide library

What are list forms and form library forms?

SharePoint list forms store data directly in a SharePoint list.  Each control (e.g. text box) in the form is bound to a column in the list. SharePoint list forms are directly connected to the list, which means that you don’t have to worry about setting up the publish and submit locations.
Form library forms store data in XML files in a SharePoint form library. This means they are more flexible and you can do more with them. For example, they can be configured to save drafts and submit to different locations. However, they are more complex to work with and require more decisions to be made during configuration.
Because the way data is stored between these template types is different, it is not possible to switch between them.

Guidelines

Here are some basic guidelines to help you decide what type of form to design.

Use a list if:

  • You want to quickly get started building InfoPath forms on SharePoint
  • You need to use your form offline with SharePoint Workspace (formerly Groove)
  • You want to filter your SharePoint list based on a person or group
  • You would like to use the built-in display / edit views

Use a form library if:

  • You have repeating or nested data
  • You are working from a predefined industry or complex schema
  • Your form needs to be digitally signed
  • You need code in your form
  • Your form is not hosted in SharePoint or you need to store results as an XML document

What is the cost of migration to SharePoint 2016?

Below are the points to understand better how much the cost of migration to SharePoint 2016 could be for your organization: What ver...