Tuesday, September 2, 2014

SharePoint 2013 Infopath browser form, people picker error in IE 11: JSON is undefined

This is a strange compatibility issue so have a ticket open with Microsoft so will update with the real fix (i'm assuming that it will be a hot fix).

When you open a people picker in IE 11 for a infopath form in the browser, the error get's thrown, JSON is undefined.

the temporary fix is to add teh following to the pickerdialog.master in the layouts folder.

Add this to the top of the page:
<!DOCTYPE html>


Replace the meta tag where it has
<meta http-equiv="X-UA-Compatible" content="IE=10" />

with the following:

 <meta http-equiv="X-UA-Compatible" content="IE=edge;chrome=1" />
<!--[if lt IE 9]>
 <script src="http://code.jquery.com/jquery-1.10.2.js"></script>
<![endif]-->
<!--[if gte IE 9]><!-->
 <script src="http://code.jquery.com/jquery-2.0.3.js"></script>
<!--<![endif]-->

Save.

Test your people picker on infopath browser form.

Monday, August 25, 2014

SharePoint 2013 SP or CU error install error: An error occurred while running detection

While installing SP1 or any other CU, the error pops up saying that an "error occurred while running detection".

There are a lot of articles out there to run the repair on SharePoint, run the configuration, etc.  but none of those worked.   

Hmmm... so i decided to unpack the SP1 and create a batch file and run the msp files on all the servers, then run the configuration and wooo  hooo.   
Everything works (installing the CU, or SP no more problems).    

Here is the example for SP1:  the contents of the batch files that i created with SP1:

Officer server:  I extracted it to D:\off\
with the command:   officeserversp2013-kb2880552-fullfile-x64-en-us.exe /extract:"D:\off"  

D:\off\acsrvmuisp-en-us.msp /quiet
D:\off\acsrvwfesp-x-none.msp /quiet
D:\off\coreservermuisp-en-us.msp /quiet
D:\off\coreserversp-x-none.msp /quiet
D:\off\edumuisp-en-us.msp /quiet
D:\off\eduwfesp-x-none.msp /quiet
D:\off\ifsmuisp-en-us.msp /quiet
D:\off\ifswfesp-x-none.msp /quiet
D:\off\lpsrvmuisp-en-us.msp /quiet
D:\off\lpsrvwfesp-x-none.msp /quiet
D:\off\oserversp-x-none.msp /quiet
D:\off\osfservermuisp-en-us.msp /quiet
D:\off\osfserversp-x-none.msp /quiet
D:\off\ppsmamuisp-en-us.msp /quiet
D:\off\ppsmawfesp-x-none.msp /quiet
D:\off\pptservermuisp-en-us.msp /quiet
D:\off\pptserversp-x-none.msp /quiet
D:\off\smsmuisp-en-us.msp /quiet
D:\off\smssp-x-none.msp /quiet
D:\off\sqlemuisp-en-us.msp /quiet
D:\off\stssp-x-none.msp /quiet
D:\off\svrproofsp-en-us.msp /quiet
D:\off\svrproofsp-ar-sa.msp /quiet 
D:\off\svrproofsp-az-latn-az.msp /quiet
D:\off\svrproofsp-bg-bg.msp /quiet
D:\off\svrproofsp-bs-latn-ba.msp /quiet
D:\off\svrproofsp-ca-es.msp /quiet
D:\off\svrproofsp-cs-cz.msp /quiet
D:\off\svrproofsp-cy-gb.msp /quiet
D:\off\svrproofsp-da-dk.msp /quiet
D:\off\svrproofsp-de-de.msp /quiet
D:\off\svrproofsp-el-gr.msp /quiet
D:\off\svrproofsp-es-es.msp /quiet
D:\off\svrproofsp-et-ee.msp /quiet
D:\off\svrproofsp-eu-es.msp /quiet
D:\off\svrproofsp-fi-fi.msp /quiet
D:\off\svrproofsp-ga-ie.msp /quiet
D:\off\svrproofsp-gl-es.msp /quiet
D:\off\svrproofsp-gu-in.msp /quiet
D:\off\svrproofsp-he-il.msp /quiet
D:\off\svrproofsp-hr-hr.msp /quiet
D:\off\svrproofsp-id-id.msp /quiet
D:\off\svrproofsp-it-it.msp /quiet
D:\off\svrproofsp-kk-kz.msp /quiet
D:\off\svrproofsp-kn-in.msp /quiet
D:\off\svrproofsp-ko-kr.msp /quiet
D:\off\svrproofsp-lt-lt.msp /quiet
D:\off\svrproofsp-lv-lv.msp /quiet
D:\off\svrproofsp-mk-mk.msp /quiet
D:\off\svrproofsp-mr-in.msp /quiet
D:\off\svrproofsp-ms-bn.msp /quiet
D:\off\svrproofsp-ms-my.msp /quiet
D:\off\svrproofsp-nb-no.msp /quiet
D:\off\svrproofsp-nl-nl.msp /quiet
D:\off\svrproofsp-nn-no.msp /quiet
D:\off\svrproofsp-pa-in.msp /quiet
D:\off\svrproofsp-pl-pl.msp /quiet
D:\off\svrproofsp-pt-br.msp /quiet
D:\off\svrproofsp-ro-ro.msp /quiet
D:\off\svrproofsp-ru-ru.msp /quiet
D:\off\svrproofsp-sk-sk.msp /quiet
D:\off\svrproofsp-sl-si.msp /quiet
D:\off\svrproofsp-sr-cyrl-cs.msp /quiet
D:\off\svrproofsp-sv-se.msp /quiet
D:\off\svrproofsp-sr-latn-cs.msp /quiet
D:\off\svrproofsp-ta-in.msp /quiet
D:\off\svrproofsp-te-in.msp /quiet
D:\off\svrproofsp-th-th.msp /quiet
D:\off\svrproofsp-tr-tr.msp /quiet
D:\off\svrproofsp-uk-ua.msp /quiet
D:\off\svrproofsp-ur-pk.msp /quiet
D:\off\svrproofsp-vi-vn.msp /quiet
D:\off\svrproofsp-zh-cn.msp /quiet
D:\off\vsrvmuisp-en-us.msp /quiet
D:\off\vsrvwfesp-x-none.msp /quiet
D:\off\wasrvmuisp-en-us.msp /quiet
D:\off\wasrvwfesp-x-none.msp /quiet
D:\off\wdsrvmuisp-en-us.msp /quiet
D:\off\wdsrvsp-x-none.msp /quiet
D:\off\wssmuisp-en-us.msp /quiet
D:\off\xlsrvmuisp-en-us.msp /quiet
D:\off\xlsrvwfesp-x-none.msp /quiet



Project server:  I extracted it to D:\proj\
with the command:   projectserversp2013-kb2880553-fullfile-x64-en-us.exe /extract:"D:\proj"

D:\proj\projectservermuisp-en-us.msp
D:\proj\projectserverwfesp-x-none.msp
D:\proj\pserversp-x-none.msp


Language Pack:  I extracted it to D:\lang\
with the command:   serverlpksp2013-kb2880554-fullfile-x64-en-us.exe /extract:"D:\lang"

D:\lang\acsrvmuisp-en-us.msp /quiet
D:\lang\coreservermuisp-en-us.msp /quiet
D:\lang\edumuisp-en-us.msp /quiet
D:\lang\ifsmuisp-en-us.msp /quiet
D:\lang\lpsrvmuisp-en-us.msp /quiet
D:\lang\osfservermuisp-en-us.msp /quiet
D:\lang\osmuisp-en-us.msp /quiet
D:\lang\ppsmamuisp-en-us.msp /quiet
D:\lang\pptservermuisp-en-us.msp /quiet
D:\lang\projectservermuisp-en-us.msp /quiet
D:\lang\smsmuisp-en-us.msp /quiet
D:\lang\svrproofsp-ar-sa.msp /quiet
D:\lang\svrproofsp-az-latn-az.msp /quiet
D:\lang\svrproofsp-bg-bg.msp /quiet
D:\lang\svrproofsp-bs-latn-ba.msp /quiet
D:\lang\svrproofsp-ca-es.msp /quiet
D:\lang\svrproofsp-cs-cz.msp /quiet
D:\lang\svrproofsp-cy-gb.msp /quiet
D:\lang\svrproofsp-da-dk.msp /quiet
D:\lang\svrproofsp-de-de.msp /quiet
D:\lang\svrproofsp-el-gr.msp /quiet
D:\lang\svrproofsp-en-us.msp /quiet
D:\lang\svrproofsp-es-es.msp /quiet
D:\lang\svrproofsp-et-ee.msp /quiet
D:\lang\svrproofsp-eu-es.msp /quiet
D:\lang\svrproofsp-fi-fi.msp /quiet
D:\lang\svrproofsp-fr-fr.msp /quiet
D:\lang\svrproofsp-ga-ie.msp /quiet
D:\lang\svrproofsp-gl-es.msp /quiet
D:\lang\svrproofsp-gu-in.msp /quiet
D:\lang\svrproofsp-he-il.msp /quiet
D:\lang\svrproofsp-hi-in.msp /quiet
D:\lang\svrproofsp-hr-hr.msp /quiet
D:\lang\svrproofsp-hu-hu.msp /quiet
D:\lang\vsrvmuisp-en-us.msp /quiet
D:\lang\wasrvmuisp-en-us.msp /quiet
D:\lang\wdsrvmuisp-en-us.msp /quiet
D:\lang\wssmuisp-en-us.msp /quiet
D:\lang\xlsrvmuisp-en-us.msp /quiet
D:\lang\xsmuisp-en-us.msp /quiet

--------------------------------------------------------------








Tuesday, August 5, 2014

Sharepoint List view showing raw html

This is a simple fix.  Modify the webpart settings:

Go to Miscellaneous:

Check the "Server Render"

Ok or Apply.

Stop editing the page.

Done!!!!

:)

