Saturday, November 24, 2018

PWA: EPM/Project Server site give administrator access to user or group for project web app

Leave a Comment
To give administrator access to user/group for project web app we need to run following powershell command
Grant-SPProjectAdministratorAccess -Url http://contoso-AppSrv/pwa -UserAccount contoso\john.woods
Read More

SharePoint 2013/2016: The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered

Leave a Comment
While trying to give administrator access to user for an instance of PWA I tried to run following command in sharepoint powershell:
Grant-SPProjectAdministratorAccess -url XXXX user domain\XXXX

I came across following issues:

SharePoint 2013/2016: The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered

Solution:
This happened b/c I tried to launch sharepoint powershell with user part of farm admin group, however I need to work with account similar access to sharepoint central admin app pool as that account requires right on server & databases to run configuration through powershell commands.
so I need to run following command throught account which I used to install my sharepoint farm:
Add-SPShellAdmin -UserName Domain\User



Read More

Sunday, November 4, 2018

Sitecore: How to setup a visual studio solution

Leave a Comment
To setup sitecore visual studio solution we need following steps accordingly:


  1. Create a new MVC solution in Visual Studio
  2. Replace or copy web.config & global.asax files from inetpub->wwwroot->"Sitecore application" folder and paste it to new MVC application created in step 1.
  3. Similarly replace web.config files from View folder same as step 2 into new MVC application created in Step 1
  4. Add reference to following dlls (I mostly create a new folder in MVC solution/application created in step 1 called library and copy paste following files):
    1. Sitecore.Kernel.dll
    2. Sitecore.MVC.dll
    3. Sitecore.MVC.Analytics.dll
  5. Add new view to verify above configuration by using Sitecore intellisense for:
    1. @using Sitecore.MVC
    2. @Html.Sitecore().CurrentItem.Name
Read More

Thursday, November 1, 2018

Add new Publishing target in SiteCore 9

Leave a Comment
Previously in Sitecore 8 we used to add publishing target by following these three steps:

  1. Add new item under Sitecore->System->Publishing Targets
  1. Update Sitecore.config field to add database configuration section under <databases section for new Publishing Target i.e. WebUAE
  1. Add new connection string setting under ConnectionStrings.config for new web database
However while doing so we received following error:
Could not find configuration node: PropertyStoreProvider/store[@name='WebUAE']
solution:
For sitecore 9 we need to add missing nodes as indicated by error under section PropertyStoreProvider:
<store name="WebUSA" prefix="WebUSA" getValueWithoutPrefix="true" singleInstance="true" type="Sitecore.Data.Properties.$(database)PropertyStore, Sitecore.Kernel">      <param ref="dataApis/dataApi[@name='$(database)']" param1="$(name)" />
      <param resolve="true" type="Sitecore.Abstractions.BaseEventManager, Sitecore.Kernel" />
      <param resolve="true" type="Sitecore.Abstractions.BaseCacheManager, Sitecore.Kernel" />
    </store>
But wait, it pops up another error...hmmm Could not find configuration node: eventing/eventQueueProvider/eventQueue[@name='WebUAE']
solution:
Add following node under <eventQueueProvider
<eventQueue name="WebUSA" type="Sitecore.Data.Eventing.$(database)EventQueue, Sitecore.Kernel">
        <param ref="dataApis/dataApi[@name='$(database)']" param1="$(name)" />
        <param ref="PropertyStoreProvider/store[@name='$(name)']" />
      </eventQueue>
This will fix adding new publishing target for sitecore 9.
Happy development
x

Read More