The provided App differs from another App with the same version and product ID

Copied from :http://johnliu.net/blog/2015/12/yet-another-fix-for-app-with-the-same-version-and-product-id-on-premises

Just for Quick reference :

Sometimes, you really just want to delete the old one.  But the Object Model doesn’t have objects that go that deep.  Hence there are no way to do this via command-line either.

You need AppInstance to perform an uninstall.  If you can’t get an AppInstance, but the AppPackage is still in your Site Collection, you are pretty much stuck.

Let’s go check out the content database.  Disclaimer: Do this if you are curious.  Also, don’t do this on your production.

SELECT [PackageFingerprint]
      ,[ProductId]
      ,[Package]
      ,[Title]
      ,[IsDownloadInvalidated]
      ,[SiteId]
  FROM [WSS_CONTENT_DB].[dbo].[AppPackages]

You want to know which Site Collection it is.  So figure out which AppPackage is the one SharePoint can’t delete – by cross-checking the SiteId

PackageFingerprint is an important field that we’ll need in a minute.  It acts like a unique identifier.
IsDownloadInvalidated is probably 0 (meaning it is valid).  You just can’t delete it.

SharePoint has a few nice store procedures.

exec [WSS_CONTENT_DB].[dbo].proc_App_InvalidatePackage
    @PackageFingerprint, @SiteId

-- example
exec [WSS_CONTENT_DB].[dbo].proc_App_InvalidatePackage
    0x9DB9C067E1B970AD1258E28AE26EC3AE17CF772BC093D0CCF8E1832FF3B171261A09812778830621AA63FD4C9D1EA922DC5432E1CACDEA00B1CDA82F9A28CAE2, 
    '282292D5-3686-460D-9AB4-9354272FB2A1'

This stored procedure will flag the AppPackage as Invalid.  If you do SELECT * FROM AppPackages again, you’ll see it is now IsDownloadInvalidated = 1

So SharePoint now thinks there was something wrong with the download of this package :-)Let’s invoke SharePoint’s auto-immune system and nuke the AppPackage

exec [WSS_CONTENT_DB].[dbo].proc_App_DeleteInvalidatedDownloadApp
    @PackageFingerprint, @SiteId

-- same arguments.  

This one will nuke the AppPackage clean.

You can now go back to PowerShell and redeploy your App.

PS> $App = Import-SPAppPackage -Path <Path> -Site <Url> -Source <Source>
PS> Install-SPApp -Web <Url> -Identity $App

 

How to add Custom styles in Seattle master page in Sharepoint 2013

For adding cutom styles in seattle master page you have to edit the .html file and there is a proper syntax to add styles.

 

<!–MS:<style type=”text/css”>–>
<!–
 #suiteLinksBox
{
    display: none !important; /*as requested by cusomer – hide suite bar links*/
}
–>
<!–ME: </style>–>

 

You have to start with <!–MS :  and end with <!–ME

Building SharePoint Add-ins with Kendo UI

Building SharePoint Add-ins with Kendo UI

Creating and configuring a SharePoint 2013 Secure Store Service Application for BCS

https://blogs.msdn.microsoft.com/sridhara/2010/01/27/setting-up-bcs-with-secure-store-application-impersonation/

http://www.c-sharpcorner.com/UploadFile/a9d961/configure-the-secure-store-service-in-sharepoint-2013/

http://www.c-sharpcorner.com/article/how-to-configure-secure-store-service-application/

http://www.codeproject.com/Articles/819546/Secure-Store-Service-in-SharePoint

Creating and configuring a SharePoint 2013 search service application

Standalone server

https://ashishbanga.wordpress.com/2014/10/30/how-to-configure-search-in-sharepoint-2013-configure-search-topology-in-sharepoint-2013/#comment-1602

Multi Server with Indexing

Creating and configuring a SharePoint 2013 search service application

For Errors :

https://social.technet.microsoft.com/wiki/contents/articles/17933.sharepoint-2013-the-sddl-string-contains-an-invalid-sid-or-a-sid-that-cannot-be-translated.aspx

 

 

Creating and configuring SharePoint 2013 reporting services

Powershell for configuring Reporting services in SP mode

Copied from  https://msdn.microsoft.com/en-us/library/jj219068.aspx#bkmk_full_script

#This script Configures SQL Server Reporting Services SharePoint mode

$starttime=Get-Date
write-host -foregroundcolor DarkGray StartTime>> $starttime

Write-Host -ForegroundColor Green “Import the SharePoint PowerShell snappin”
Add-PSSnapin Microsoft.Sharepoint.Powershell –EA 0

Write-Host -ForegroundColor Green “Install SSRS Service and Service Proxy, and start the service”
Write-Host -ForegroundColor Green “>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>”

Write-Host -ForegroundColor Green “Install the Reporting Services Shared Service”
Install-SPRSService

Write-Host -ForegroundColor Green ” Install the Reporting Services Service Proxy”
Install-SPRSServiceProxy