Tuesday, July 29, 2014

Create a new the crawl database and replace the old or corrupted crawl database in SharePoint 2013 Search

Recently the crawl database in sharepoint search got corrupted.   After we fixed the indexes, it kept getting corrupted so we just recreated the database and the issues went away.  Here are the steps and power shell.


#You will need to change the search service application name, also your sql server name, and the guid of you crawl store. 




Add-PSSnapin Microsoft.SharePoint.PowerShell


#List all crawl database:


Get-SPEnterpriseSearchCrawlDatabase -SearchApplication "Search service Application"




#Create a new Crawl database: 

New-SPEnterpriseSearchCrawlDatabase -DatabaseName "Search_Service_Application_CrawlStoreDB" -DatabaseServer "SQLServerName" -SearchApplication "Search Service Application"




#Delete the crawl store that is corrupted or old.

$ssa = Get-SPEnterpriseSearchServiceApplication -Identity "Search service Application"
$cs = $ssa.CrawlStores


#list the crawl stores to find the corrupted or old one

$cs


#delete the old/corrupted store


$cs1 = $cs.Item("GUID of Old database")
$cs1.Delete()




# if the search is in a System paused for refactoring, use the command below to normal


#$ssa = Get-SPEnterpriseSearchServiceApplication -Identity "Search service Application"
#$ssa.ForceResume($ssa.IsPaused())



