تخطي إلى المحتوى الرئيسي
الدعم
تسجيل الدخول باستخدام حساب Microsoft
تسجيل الدخول أو إنشاء حساب.
مرحباً،
تحديد استخدام حساب مختلف!
لديك حسابات متعددة
اختر الحساب الذي تريد تسجيل الدخول باستخدامه.

الأعراض

بعد تثبيت اي من تحديثات الأمان لشهر سبتمبر 2018 framework لحل المشكلة الCVEه التي تعمل 2018-8421 بتنفيذ التعليمات البرمجية عن بعد في البرنامج عند حدوث هذه المشكلة ، يتم تسجيل إدخال خطا مشابها لما يلي:

<Date> <Time> w3wp.exe (0x1868) 0x22FC SharePoint Foundation Workflow Infrastructure 72fs Unexpected RunWorkflow: Microsoft.SharePoint.SPException: <Error><CompilerError Line="-1" Column="-1" Text="Type System.CodeDom.CodeBinaryOperatorExpression is not marked as authorized in the application configuration file." /><CompilerError Line="-1" Column="-1" Text="Type System.CodeDom.CodeBinaryOperatorExpression is not marked as authorized in the application configuration file." /><CompilerError Line="-1" Column="-1" Text="Type System.CodeDom.CodeBinaryOperatorExpression is not marked as authorized in the application configuration file." /><CompilerError Line="-1" Column="-1" Text="Type System.CodeDom.CodeBinaryOperatorExpression is not marked as authorized in the application configuration file." /><CompilerError Line="-1" Column="-1" Text="Type System.CodeDom.CodeBinaryOperatorExpression is not marked as authorized in the application configuration file." /><CompilerError Line="-1" Column="-1" Text="Type System.CodeDom.CodeBinaryOperatorExpression is not marked as authorized in the application configuration file." /><CompilerError Line="-1" Column="-1" Text="Type System.CodeDom.CodeBinaryOperatorExpression is not marked as authorized in the application configuration file." /><CompilerError Line="-1" Column="-1"…

يقترح إدخال الخطا ان كوديبيناريوبيراتوريكسبريسيون غير مضمن في الأنواع المعتمدة.

للحصول علي مزيد من المعلومات حول تحديثات أمان شهر سبتمبر ، انتقل إلى صفحه مدونه Microsoft .net هذه.

السبب

يقوم أساس سير العمل (WF) بتشغيل مهام سير العمل فقط عندما تكون كل الأنواع التابعة والتجميعات مخوله في ملف تكوين .NET (أو تمت اضافتها بوضوح من خلال التعليمات البرمجية) في الشجرة التالية:

<configuration>

<System.Workflow.ComponentModel.WorkflowCompiler>

<authorizedTypes>

<targetFx>

ومع ذلك ، بعد التحديث ، تكون بعض الأنواع التي تستخدمها مهام سير العمل من خارج الموقع الخاص ب SharePoint مطلوبه الآن.

الحل

لحل هذه المشكلة ، قم بتطبيق تحديثات الأمان والنونسيكوريتي المناسبة من مقالات قاعده المعارف التالية:

4461501 وصف التحديث الأمني ل SharePoint Enterprise Server 2016:13 نوفمبر 2018 4461508 نوفمبر 13, 2018 ، تحديث تراكمي ل SharePoint Foundation 2013 (KB4461508) 4461510 شهر نوفمبر 13 ، 2018 ، تحديث تراكمي ل SharePoint Enterprise Server 2013 (KB4461510)   4011713 نوفمبر 13, 2018, Update ل SharePoint Foundation 2010 (KB4011713) 4461528 شهر نوفمبر 13 ، 2018 ، تحديث تراكمي ل SharePoint Server 2010 (KB4461528)

ملاحظات

  • بعد تثبيت التحديث ، يجب تشغيل معالج تكوين منتجات SharePoint ليتم تطبيق التصحيح بالبالكامل.

  • قد تتضمن بعض إجراءات سير العمل التابعة لجهة خارجيه أو مخصصه تبعيات اضافيه. إذا واجهت سلوكا مشابها لهذه المشكلة ولكن لم تتم مناقشته في هذه المقالة ، فالرجاء مراجعه مطور اجراء سير العمل للحصول علي المساعدة.

الحل البديل

لحل هذه المشكلة ، قم باضافه الأنواع الضرورية بوضوح إلى ملف web.config لكل التطبيقات. علي الرغم من انه قد تم توفير الخطوات اليدوية ، ننصحك باستخدام أسلوب البرنامج النصي. 

