March 25, 2014

SharePoint 2010 to SharePoint 2013 Migration : Part 2

:: SharePoint 2010 to SharePoint 2013 Migration : Part 2 ::

Hello


Continue for SharePoint 2010 to SharePoint 2013,

Part 2 :: Custom Code Migration to VS 2013


After migrating database of SharePoint 2010 to SharePoint 2013, if there is custom code for SharePoint 2010 then we can deply the wsp as is, but if any changes in the code then it is hard to maintain two enviornment of SharePoint, so it is better to upgrade the code to VS 2013.

Here are the steps to be consider for upgrading custom code,

1) Install VS 2013

2) Copy Solutions built in VS 2010. On SharePoint 2013.

3) Run the VS 2013 with Admin Credentials

4) Open the Solution in VS 2013, which will ask for upgrade, if solution is upgraded then it cannot be used for VS 2010, so always make copy of code.

5) After code is upgraded it will show the Upgrade reports.

6) Open the .csproj files in Solutions for all projects, and replace

<TargetFrameworkVersion>v3.5</TargetFrameworkVersion> with <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
 
7) Open the Packages present in the Solutions, and change the SharePoint Product Version to 15.0






8) Change the Microsoft.SharePoint Reference in non-SharePoint project,

C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.dll

9) Add other third party reference used in code.

10) Change the Assembly version of SharePoint DLL as, 14.0.0.0 to 15.0.0.0
Assembly="Microsoft.SharePoint, Version=15.0.0.0,

11) Now if anything /_layouts/ or /_CONTROLTEMPLATES/ used in code change it to /_layouts/15/ or /_CONTROLTEMPLATES/15/ which will deploy the related files in 15 hive... 


12) Now build the solution and if any missing reference then add the reference and solution is ready for deployment.

SharePoint 2010 to SharePoint 2013 Migration : Part 1


:: SharePoint 2010 to SharePoint 2013 Migration : Part 1 ::

Hello

We cover the migration in two parts

1) Database Migration
2) Custom Code Migration to VC 2013.

Part 1 :: Database Migration

1) Go to your old SharePoint database, then copy the WSS_Content database.



2) Verify source server properties.



3) Set your destination SQL Server.


4) Select the Transfer Method, use the SQL Management Object method if you want a live migration.






5) Select a database to copy, you will only need WSS_Content.

 
6) Configure the properties of Destination Database.







7) Select Objects, you only need Logins here.

8) Saving the package created.


9) Run immediately, you can also schedule them.


10) Look at the summary.


11) Wait while it's performing the copy



12) Or Just Backup and Restore Database will also work for all above 10 steps.

13) Once done, go back to SharePoint 2013 Central Administration and set your SharePoint instance to use the copied WSS_Content database.

14) Go to Application Management -> Manage Web Applications. -> Create a new Web Application

15) Now you need to set that new web application to use the copied WSS_Content database, you need to do this in SharePoint 2013 Management Shell

16) Test the database you just copied over by issuing this command:

Test-SPContentDatabase -Name WSS_Content -WebApplication http://YourNewSharepointServer:portNumber
17) Now mount them by issuing this command
Mount-SPContentDatabase -Name WSS_Content -WebApplication http://YourNewSharepointServer:portNumber

18) Now that it's mounted, you need to delete the default WSS_Content database created during the installation process, choose the default WSS_Content instance, if it's a fresh install usually it's the one with zero site collection items. 
 

February 27, 2014

Sign in as Different User in SharePoint 2013

Hello,

This is my first post for SharePoint 2013, it is good to be migrate to SharePoint 2013, but some features are missing such as “Sign in as a Different User” menu command.



Many of us are missing this while testing any application,

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="&lt;%$Resources:wss,personalactions_loginasdifferentuser%>"
 Description="&lt;%$Resources:wss,personalactions_loginasdifferentuserdescription%>"
 MenuGroupId="100"
 Sequence="100"
 UseShortId="true"  />
  • Save the file.
Now, the menu item shall be displayed:




But it is recommended not to change in any ascx in 14/15 hive.