Wednesday, June 25, 2014

SharePoint 2010 Custom Workflow Actions in SharePoint 2013

After upgrading the error comes up that the action can not load the class.  

Error:  Could not deserialize object. The type 'MyCustom.WorkflowActions.StartAworkflowOnAnotherList' could not be resolved.

Before in 2010:

<System.Workflow.ComponentModel.WorkflowCompiler>
    <authorizedTypes>
          <authorizedType .....>

In SharePoint 2013 after the upgrade which causes this break:

<System.Workflow.ComponentModel.WorkflowCompiler>
    <authorizedTypes>
      <targetFx version="v4.0">
      </targetFx>
       <authorizedType Assembly="MyCustom.WorkflowActions.StartAworkflowOnAnotherList.....>


To fix:

<System.Workflow.ComponentModel.WorkflowCompiler>
    <authorizedTypes>
      <targetFx version="v4.0">
            <authorizedType Assembly="MyCustom.WorkflowActions.StartAworkflowOnAnotherList.....>
      </targetFx>
       

Thursday, February 20, 2014

SharePoint 2010 and SCOM 2012 R2 with APM starts csc.exe instances which overloads the server resources. SCOM 2012 R2 with APM errors with .NET 2.0

The WFE servers resources get overloaded or maxed out with instances of csc.exe running when a site is called.  No real errors are displayed in the event viewer.
Pages do not get loaded due to time outs with the memory and the processors being maxed out.

