Pages

Saturday, July 18, 2015

“Sign in as Different User” option is missing in SharePoint 2013.


Note that you may have experienced that the “Sign in as a Different User” menu command is missing in SharePoint 2013.
This option is 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 by doing this edit on all servers in your SharePoint farm which is this option has missing.

1. Browse the location “C:\Program Files\Common Files\Microsoft Shared\Web Server
    Extensions\15\TEMPLATE\CONTROLTEMPLATES”. 
2. Open “Welcome.ascx” using Notepad (or any text editor).
3. Paste the below code in the “Welcome.ascx” 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"/>

4. Save the File.
    Now the menu option should be displayed as below.

Friday, July 10, 2015

Custom Web Part not showing in Web Part Gallery in SharePoint 2013

This happens when deploying solutions from Visual studio to SharePoint.

Follow these steps to solve this issue:
  1. Open the solution using Visual Studio and retract the solution.
  2. Open your site using browser and Go Site Settings > Web Parts and then remove your Custom WebPart from WebPart Gallery.
  3. Open the solution using Visual Studio and deploy the solution.
  4. After you deployed the solution you need to activate the Feature in SP. (This feature adds Web Part to the Web Part gallery). This will done for you automatically by the deployment tools in Visual Studio will do this for you when you deploy the solution in it but you need to check and activate it manually if it has not done.
Note: If you need your Custom WebPart to be save in custom category, you need to edit an attribute in WebPart Element file.

Open elements.xml using Visual Studio and modify it as following:

<Property Name="Group" Value="[Custom_Group_Name]" />