March 24, 2014

PerformancePoint dashboard designer start issue says "Application cannot be started. Contact the application vendor"

Hi All,

when i was configuring SharePoint 2013 with Power View, after installing and configuration done on a Bi Site tried to open PerformancePoint designer.

but it was uninterrupted with a popup message saying :

After googling for several hours the root cause has happened due to the October CU's

Issue:
After the SharePoint 2013 October 2013 cumulative update (CU) the PerformancePoint 2013 dashboard designer fails to start and gives error "Application cannot be started.  Contact the application vendor."

Cause:
The dashboard designer files were not signed correctly during the CU build process.


Workaround:
download PPS.zip file
Backup these files on all your SharePoint servers:

C:\Program Files\Common Files\Microsoft Shared\Web ServerExtensions\15\TEMPLATE\LAYOUTS\ppsma\1033\Designer.Application

C:\Program Files\Common Files\Microsoft Shared\Web ServerExtensions\15\TEMPLATE\LAYOUTS\ppsma\1033\DesignerInstall\Designer.exe.manifest

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\LAYOUTS\ppsma\1033\DesignerInstall\Microsoft.SharePoint.Client.Runtime.dll

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\LAYOUTS\ppsma\1033\DesignerInstall\Microsoft.PerformancePoint.Scorecards.Client.dll

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\LAYOUTS\ppsma\1033\DesignerInstall\Microsoft.PerformancePoint.Scorecards.DesignerPlugins.dll

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\LAYOUTS\ppsma\1033\DesignerInstall\Microsoft.SharePoint.Client.dll

Replace the files above with the files contained in the PPS.zip attached to this blog post.

A complete Error may look like:
SOURCES
Deployment url            : http://jkpoint/_layouts/15/ppsma/1033/designer.application
                        Server        : Microsoft-IIS/8.0
X-Powered-By    : ASP.NET
Application url            : http://jkpoint/_layouts/15/ppsma/1033/DesignerInstall/Designer.exe.manifest
                        Server        : Microsoft-IIS/8.0
X-Powered-By    : ASP.NET

IDENTITIES
Deployment Identity        : DashboardDesigner.exe(en-us), Version=15.0.4549.1000, Culture=neutral, PublicKeyToken=f7b232fd7284a56a, processorArchitecture=msil

APPLICATION SUMMARY
* Online only application.
* Trust url parameter is set.
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of http://jkpoint/_layouts/15/ppsma/1033/designer.application resulted in exception. Following failure messages were detected:
+ Reference in the deployment does not match the identity defined in the application manifest.

OPERATION PROGRESS STATUS
* [29/11/2013 4:27:37 PM] : Activation of http://jkpoint/_layouts/15/ppsma/1033/designer.application has started.
* [29/11/2013 4:27:37 PM] : Processing of deployment manifest has successfully completed.
* [29/11/2013 4:27:37 PM] : Installation of the application has started.

ERROR DETAILS
Following errors were detected during this operation.
* [29/11/2013 4:27:37 PM] System.Deployment.Application.InvalidDeploymentException (SubscriptionSemanticValidation)
- Reference in the deployment does not match the identity defined in the application manifest.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, IDownloadNotification notification, DownloadOptions options, Uri& appSourceUri, String& appManifestPath)
at System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, Uri& appSourceUri, String& appManifestPath)
at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)

COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.

March 21, 2013

InfoPath Form Library Bulk Updater Tool

Hi,

today i come with my intresting achivement with customer requirement, in our customer portal they have a InfoPath form library. and they require a way to do a bulk update with the already submited forms (instead of opening and updating individual items one by one- actually a painful thing). So here is the solution:


 created a visual webpart, which runs a code on button click and do's the magic (in my scenario, it updated data inside xml & library metadata values).

Here is the code inside my button click:

{
lstItemsProcessed =
new List<string>();
int i = 1;
int j = 0;
try{SPSecurity.RunWithElevatedPrivileges(delegate(){

using (SPSite site = new SPSite(SPContext.Current.Site.Url)){

using (SPWeb web = site.OpenWeb(siteUrl)){
web.AllowUnsafeUpdates =
true;
SPList objFlib = web.Lists[libraryName];
foreach (SPListItem objFitm in objFlib.Items){

try{SPFile objExisitingFile = objFitm.File;
//objExisitingFile.CheckOut();XmlDocument xmlFile = new XmlDocument();xmlFile.Load(objExisitingFile.OpenBinaryStream());

XmlNode xmlRootNode = xmlFile.DocumentElement;
XPathNavigator xmlNav = xmlFile.CreateNavigator();
XmlNamespaceManager nsMgr = new XmlNamespaceManager(xmlFile.NameTable);nsMgr.AddNamespace(
"my", "http://schemas.microsoft.com/office/infopath/2003/myXSD/2011-01-05T09:37:29");
if (txtFindVal.Text.Length > 0 && txtValue.Text.Length > 0){

if (xmlRootNode.SelectSingleNode("//my:" + ddlColumnName.SelectedItem.ToString(), nsMgr).InnerText.Equals(txtFindVal.Text)){
xmlRootNode.SelectSingleNode(
"//my:" + ddlColumnName.SelectedItem.ToString(), nsMgr).InnerText = txtValue.Text;
string strData = xmlFile.OuterXml;
MemoryStream msFile = new MemoryStream(Encoding.UTF8.GetBytes(strData));objExisitingFile.SaveBinary(msFile);

//objExisitingFile.CheckIn("Automated update by BulkUpdator V.1");j++;
lstItemsProcessed.Add(i.ToString() +
": Processed " + objFitm.Name + " at " + DateTime.Now.ToShortDateString());}
}
}

catch (Exception ex){
lstItemsProcessed.Add(i.ToString() +
": Error " + objFitm.Name + " at " + DateTime.Now.ToShortDateString() + " -> " + ex.Message);lblMsg.Text =
@"From Button Click Inner Catch (" + i.ToString() + ")<br/>" + ex.Message;}

finally{
i++;
}
}
web.AllowUnsafeUpdates =
false;web.Close();
}
site.Close();
lblMsg.Text =
"Processed: (" + i.ToString() + ") and Updated : (" + j.ToString() + ") at " + DateTime.Now.ToShortDateString();}
});
}

catch (Exception ex){
lblMsg.Text =
@"From Button Click Upper Catch(" + i.ToString() + ")<br/>" + ex.Message;}
}

Thanks for approach initiation post by Andy Noon


i hope this helps you a lot.

Thanks,
JK

Retrieve your SharePoint Product key from server [2007 / 2010 / 2013]

Hi,

here is the below script which can retrieve your SharePoint product key from the machine, tested in Dev server (SharePoint 2010 version). i hope this may help in some situations for you:


const HKEY_LOCAL_MACHINE = &H80000002
strKeyPath = "SOFTWARE\Microsoft\Office\14.0\Registration\{90140000-110D-0000-1000-0000000FF1CE}"
strValueName = "DigitalProductId"
strComputer = "."
dim iValues()
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\default:StdRegProv")
oReg.GetBinaryValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,iValues
Dim arrDPID
arrDPID = Array()
For i = 808 to 822
ReDim Preserve arrDPID( UBound(arrDPID) + 1 )
arrDPID( UBound(arrDPID) ) = iValues(i)
Next

Dim arrChars
arrChars = Array("B","C","D","F","G","H","J","K","M","P","Q","R","T","V","W","X","Y","2","3","4","6","7","8","9")

For i = 24 To 0 Step -1
k = 0
For j = 14 To 0 Step -1
k = k * 256 Xor arrDPID(j)
arrDPID(j) = Int(k / 24)
k = k Mod 24
Next
strProductKey = arrChars(k) & strProductKey
If i Mod 5 = 0 And i <> 0 Then strProductKey = "-" & strProductKey
Next
strFinalKey = strProductKey