لحل هذه المشكلة ، قم باضافه الأنواع الضرورية بوضوح إلى ملفات web.config لكل التطبيقات.

بالنسبة إلى SharePoint 2013 والإصدارات الأحدث

بالنسبة إلى SharePoint 2013 والإصدارات الأحدث ، أضف الأسطر التالية:

<authorizedType Assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="CodeBinaryOperatorExpression" Authorized="True" />

<authorizedType Assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="CodePrimitiveExpression" Authorized="True" />

<authorizedType Assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="CodeMethodInvokeExpression" Authorized="True" />

<authorizedType Assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="CodeMethodReferenceExpression" Authorized="True" />

<authorizedType Assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="CodeFieldReferenceExpression" Authorized="True" />

<authorizedType Assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="CodeThisReferenceExpression" Authorized="True" />

<authorizedType Assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="CodePropertyReferenceExpression" Authorized="True" />  

بالنسبة إلى إصدارات SharePoint التي تسبق SharePoint 2013

بالنسبة إلى إصدارات SharePoint التي تسبق 2013 ، أضف الأسطر التالية بدلا من ذلك:

<authorizedType Assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="CodeBinaryOperatorExpression" Authorized="True" />

<authorizedType Assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="CodePrimitiveExpression" Authorized="True" />

<authorizedType Assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="CodeMethodInvokeExpression" Authorized="True" />

<authorizedType Assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="CodeMethodReferenceExpression" Authorized="True" />

<authorizedType Assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="CodeFieldReferenceExpression" Authorized="True" />

<authorizedType Assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="CodeThisReferenceExpression" Authorized="True" />

<authorizedType Assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="CodePropertyReferenceExpression" Authorized="True" />

نوصي بتشغيل البرنامج النصي التالي بدلا من تعديل الملفات الموجودة مباشره.

ملاحظهقد تتطلب بعض مشغلات سير العمل التابعة لجات خارجيه أضافه أنواع اضافيه. إذا كانت هذه هي الحالة ، فاتصل بالمورد للحصول علي معلومات حول الأنواع المطلوبة ، ثم قم بضبط البرنامج النصي وفقا لذلك.

يقوم البرنامج النصي التالي بتغيير web.config لكل تطبيقات ويب لأضافه الإدخالات الضرورية. يضيف هذا البرنامج النصي هذه الأنواع لتطبيقات الويب الموجودة والتطبيقات التي يتم إنشاؤها بعد تشغيل البرنامج النصي. يجب ان يتم تشغيل البرنامج النصي مره واحده فقط علي اي خادم واجهه ويب إماميه في المزرعة (سيتم تحديث كل الخوادم).

<#

 This script adds the entries to all web.config files for all web applications in the farm.

 Run this script as Farm Administrator in one of the WFEs.

 This script has to run only one time.

SUMMARY:

This script uses the native SharePoint SPWebConfigModification API to deploy new updates to the web.config file for each web application on each server in the farm.  Servers that are added at a later date will also get the updates applied because the API configuration is persisted in the config database.  This API does not update the web.config for the central administration web application.

If you are running workflows on the central admin web application, you will have to manually update the web.config by using the steps in the referenced blog.

==============================================================

#>

Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue | Out-Null

function Add-CodeDomAuthorizedType

