Pages

Tuesday, February 18, 2014

Content Query Web Part (CQWP) vs Content Search Web Part (CSWP) in SharePoint 2013 ?

1) Content Query Web Part

  • Use xsl to customize look  and feel
  • Information are display instant unless caching enable
  • Can display both minor and major version
  • Can use Target Audience
  • Can only query content same site collection.


2) Content Search Web Part

  • Use HTML and JAVASCRIPT to customize look and feel so very flexible
  • Base on search crawl so data/information published is not instance
  • Only display major version
  • Can't use Target Audience
  • Can query cross site collection

What i miss the most is Target Audience is missing in CSWP. 



Wednesday, January 22, 2014

SharePoint 2013 change look single page. (CSS)

There a lot of time that I have to do some css modification to specific home page like remove spacing between the banner and the content. I script editor  to modified style and/or add additional javascript.

example:

1) Insert script editor webpart
2) insert following to override some css.
<style>
#suiteBar {DISPLAY: none}
.ms-core-navigation { DISPLAY: none }
#contentBox { margin-left: 0px }
.ms-mpSearchBox {DISPLAY: none}
.ms-siteactions-normal {DISPLAY: none}
</style>

Tuesday, January 7, 2014

SharePoint 2013 March PU (with search component and workflow manager 1.0)

SharePoint 2013 March Public Update is a base for any future update to SharePoint. The following is high level instruction.

Note: any existing workflow 2013 might need to delete and republish.

Assume (2 web front end, 2 apps server and 1 db) - i will call web1, web2, app1, app2 and db1 (app1 host central admin and search admin)

1) add user profile sync account to local admin group. This might break UPS if  you don't.
2) net stop SPTImerV4
    net stop OSearch15
    net stop SPSearchHostController
3) installl march PU on Web1 and restart, repeat this for Web2, App2 and App1 (last)
4) repeat step 2
5) run sharepoint configuration Wizard on Web1
6) restart SPSearchHostController
    restart OSearch15
    restart SPTimerV4
7) repeat step 4 to 6 on Web2 , App2 and App1( last)
6) re-run Register-SPWorkflowService

http://social.technet.microsoft.com/wiki/contents/articles/12497.sharepoint-2013-build-numbers.aspx

http://blogs.technet.com/b/wbaer/archive/2013/05/09/sharepoint-server-2013-march-2013-public-update.aspx

http://blogs.technet.com/b/tothesharepoint/archive/2013/03/13/how-to-install-update-packages-on-a-sharepoint-farm-where-search-component-and-high-availability-search-topologies-are-enabled.aspx

http://www.andrewconnell.com/blog/Updates-For-SP2013-Workflow


Monday, November 18, 2013

SharePoint Timer Service terminated with service every 1-2 minutes

I got this error in the event view every minutes or so. I don't know what cause it. I check Job History in central admin and found that not of the job is working. I see following error that i think it might be relate

SPTimerStore.InitializeTimer: SPConfigurationDatabase.RefreshCache returned SPConstants.InvalidRowVersion

The timer service could not initialize its configuration, please check the configuraiton database. will retry later

After googling and decided to try to clear the Configuration Cache, I found out that my cache folder is missing. I decided to recreate the cache folder.

1) Open regedit
2) HKLM->Software->Microsoft->Shared Tools->Web Server Extensions->15.0->Secure->ConfigDB
and look for Id which is a GUID
3) Go to C:\ProgramData\Microsoft\SharePoint\Config create a folder name from guid step 2
4) create a file call Cache.ini, edit and put 1 on the file
5) restart iis and timer service

Now my job is running again. Hope it help someone have same issue.

Thursday, November 14, 2013

Change Azure VM Instance Size Powershell


1) download and install Azure Powershell

2) Export your window azure profile and rename to something you like ex: 'c:\myazureprofile.publishsettings'

3) Import the setting

Import-AzurePublishSettingsFile 'c:\myazureprofile.publishsettings'

4) Run command in powershell to get current VM you have in asure, this will give you ServiceName, Name and Status 

Get-AzureVM

5) Change VM Size, $cloudSvcName, $vmname are from step 4. $NewSize value = ExtraSmall, Small, Medium...

Get-AzureVM -ServiceName $cloudSvcName -Name $vmname | Set-AzureVMSize $NewSize | Update-AzureVM



Wednesday, November 13, 2013

JSLink listview webpart not working

I create a field render using JSLink. It work fine on the list ,but when i create a new page add a listview web parts. It not working. It turn out that i have to turn off Server-Side Rendering.

Thursday, October 31, 2013

SharePoint 2013 Workflow can't start

I setup and configure workflow manager 1.0 (SharePoint 2013 workflow). The status in central admin show connected. I was able to use SharePoint designer to create and publish workflow. When i try to run the workflow, i got an error. I check SharePoint log without any luck ,but when i check event view under

Applications and Services Logs -> Microsoft-Workflow-> Operation and i got error

Failed SQL command after 1 tries with error '229'. Exception: System.Data.SqlClient.SqlException (0x80131904): The EXECUTE permission was denied on the object 'InsertTrackingAndStatus', database 'WFInstanceManagementDB', schema 'dbo'.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.CompleteAsyncExecuteReader()
   at System.Data.SqlClient.SqlCommand.EndExecuteNonQueryInternal(IAsyncResult asyncResult)
   at System.Data.SqlClient.SqlCommand.EndExecuteNonQuery(IAsyncResult asyncResult)
   at Microsoft.Workflow.Management.ExecuteNonQueryAsyncResult.OnEndExecuteSql(IAsyncResult result)
   at Microsoft.Workflow.Management.ExecuteSqlAsyncResult.EndAsyncResult(IAsyncResult result)
   at Microsoft.Workflow.Common.BackoffRetryAsyncResult.IsolateWithRetry(IAsyncResult result)
   at Microsoft.Workflow.Common.AsyncResult.AsyncCompletionWrapperCallback(IAsyncResult result)
ClientConnectionId:5b1469db-d187-4f8e-aa73-3482aa74a195  Command Details:   SQL Text          : InsertTrackingAndStatus
  SQL Parameters    :
    > @StatusRecords = Microsoft.Workflow.Management.SqlDataAccessProvider+InstanceStatusValuesCollection
    > @MetadataWithInstanceId = Microsoft.Workflow.Management.SqlDataAccessProvider+MetadataValuesWithInstanceIdCollection
    > @Variables = Microsoft.Workflow.Management.SqlDataAccessProvider+VariablesCollection
    > @TrackingRecords =
    > @StatusHistoryRecords =
    > @DebugTraceRecords = Microsoft.Workflow.Management.SqlDataAccessProvider+DebugTraceRecordValuesCollection
    > @RollingStatusHistoryWindowSize = 1000
    > @RollingDebugTraceWindowSize = 5000


I have the workflow service account owner permission to the WFResourceManagment and WFInstanceManagemnet database and it start working again. I don't think owner is needed ,but since this is a dev machine so i give owner to get thing moving.