Sitecore 9 XP0 installation Tips -Sitecore.XConnect.XdbCollectionUnavailableException
Create the Self-signed certificate for XConnect
$thumbprint = (New-SelfSignedCertificate `
-Subject "CN=xConnectsc9DemoCert" `
-Type SSLServerAuthentication `
-FriendlyName "xConnectsc9DemoCertificate").Thumbprint
#export certificate with password
$certificateFilePath = "C:\certificates\$thumbprint.pfx"
Export-PfxCertificate `
-cert cert:\LocalMachine\MY\$thumbprint `
-FilePath "$certificateFilePath" `
-Password (Read-Host -Prompt "Enter password that would protect the certificate" -AsSecureString)
#convert it to base64 string (blob)
$fileContentBytes = get-content $certificateFilePath -Encoding Byte
[System.Convert]::ToBase64String($fileContentBytes) | Out-File "C:\certificates\$thumbprint.txt"
Write-Host "Your secure certificate blob is located at C:\certificates\$thumbprint.txt"
Xconnect Certificate Issue:(Sitecore.XConnect.XdbCollectionUnavailableException)
- Provide IIS Apppool\Sitename, NETWORK SERVICE, and IIS_IUSRS to have access to the certificate
- Update the IIS Sitecore site to use NETWORK SERVICE Account
- Run the following script in SQL server bu using a new query window and update its query to use SQLCMD mode
- Check IIS Xconnect site assigned SSL certificate, Also verify all the configuration files like(Sitecore Site's ConnectionString.config, Xconnect Site's ConnectionString.config and Appsettings.config) updated with the certificate thumbprint(It is usually by the name "XP0.Xconnect_Client")
- Use PowerShell command to check all non-self-signed certificates in your root store Get-Childitem cert:\LocalMachine\root -Recurse | Where-Object {$_.Issuer -ne $_.Subject}
- Use this PowerShell command moves the offending certificates above into the Intermediate Certification Authorities (i.e. CA) store: Get-Childitem cert:\LocalMachine\root -Recurse | Where-Object {$_.Issuer -ne $_.Subject} | Move-Item -Destination Cert:\LocalMachine\CA
- Add the below setting to Xconnect Site's ConnectionString.config
<add name="xconnect.collection.certificate" connectionString="StoreName=My;StoreLocation=LocalMachine;FindType=FindByThumbprint;FindValue=BA708848B2041305894B235050EBC7AC267510AE;AllowInvalidClientCertificates=true" />
<add name="xdb.referencedata.client.certificate" connectionString="StoreName=My;StoreLocation=LocalMachine;FindType=FindByThumbprint;FindValue=BA708848B2041305894B235050EBC7AC267510AE;AllowInvalidClientCertificates=true" />
Comments
Post a Comment