To resolved till they fix SCOM 2012 R2 APM issues with .NET 2.0, you will need to uninstall from all programs the Microsoft Monitoring and reboot.  Or revert back to SCOM 2012 SP1 agent.

Then all sites are back to normal.  

Tuesday, February 4, 2014

Distributed Cache Powershell commands

From http://technet.microsoft.com/en-us/library/jj219613.aspx
Change the service account running the Distributed Cache
It is recommended to use a SharePoint managed account for this service.
$spfarm = Get-SPFarm
$spcacheService = $spfarm.Services | where {$_.Name -eq “AppFabricCachingService”}
$spaccount = Get-SPManagedAccount -Identity domain\spdistcache$spcacheService.ProcessIdentity.CurrentIdentityType = “SpecificUser”
$spcacheService.ProcessIdentity.ManagedAccount = $spaccount
$spcacheService.ProcessIdentity.Update()
$spcacheService.ProcessIdentity.Deploy()

Graceful stop and deattach local server (No lost cache data)
Stop-SPDistributedCacheServiceInstance -Graceful
Remove-SPDistributedCacheServiceInstance
Deattach local server from a cache cluster (Multiple Distributed Cache servers)
Remove-SPDistributedCacheServiceInstance
Reattach local server to a cache cluster (Multiple Distributed Cache servers)
Add-SPDistributedCacheServiceInstance
Delete the service
$instanceName =”SPDistributedCacheService Name=AppFabricCachingService”
$serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername}
$serviceInstance.delete()
Verify in Central Admin, System Settings, Manage Services on Server. It should be gone from this list when it has been completely deleted.
In a multi server farm, you will have to select which server to show the services from in the top-right dropdown.
Create a new service
Add-SPDistributedCacheServiceInstance
Verify in Central Admin, System Settings, Manage Services on Server. It should appear in this list when it has been created. In a multi server farm, you will have to select which server to show the services from in the top-right dropdown.
Start the service on a server
$instanceName =”SPDistributedCacheService Name=AppFabricCachingService”
$serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername}
$serviceInstance.Provision()
Stop the service on a server
$instanceName =”SPDistributedCacheService Name=AppFabricCachingService” $serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername}
$serviceInstance.Unprovision()
Check current Cache memory allocation
Use-CacheCluster Get-AFCacheHostConfiguration -ComputerName $env:computername -CachePort “22233″
Change the Cache memory allocation
On all Cache servers in the farm stop the service
$instanceName =”SPDistributedCacheService Name=AppFabricCachingService” $serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername}
$serviceInstance.Unprovision()
Update the memory allocation
Update-SPDistributedCacheSize -CacheSizeInMB CacheSize
Start the service on all Cache servers
$instanceName =”SPDistributedCacheService Name=AppFabricCachingService” $serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername}
$serviceInstance.Provision()


Remove a host from the cluster: if all else failes
Stop-CacheHost -HostName <servername> -CachePort 22233


Unregister-CacheHost -HostName <servername> -RemoveServicePermissions -ProviderType SPDistributedCacheClusterProvider -ConnectionString 'Data Source=<dbservername>;Initial Catalog=<SharePoint_Config>;Integrated Security=True;Enlist=False'