Set wshShell=CreateObject("wscript.shell")
strPopupMsg = "Your Microsoft SharePoint 2010 Product Key is:" & vbNewLine & vbNewLine & strFinalKey
strPopupTitle = "Product Key"
wshShell.Popup strPopupMsg,,strPopupTitle,vbCancelOnly+vbinformation
wScript.Echo strPopupMsg



save its as sharepointlicense.vbs and run it from command prompt.

Thanks,
JK

Update after Suggesting Salaudeen with his Power Shell script for 2007 & 2010 version SharePoint Farm as below:

PowerShell Script to Recover SharePoint 2007 Product key:
function Get-SP2007ProductKey {   
    $map="BCDFGHJKMPQRTVWXY2346789"
    $value = (get-itemproperty "HKLM:\SOFTWARE\Microsoft\Office\12.0\Registration\{90120000-110D-0000-1000-0000000FF1CE}").digitalproductid[0x34..0x42] 
    $ProductKey = "" 
    for ($i = 24; $i -ge 0; $i--) {
      $r = 0
      for ($j = 14; $j -ge 0; $j--) {
        $r = ($r * 256) -bxor $value[$j]
        $value[$j] = [math]::Floor([double]($r/24))
        $r = $r % 24
      }
      $ProductKey = $map[$r] + $ProductKey
      if (($i % 5) -eq 0 -and $i -ne 0) {
        $ProductKey = "-" + $ProductKey
      }
    }
    $ProductKey
}

#Call the function

Get-SP2007ProductKey

PowerShell Script to Recover SharePoint 2010 Product Key:
function Get-SP2010ProductKey {   
    $map="BCDFGHJKMPQRTVWXY2346789"
    $value = (get-itemproperty "HKLM:\SOFTWARE\Microsoft\Office\14.0\Registration\{90140000-110D-0000-1000-0000000FF1CE}").digitalproductid[0x34..0x42] 
    $ProductKey = "" 
    for ($i = 24; $i -ge 0; $i--) {
      $r = 0
      for ($j = 14; $j -ge 0; $j--) {
        $r = ($r * 256) -bxor $value[$j]
        $value[$j] = [math]::Floor([double]($r/24))
        $r = $r % 24
      }
      $ProductKey = $map[$r] + $ProductKey
      if (($i % 5) -eq 0 -and $i -ne 0) {
        $ProductKey = "-" + $ProductKey
      }
    }
    $ProductKey
}
#Call the function
Get-SP2010ProductKey

Update from Senglory  as a comment to my blog post: 03/01/14 

And here's the code for Sharepoint 2013

function Get-SP2013ProductKey { 
$map="BCDFGHJKMPQRTVWXY2346789" 
$value = (get-itemproperty "HKLM:\SOFTWARE\Microsoft\Office\15.0\Registration\{90150000-110D-0000-1000-0000000FF1CE}").digitalproductid[0x34..0x42] 
$ProductKey = "" 
for ($i = 24; $i -ge 0; $i--) { 
$r = 0 
for ($j = 14; $j -ge 0; $j--) { 
$r = ($r * 256) -bxor $value[$j] 
$value[$j] = [math]::Floor([double]($r/24)) 
$r = $r % 24 
} 
$ProductKey = $map[$r] + $ProductKey 
if (($i % 5) -eq 0 -and $i -ne 0) { 
$ProductKey = "-" + $ProductKey 
} 
} 
$ProductKey
} 
#Call the function
Get-SP2013ProductKey


[And still i haven't tried this as i don't have 2013 version environment, if it works please do reply your confirmation]

June 01, 2012

Calculated column Formula supporting Maximum number of IF ELSE statements and workaround for syntax error

Hi SP Folks,

One of the user got requirement with colour coding to a list view based on the values selected. so created a calculated columns to achive this functionality. but user experienced error after choose to go with extra color codes (which will extend the Furmula conditions) as:

"Calculated column sysntax error OR not supported", but formula syntax looks fine. After investiagtion

the calculated column supports only 7 levels of IF ELSE conditions in the formula, after that it will through above error. so after googling found solution HERE, and can be achivable by CASE statement as HERE(but i didn't try this)

the output result:
Thanks,
JK

April 26, 2012