# Get the ID of the RS Service Instance and start the service
Write-Host -ForegroundColor Green “Start the Reporting Services Service”
$RS = Get-SPServiceInstance | Where {$_.TypeName -eq “SQL Server Reporting Services Service”}
Start-SPServiceInstance -Identity $RS.Id.ToString()

# Wait for the Reporting Services Service to start…
$Status = Get-SPServiceInstance $RS.Id.ToString()
While ($Status.Status -ne “Online”)
{
Write-Host -ForegroundColor Green “SSRS Service Not Online…Current Status = ” $Status.Status
Start-Sleep -Seconds 2
$Status = Get-SPServiceInstance $RS.Id.ToString()
}

$time=Get-Date
write-host -foregroundcolor DarkGray StartTime>> $starttime
write-host -foregroundcolor DarkGray $time

Write-Host -ForegroundColor Green “Create a new application pool and Reporting Services service application”
Write-Host -ForegroundColor Green “>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>”
Write-Host -ForegroundColor Green “Create a new application pool”
#!!!! update “-Account” with an existing Managed Service Account
New-SPServiceApplicationPool -Name “Reporting Services” -Account “<domain>\User name>”
$appPool = Get-SPServiceApplicationPool “Reporting Services”

Write-Host -ForegroundColor Green ” Create the Reporting Services Service Application”
#!!!! Update “-DatabaseServer”, an instance of the SQL Server database engine
$rsService = New-SPRSServiceApplication -Name “Reporting Services Application” -ApplicationPool $appPool -DatabaseName “Reporting_Services_Application” -DatabaseServer “<server name>”

Write-Host -ForegroundColor Green “Create the Reporting Services Service Application Proxy”
$rsServiceProxy = New-SPRSServiceApplicationProxy -Name “Reporting Services Application Proxy” -ServiceApplication $rsService

Write-Host -ForegroundColor Green “Associate service application proxy to default web site and grant web applications rights to SSRS application pool”
Write-Host -ForegroundColor Green “>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>”
# Associate the Reporting Services Service Applicatoin Proxy to the default web site…
Get-SPServiceApplicationProxyGroup -default | Add-SPServiceApplicationProxyGroupMember -Member $rsServiceProxy

$time=Get-Date
write-host -foregroundcolor DarkGray StartTime>> $starttime
write-host -foregroundcolor DarkGray $time

Write-Host -ForegroundColor Green “Enable the PowerView and reportserver site features”
Write-Host -ForegroundColor Green “>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>”
#!!!! update “-url” of the site where you want the features enabled
Enable-SPfeature -identity “powerview” -Url http://server/sites/bi
Enable-SPfeature -identity “reportserver” -Url http://server/sites/bi

####To Verify, you can run the following:
#Get-SPRSServiceApplication
#Get-SPServiceApplicationPool | where {$_.name -like “reporting*”}
#Get-SPRSServiceApplicationProxy
Other reference /help

http://www.c-sharpcorner.com/UploadFile/shyjumohan/create-reporting-services-service-application-in-sharepoint/

For errors :

https://support.microsoft.com/en-us/kb/889646

 

 

Configure SharePoint APPs in development Server

—————–Steps for Creation of an isolated app domain on development computer —————————-
1:Start the SharePoint 2013 Management Shell.

net start spadminv4
net start sptimerv4

Create your isolated app domain your apps, for example “apps.developement.local”.
1:Set-SPAppDomain “apps.developement.local”

Ensure that the SPSubscriptionSettingsService and AppManagementServiceInstance services are running.
1:Get-SPServiceInstance | where{$_.GetType().Name -eq “AppManagementServiceInstance” -or $_.GetType().Name -eq “SPSubscriptionSettingsServiceInstance”} | Start-SPServiceInstance

Verify that the SPSubscriptionSettingsService and AppManagementServiceInstance services are running.
1:Get-SPServiceInstance | where{$_.GetType().Name -eq “AppManagementServiceInstance” -or $_.GetType().Name -eq “SPSubscriptionSettingsServiceInstance”}
–To create new Manage account [run the below command if manage account is not present——

$account = New-SPManagedAccount

After that run below commands:

$account = Get-SPManagedAccount “domainname\username”
$appPoolSubSvc = New-SPServiceApplicationPool -Name SettingsServiceAppPool -Account $account
$appPoolAppSvc = New-SPServiceApplicationPool -Name AppServiceAppPool -Account $account
$appSubSvc = New-SPSubscriptionSettingsServiceApplication –ApplicationPool $appPoolSubSvc –Name SettingsServiceApp –DatabaseName SettingsServiceDB
$proxySubSvc = New-SPSubscriptionSettingsServiceApplicationProxy –ServiceApplication $appSubSvc
$appAppSvc = New-SPAppManagementServiceApplication -ApplicationPool $appPoolAppSvc -Name AppServiceApp -DatabaseName AppServiceDB
$proxyAppSvc = New-SPAppManagementServiceApplicationProxy -ServiceApplication $appAppSvc
Set-SPAppSiteSubscriptionName -Name “app” -Confirm:$false