Page 19 of 22

sitecore 9 installation CertEnroll::CSignerCertificate::Initialize: Cannot find object or property. 0x80092004 (-2146885628 CRYPT_E_NOT_FOUND)

Solution:

  1. Go to mmc > Add/Remove Snap in > Certificates > Computer Account > Local Computer;
  2. Delete following certificate (if exist) under ā€œPersonal/Certificatesā€ and ā€œTrusted Root Certification Authorities/Certificatesā€;
    • *.xconnect
    • *.xconnect_client
    • <Sitecore9 site name>
    • DO_NOT_TRUST_SitecoreFundamentalsRoot
    • DO_NOT_TRUST_SitecoreRootCert
  3. Go to mmc > Add/Remove Snap in > Certificates > Computer Account > My user account;
  4. Repeat step (2);
  5. Go to C:\certificates, delete allĀ *.crt files;

 

Referred from- https://learnsitecorebasics.wordpress.com/2018/06/28/install-sitecoreconfiguration-the-certificate-does-not-have-a-property-that-references-a-private-key/

Sitecore9 installation error: Cannot process argument transformation on parameter ‘Signer’. Cannot convert the “System.Object[]” value of type “System.Object[]” to type

Remove existing certificate. If you know the thumbprint use the below powershell command to remove certificate-

Get-ChildItem Cert:\LocalMachine\Root\<<thumbprint>> | Remove-Item

To list the existing certificates use following command-

Set-Location Cert:\LocalMachine\Root
Get-ChildItem | Format-Table Subject, FriendlyName, Thumbprint -AutoSize

Why build server is required?

Often question arises why we need build server and why not push the built code tested on dev to test environment.

Automation.Ā 

One of the keystone for having the build server is to have the software built automatically

To have the code built, packaged and released to the prod and non-prod environments we may use automation which contains mainly 2 things, a tool to build the code i.e. Jenkins, Team city or VSTS and tool to manage releases like Octopus etc.

Automation tasks may look like this-

Get code from source control (TFS/VSTS)

Build the Software (Jenkins, TC etc)

Package the files

Push the package to Release (Octopus)

Create the release

Removes the dev machine been the source of truth

Dev machine should not be the only place to prove the code been satisfactorily built. Build server helps integrate dev team work and compiled and build at central place. Sometimes devs dont know how things got working, build server helps answer that.

 

 

 

‘System.Web.Security. SqlMembershipProvider’ requires a database schema compatible with schema version ‘1’.

If you are setting asp.net membership and see following error

The ‘System.Web.Security.SqlMembershipProvider’ requires a database schema compatible with schema version ‘1’. Ā However, the current database schema is not compatible with this version. Ā You may need to either install a compatible schema with aspnet_regsql.exe (available in the framework installation directory), or upgrade the provider to a newer version.

 

Add following data inĀ [aspnet_SchemaVersions] table

Feature CompatibleSchemaVersion IsCurrentVersion
common 1 1
health monitoring 1 1
membership 1 1
personalization 1 1
profile 1 1
role manager 1 1

IMP- Restart the app pool and website

git push and fetch

Changes committed to local or remote repository needs to be synced.
To get the remote repository synced with local use fetch and push vise versa.

 git fetch origin branch_name

When a fetch is done it creates or brings in changes from remote to origin/branch_name in local but not merge with local branch. For this we need to merge the changes to the local branch

To see the origin branch-

 git branch -r

Use these strategies for fetch-
Fetch the changes often
Fetch before you start the work
Fetch before you push the changes so that any conflicts can be resolved.

To Merge the changes to the local branch or the working branch first checkout the branch where you want to merge and then use following-

git merge origin/branch_name

You may also use git pull
git pull = git fetch + git merge

To pull the changes again switch to the local branch you want to merge the changes to-

 git pull origin branch_name

Push changes to remote
You may use following-

 git push origin remote_branch_name

This command shall push changes from source local branch into origin target branch

You may also use this –

 git push origin source_local_branch:target_remote_branch

Note this is separated by :(colan)

Delete remote branch

To remove remote branch simply use –

git push origin :target_remote_branch

Note there is nothing before : here which means push nothing to target remote branch which shall delete that branch.

OR use following to delete remote branch-

 git push origin --delete remote_branch

Git clone and add remote

Git has working directory, Staging Index and local repository. All changes done to the project sits in local repository until it is been pushed to the remoteĀ  repository. There are different tools that facilitates to provide code management system using git. One of them is GitHub, you may also use VSTS.

To push or sync the changes to the remote repository, you may clone the changes from remote to your local empty repository or if you have local repository you may add changes to remote repository.

To add changes to remote- github in this case-

git remote add origin remote_repository_url

To remove the remote remote origin-

 git remote rm origin

To clone from the remote-

git clone remote_repository_url