{

    <#

    .Synopsis

       Adds the necessary authorizedType elements to all web.config files for all non-central admin web applications

 

    .DESCRIPTION

       Adds the necessary authorizedType elements to all web.config files for all non-central admin web applications

 

    .EXAMPLE

       Add-CodeDomAuthorizedType

 

    #>

    [CmdletBinding()]

    param

    (

    )

    begin

    {

        $farmMajorVersion = (Get-SPFarm -Verbose:$false ).BuildVersion.Major

        $contentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService

        $typeNames = @( "CodeBinaryOperatorExpression", "CodePrimitiveExpression", "CodeMethodInvokeExpression", "CodeMethodReferenceExpression", "CodeFieldReferenceExpression","CodeThisReferenceExpression", "CodePropertyReferenceExpression")

   

    }

    process

    {

        if( @($contentService.WebConfigModifications | ? { $_.Name -eq "NetFrameworkAuthorizedTypeUpdate" }).Count -gt 0 )

        {

            Write-Warning "Existing NetFrameworkAuthorizedTypeUpdate entries found, this script has to be run only one time per farm."

            return

        }

        if( $farmMajorVersion -le 14 ) # 2010, 2007

        {

            foreach( $typeName in $typeNames )

            {

                # System, Version=2.0.0.0

                $netFrameworkConfig = New-Object Microsoft.SharePoint.Administration.SPWebConfigModification

                $netFrameworkConfig.Path     = "configuration/System.Workflow.ComponentModel.WorkflowCompiler/authorizedTypes"

                $netFrameworkConfig.Name     = "authorizedType[@Assembly='System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'][@Namespace='System.CodeDom'][@TypeName='{0}'][@Authorized='True']" -f $typeName

                $netFrameworkConfig.Owner    = "NetFrameworkAuthorizedTypeUpdate"

                $netFrameworkConfig.Sequence = 0

                $netFrameworkConfig.Type     = [Microsoft.SharePoint.Administration.SPWebConfigModification+SPWebConfigModificationType]::EnsureChildNode

                $netFrameworkConfig.Value    = '<authorizedType Assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Namespace="System.CodeDom" TypeName="{0}" Authorized="True"/>' -f $typeName

           

                $contentService.WebConfigModifications.Add($netFrameworkConfig);

            }

        }

        else # 2013+

        {

            foreach( $typeName in $typeNames )

            {

                # System, Version=4.0.0.0

                $netFrameworkConfig = New-Object Microsoft.SharePoint.Administration.SPWebConfigModification

                $netFrameworkConfig.Path     = "configuration/System.Workflow.ComponentModel.WorkflowCompiler/authorizedTypes/targetFx"

                $netFrameworkConfig.Name     = "authorizedType[@Assembly='System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'][@Namespace='System.CodeDom'][@TypeName='{0}'][@Authorized='True']" -f $typeName

                $netFrameworkConfig.Owner    = "NetFrameworkAuthorizedTypeUpdate"

                $netFrameworkConfig.Sequence = 0

                $netFrameworkConfig.Type     = [Microsoft.SharePoint.Administration.SPWebConfigModification+SPWebConfigModificationType]::EnsureChildNode

                $netFrameworkConfig.Value    = '<authorizedType Assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Namespace="System.CodeDom" TypeName="{0}" Authorized="True"/>' -f $typeName

           

                $contentService.WebConfigModifications.Add($netFrameworkConfig);

            }

        }

        Write-Verbose "Updating web.configs"

        $contentService.Update()

        $contentService.ApplyWebConfigModifications();

    }

    end

    {

    }   

}

function Remove-CodeDomAuthorizedType

{

    <#

    .Synopsis

       Removes any web configuration entries owned by "NetFrameworkAuthorizedTypeUpdate"

 

    .DESCRIPTION

       Removes any web configuration entries owned by "NetFrameworkAuthorizedTypeUpdate"

 

    .EXAMPLE

        Remove-CodeDomAuthorizedType

    #>

    [CmdletBinding()]

    param()

    begin

    {

        $contentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService

    }

    process

    {

        $webConfigModifications = @($contentService.WebConfigModifications | ? { $_.Owner -eq "NetFrameworkAuthorizedTypeUpdate" })

        foreach ( $webConfigModification in $webConfigModifications )

        {

            Write-Verbose "Found instance owned by NetFrameworkAuthorizedTypeUpdate"

            $contentService.WebConfigModifications.Remove( $webConfigModification ) | Out-Null

        }

        

        if( $webConfigModifications.Count -gt 0 )

        {

            $contentService.Update()

            $contentService.ApplyWebConfigModifications()

        }

    }

    end

    {

    }   

}

# The following command will get the timerjob responsible for the web.config change deployment

# Get-SPTimerJob | ? { $_.Name -eq "job-webconfig-modification" }

 

# The following command will make the appropriate changes

Add-CodeDomAuthorizedType

# Remove the following command if you have to remove the web.config updates, you can use this function to retract the changes

# Remove-CodeDomAuthorizedType

هل تحتاج إلى مزيد من المساعدة؟

الخروج من الخيارات إضافية؟

استكشف مزايا الاشتراك، واستعرض الدورات التدريبية، وتعرف على كيفية تأمين جهازك، والمزيد.

تساعدك المجتمعات على طرح الأسئلة والإجابة عليها، وتقديم الملاحظات، وسماعها من الخبراء ذوي الاطلاع الواسع.

هل كانت المعلومات مفيدة؟

ما مدى رضاك عن جودة اللغة؟
ما الذي أثّر في تجربتك؟
بالضغط على "إرسال"، سيتم استخدام ملاحظاتك لتحسين منتجات Microsoft وخدماتها. سيتمكن مسؤول تكنولوجيا المعلومات لديك من جمع هذه البيانات. بيان الخصوصية.

نشكرك على ملاحظاتك!

×