Nach der Installation von .NET-Sicherheitspatches zum Beheben von CVE-2018-8421 funktioniert der SharePoint-Crawler evtl. nichtAfter installing .NET security patches to address CVE-2018-8421, SharePoint crawler may fail

gilt für: ja2013 ja2016 ja2019 NeinSharePoint OnlineAPPLIES TO: yes2013 yes2016 yes2019 noSharePoint Online

Symptome:Symptoms:

Nach dem Anwenden von Updates vom September 2018 .NET 4,6 oder höher tritt bei der Durchforstung ein Fehler auf, und es werden Einträge ähnlich der folgenden angezeigt:After applying September 2018 .NET 4.6 or later updates, the crawl will fail and you will see entries similar to the following:

<date> <time> mssdmn.exe (0x2730) 0x00D8 SharePoint Foundation   Database     fa45   High      System.TypeInitializationException: The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception. ---> System.IO.FileNotFoundException: C:\Program Files\Microsoft Office Servers\16.0\bin\mssdmn.exe     at System.Diagnostics.FileVersionInfo.GetVersionInfo(String fileName)     at System.Configuration.ClientConfigPaths.SetNamesAndVersion(String applicationFilename, Assembly exeAssembly, Boolean isHttp)     at 
System.Configuration.ClientConfigPaths..ctor(String exePath, Boolean includeUserConfig)     at System.Configuration.ClientConfigPaths.GetPaths(String exePath, Boolean includeUserConfig)     at System.Configuration.ClientConfigurationHost.RequireCompleteInit(IInternalConfigRecord 
record)     at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)     at 
System.Configuration.BaseConfigurationRecord.GetSection(String configKey)     at System.Configuration.ConfigurationManager.GetSection(String sectionName)     at System.Data.SqlClient.SqlConnection..cctor()     --- End of inner exception stack trace ---     at 
System.Data.SqlClient.SqlConnection..ctor(String connectionString)     at Microsoft.SharePoint.Utilities.SqlSession.OpenConnection()     at Microsoft.SharePoint.Administration.SPConfigurationDatabase.get_Local()     at Microsoft.SharePoint.Administration.SPFarm.FindLocal(SPFarm& farm, 
Boolean& isJoined)
<date> <time> mssdmn.exe (0x2730) 0x12E0 SharePoint Foundation   Topology     88bl   Monitorable  An exception occured while trying to acquire the local farm: System.TypeInitializationException: The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception. ---> System.IO.FileNotFoundException: C:\Program Files\Microsoft Office Servers\16.0\bin\mssdmn.exe     at System.Diagnostics.FileVersionInfo.GetVersionInfo(String fileName)     at System.Configuration.ClientConfigPaths.SetNamesAndVersion(String applicationFilename, Assembly exeAssembly, 
Boolean isHttp)     at System.Configuration.ClientConfigPaths..ctor(String exePath, Boolean includeUserConfig)     at System.Configuration.ClientConfigPaths.GetPaths(String exePath, Boolean includeUserConfig)     at 
System.Configuration.ClientConfigurationHost.RequireCompleteInit(IInternalConfigRecord record)     at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, 
Object& resultRuntimeObject)     at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)     at System.Configuration.ConfigurationManager.GetSection(String sectionName)     at System.Data.SqlClient.SqlConnection..cctor()     --- End of inner exception stack trace ---     
at System.Data.SqlClient.SqlConnection..ctor(String connectionString)     at Microsoft.SharePoint.Utilities.SqlSession.OpenConnection()     at Microsoft.SharePoint.Administration.SPConfigurationDatabase.get_Local()     at 
Microsoft.SharePoint.Utilities.SqlSession.ExecuteReader(SqlCommand command, CommandBehavior behavior, SqlQueryData monitoringData, Boolean retryForDeadLock)     at Microsoft.SharePoint.Utilities.SqlSession.ExecuteReader(SqlCommand command, Boolean retryForDeadLock)     at Microsoft.SharePoint.Utilities.SqlSession.ExecuteReader(SqlCommand command)     at Microsoft.SharePoint.Upgrade.SPDatabaseSequence.GetVersion(SPDatabase database, Guid id, Version defaultVersion, SqlSession session, SPDatabaseSequence sequence)     at Microsoft.SharePoint.Upgrade.SPDatabaseSequence.get_SchemaVersion()     at Microsoft.SharePoint.Upgrade.SPSequence.get_IsBackwardsCompatible()     at Microsoft.SharePoint.Upgrade.SPUpgradeSession.IsBackwardsCompatible(Object o, Boolean bRecurse)

UrsacheCause:

Der Konfigurationsabschnitt für "SqlColumnEncryptionEnclaveProviders" ist nicht definiert, wird jedoch von .NET SQL-Client benötigt.The configuration section for ‘SqlColumnEncryptionEnclaveProviders’ isn't defined but it's required by .NET Sql Client.

Lösung 1:Solution 1:

Erstellen Sie eine Konfigurationsdatei für mssdmn. exe, wenn Sie nicht bereits vorhanden ist (Standardmäßig ist dies nicht der Fall).Create a config file for mssdmn.exe if it doesn't exist already (by default it does not). Stellen Sie sicher, dass die Konfigurationsdatei über den folgenden Inhalt verfügt:Ensure the config file has the following content:

Inhalt von mssdmn. exe. config:Content of mssdmn.exe.config:

   <?xml version="1.0" encoding="UTF-8"?>
   <configuration>
       <configSections>
         <section name="SqlColumnEncryptionEnclaveProviders" 
             type="System.Data.SqlClient.SqlColumnEncryptionEnclaveProviderConfigurationSection, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> 
   </configSections>
</configuration>

Normalerweise sollte sich die Datei hier befinden:Normally the file should be located here:

  • SharePoint 2013: C:\Programme\Microsoft Office Servers\15.0\bin\mssdmn.exe.configSharePoint 2013: C:\Program Files\Microsoft Office Servers\15.0\bin\mssdmn.exe.config

  • SP 2016 und SP 2019: C:\Programme\Microsoft Office Servers\16.0\bin\mssdmn.exe.configSP 2016 and SP 2019: C:\Program Files\Microsoft Office Servers\16.0\bin\mssdmn.exe.config

Lösung 2:Solution 2:

Lösung 1 möglicherweise das Problem bei der Suche beheben, aber es ist möglich, dass Sie weiterhin die Probleme mit anderen Komponenten sehen.Solution 1 may fix the problem for search, but it's possible that you still see the problems with other components. Wenn die Probleme mit anderen Komponenten weiterhin angezeigt werden, können Sie Machine. config so ändern, dass Sie die Änderung enthält.If you still see the problems with other components, you can modify machine.config to include the change.

Mit dem folgenden Skript werden die Änderungen automatisch vorgenommen.The following script will make the changes automatically. Sie müssen diese auf allen Servern ausführen, auf denen das Problem aufgetreten ist.You must run this on all servers that have the problem.

<#
Copyright (c) Microsoft Corporation. All rights reserved.
 
MIT License
 
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the ""Software""), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
 
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
 
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

#>

function Add-SQLEntry([string]$path)
{
    # Load machine.config file
    Write-Host "*** Config file: $path ***"
    $config = [xml](Get-Content $path -ErrorAction Stop)
 
    # Confirm whether the entry is already there
    $node = (Select-Xml -xml $config -xpath '//configuration/configSections/section[@name="SqlColumnEncryptionEnclaveProviders"]');
 
    if($node -ne $null)
    {
        Write-Host "1. Entry was already present";
        Write-Host "2. No change necessary"
        return $false
    }
    Write-Host "1. Entry for SqlColumnEncryptionEnclaveProviders is missing";
 
    $newNode = $config.CreateElement('section');
    $newNode.SetAttribute('name','SqlColumnEncryptionEnclaveProviders');
    $newNode.SetAttribute('type','System.Data.SqlClient.SqlColumnEncryptionEnclaveProviderConfigurationSection, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089');
    
    $node = $config.SelectSingleNode('//configuration/configSections');
    $node.AppendChild($newNode);
 
    Write-Host "2. Adding entry"
 
    Write-Host "3. Backing up machine.config"
    # Make a backup of machine.config
    $addDate = (Get-Date).ToString('yyyyMMddHHmmssfff')
    Rename-Item -Path $path -NewName "$path.$addDate" -ErrorAction Stop
 
    Write-Host "4. Saving changes";
    $config.Save($path);
 
    Write-Host "5. Changes saved successfully"
    Write-Host ""
    & notepad $path
    return $true
}
 
$confPath32 = "$($env:windir)\Microsoft.NET\Framework\v4.0.30319\config\machine.config";
$confPath64 = "$($env:windir)\Microsoft.NET\Framework64\v4.0.30319\config\machine.config";
 
$addDate = (Get-Date).ToString('yyyyMMddHHmmssfff')
 
$success = Add-SQLEntry $confPath64
$success = Add-SQLEntry $confPath32

Weitere Informationen:More information:

SqlConnection-Instanziierungs Ausnahme auf .NET 4,6 und höher nach August-September 2018 .NET Framework UpdatesSqlConnection instantiation exception on .NET 4.6 and later after August-September 2018 .NET Framework updates