This shall be cloned in the current directory. In case if you want to new directory specify a name-

git clone remote_repository_url directory_name

 

 

Git stash

git-stash is used to record the current state of the working directory and the index and want to clean the directory with the intent of applying or dropping the stashed changes to the working directory. Suppose there are changes made to a file in working directory but before committing those changes you are willing to pull the changes from master. Stash the changes made to working directory-

git-branch-9

Stash Changes

 git stash

You may also stash changes with comments-

git stash save "Content updated to stash"

git-branch-10

You can stash multiple times, while stashed git reference this with unique name i.e. stash@{0}, stash@{1} and so forth. You may also switch between the branches once stashed as the recorded copy is available between the branches.

If you want to see the stash list

 git stash list

git-branch-11

Revert Stashed Changes
To apply stashed changes made to the working directory, use either-

 git stash pop

This shall apply/merge changes to the working directory and remove it from stash list.

 git stash apply

This shall apply/merge changes to the working directory but still keep the copy of stash.

Removing stashed changes
To delete specific stash item use-

 git stash drop stash@{0}

To delete all stash items-

 git stash clear

Use Stash clear wisely as it is destructive.

Git branch

Branches are used to isolate working folder. The HEAD always point to the current branch and can be checked as follows-

 cat .git/HEAD

This shall give the reference where the HEAD point to.

Before creating a branch you may check the if its already created by-

git branch

This shall display the list of branch in current repository.
git-branch-2

To create a new branch-

 git branch branch_name

Use basic letters and punctuation for branch name. Although the branch is created it is not yet checkout to use. To switch the branch-

 git checkout branch_name

You may also use following to create and switch to the new branch-

 git checkout -b "branch_name"

git-branch-1

Switching between branches

If you want to switch between the branches that are already created-

git checkout branch_name

If there are staged changes but changes not committed you wont be able to switch between branch as git gives a warning that the changes done in current branch might be overwritten-
gitlog-oneline

Comparing branches
If you want compare the difference between the branches-

git diff master..branch_name

master and branch_name are branches been compared here.
.. is a range operator.

git-branch-3
“Changed file content” text in the fileafterrenaming.txt is the change between branches

If you want to see the differences with colored text-

 git diff --color-words master..branch_name

git-branch-4

Rename branch

You might want to rename branch to match to the changes it has or if you are resolving and defect to identify branch with the ticket number or name. To rename branch-

 git branch -m branch_you_wan_to_rename newname

Deleting branch
If you are up to deleting a branch switch to master branch as you are not able to delete the branch if its been checked out and hit below command-

 git branch -d branch_to_delete

If there are changes that are not merged between branches git wont allow to delete the branch and shall provide following warning- To see the difference use

git diff master..new-branch

git-branch-6

 git branch -d new-branch

git-branch-7

As it suggests if you want to really delete use -D to permanently delete the branch losing the changes-

git branch -D new-branch

git-branch-8

Creating branch from remote-

If you want to checkout and create a local branch from remote-

 git checkout -b local_branch_name remote_branch_name

Here all changes from remote_branch_name will be available in local machine with the branch name local_branch_name
Ā 

Git log- basics

Git log shows commit logs. Helps to see the paginated view of the commits made to the repository. To see commit logs-

git log

This shall give you the list of commits having specific information.
Commit ID, Author, Date of Commit and Message

This is how we see what changes has been in the past done on the project.

gitlog

If you try to see log in a non commit repository i.e. if not a even single has been mage to repository it shall give fatal error-

fatal: your current branch ‘master’ does not have any commits yet

If you want to see the logs in one line-

 git log --online

gitlog-oneline

Here you can see the difference the log is displayed with short SHA value and comments.

If you wish to see limited number of logs or see recent number of commits use following-

 git log -n 5

This shows recent 5 commits made to repository. You may also use this-

 git log -5

If you want to see the time period since the commits were made-

git log --since="2018-01-01"

If you want to see the time period until certain date the commits were made-

git log --until="2018-01-01"

There is lot of flexibility for using time period-

git log --since="3 weeks ago" --until="4 days ago"

To search by author-

git log --author="authorname"

To do a global search use-

git log --grep="commit"

grep means global regular expressions and will search in commits for specified search value.

If you want to see the from a particular commit for a particular file-

git log SHA123.. file.txt

SHA123 is a commit ID and .. if after that for file.txt

git log --stat --summary

Will give the what has been changed and quantity of change.

By default the commits are shown in chronological order, if you want to change the order of the commits-

 git log --date-order

This shall show the commits in date and time descending order

There are more options on this, you may see here to know more.

To view whats in the commits use-

git show SHA-VLAUE

This shall show the changes that happened in the commit for mentioned commit ID with the differences in the file content.
git show can show the commits based on SHA, blob or tree.
Ā 

Ā