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>

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...