Sunday, October 26, 2014

ISSUE: when try to access SharePoint 2013 App repeatedly asking login credentials

For the first after created and deployed SP2013 App, Then when i was trying to access the app the system repeatedly asking for login credentials and tried multiple times then left it.

First I thought, I didn't configure app environment properly and have rechecked but everything is perfect. Then I came to know that there is an issue in Loopbackcheck through a blog.
To resolve the above issue follow as,

1. Click on Start -> Run and type regedit.
2. Locate the key 3. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
4. Right click on this key and choose New > DWord Value
5. Name this one "DisableLoopbackCheck"
6. Double-click then on it and type the value "1"
7. Reboot your server. (Mostly not required)

This helped me in resolving the issue.

Monday, October 20, 2014

Error: unknown sharepoint version 16.0 parameter name version while deploying sharepoint app

When i was trying to create my first SharePoint 2013 app model and try to deploy app to SharePoint using VS2013, i got the below error.
"unknown sharepoint version 16.0 parameter name: version".


After doing research, i came to know that SharePoint app project's TargetOfficeVersion set to 16.0 which I wasn’t able to find through the Visual Studio UI in project settings or properties.

I just close the VS2013 and opened my solution's CSPROJ file and i found that targetofficeversion is set to 16.0 and have changed it to 15.0.

Now  reopened the solution, clean it and deploy.

Issue: Developer site template missing in SharePoint 2013

Before creating any SharePoint 2013 app we need one site which has been created with developer site template.

"You can only deploy apps for SharePoint from Visual Studio 2012 to a Developer Site."

when i was first time trying to create site, i didn't find developer site template in template list.

Then i came to know that we need to activate developer feature and also i came to know that this feature is hidden you will not see it in the list of the site collection feature, so you will need to enable it using PowerShell:

Enable-SPFeature e374875e-06b6-11e0-b0fa-57f5dfd72085 -url http://sp2013dev:8383


Sunday, October 19, 2014

Issue: The Subscription Settings service and corresponding application and proxy needs to be running in order to make changes to these settings.

When i was configuring SharePoint 2013 Apps, we need to start the below two services before configuring app URLs,

1. App Management Service
2. Microsoft SharePoint Foundation Subscription Settings Service

after that when i tried to Configure App URLs then i got the below message.


Then i have checked service application. i have found that App Management Service application is created and running but Subscription Setting service application is not created.


And we cannot create service application using UI from central amdin, so we have to create using PowerShell. Here the snippet.

add-pssnapin "Microsoft.Sharepoint.Powershell"

$account = Get-SPManagedAccount <UKREDDY\administrator>

Remove-SPServiceApplicationPool -Identity SettingsServiceAppPool

$appPoolSubSvc = New-SPServiceApplicationPool -Name SettingsServiceAppPool -Account $account

$appSubSvc = New-SPSubscriptionSettingsServiceApplication -ApplicationPool $appPoolSubSvc -Name SettingsServiceApp -DatabaseName SettingsServiceDB

$proxySubSvc = New-SPSubscriptionSettingsServiceApplicationProxy -ServiceApplication $appSubSvc

Now we can see newly created service application and also we can configure app URLs.




Sunday, September 28, 2014

How to open PDF document files in a new browser tab in SharePoint

Open PDF Files in a New Browser Tab
By default SharePoint PDF files opens in current window and end user feeling that he came out of SharePoint navigation. So clients are asking they want to open PDF files in a new tab instead of the current window. 

Over the net there are so many users telling that use content editor web part with javascript to open the PDF file in new window but it would be very difficult to add each document library and each page. So i tried in another way that is if i can add the javascript on master page then it will be applied to each and every page on SharePoint so that i can solve the problem then i tried and applied.
Everything is working perfect and clients are happy :).

Step 1: Download the latest version of jQuery (I used version 1.7.2 for this example)
Step 2: Upload the jQuery file to a document library within the site collection
Step 3: Make sure all users have read access to the document library
Step 4: Add the following code with your Master Page’s body tag
<script src="/Style library/javascript/jquery-1.7.2.min.js"type="text/javascript">
</script>
<script>
$(document).ready(function(){
  $("a[href$='.pdf']").removeAttr('onclick').attr("target","_blank");
});


</script>
Save and publish your master page.

Saturday, September 6, 2014

Issue: Missing "Apps you can add" in SharePoint 2013

I have created new master page using html everything working as expected and deployed on production. But after some time user found that they are not able to add custom apps on SharePoint portal.




After searching on this we game to know that we missed two important tags in the master page.

<asp:ContentPlaceHolder id="PlaceHolderPageTitleInTitleArea" runat="server"/>
<asp:ContentPlaceHolder id="PlaceHolderLeftNavBar" runat="server" />

if preview giving any error like 'asp' is not valid or something then add as below

   <!--MS:<asp:ContentPlaceHolder id="PlaceHolderPageTitleInTitleArea" runat="server">-->
            <!--ME:</asp:ContentPlaceHolder>-->




NOTE: Some times you might commented this code by mistake without knowing.

I have added these two tags back to the master page then "Apps you can add" section came back.



Tuesday, September 2, 2014

Upgrading a SharePoint 2010 custom solution to SharePoint 2013

Recently i have been working with SharePoint 2010 to 2013 migration project on development server and when i was trying to migrate i got one problem.

I have SharePoint 2010 custom code solution file and i opened that solution using visual studio 2012 and it automatically converted the solution to SharePoint 2013 version.

And also i have changed user control path in .webpart file and deployed the solution.

Now i tried to add the web part to my page but it is throwing error.

then i checked the log files it was showing could not find the user control file.

Then i have checked the user control under 15, it was not there but it was there under 14 hive.

Then i realised that the solution has been deploying under 14 from visual studio.

Solution:

Solution for the problem is, The first thing you need to do is change your 'SharePoint Product Version' to "15.0". Doing this causes your solution to be treated as a SharePoint 2013 solution and will deploy all of the components to the correct locations.