Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.


檢視本文適用的產品。

2013 年 8 月 13 日本文已更新。我們建議您套用在<解決方案>一節所述的已更新的安全性更新。

依賴部分信任主機運作的 Microsoft .NET Framework 4 應用程式在某些情況下可能會發生錯誤。Microsoft SQL Server 2012 中的 SQL Server CLR (SQLCLR) 功能使用這類部分信任主機。(此功能允許使用 Managed 程式碼寫入預存程序)。因此,使用 SQL Server 2012 建置的應用程式可能會受到影響。

我們目前發現 Microsoft System Center 2012 Configuration Manager 以及 Microsoft Dynamics CRM 2011 都受到此問題的影響。

例如,您的 .NET Framework 4.0 用戶端可能是在 SQL Server 2012 或是 Internet Information Service 之類的部分信任主機中,命名空間為  System.Data.SqlClient。當您呼叫  SqlConnection.Open 方法時,收到下列例外狀況:

System.TypeInitializationException:「System.Data.SqlClient.SqlConnection」的型別初始設定式擲回例外狀況。---> System.TypeInitializationException:「System.Data.SqlClient.SqlConnectionFactory」的型別初始設定式擲回例外狀況。---> System.TypeInitializationException:「System.Data.SqlClient.SqlPerformanceCounters」的型別初始設定式擲回例外狀況。---> System.MethodAccessException:嘗試透過「System.Configuration.TypeUtil.CreateInstanceRestricted(System.Type, System.Type)」方法存取「System.Diagnostics.SwitchElementsCollection..ctor()」方法失敗。



下列狀況說明這種一般問題可能的呈現方式。

狀況 1

在網站和軟體更新點同步處理之間的資料庫複製作業在 System Center 2012 Configuration Manager 中執行失敗。用戶端位置要求的內容沒有傳回任何位於 Microsoft System Center Configuration Manager 2007 中的發佈點。

如需有關此問題的詳細資訊,請參閱下列 Microsoft 網站:

http://blogs.technet.com/b/configmgrteam/archive/2013/07/17/issues-reported-with-ms13-052-kb2840628-and-configmgr.aspx

狀況 2

Microsoft CRM 2011 中有外掛程式正在執行。在這種狀況下,方法將某些類別呼叫至 System.Diagnostics 命名空間可能會擲回下列例外狀況:

System.MethodAccessException:嘗試透過「System.Configuration.TypeUtil.CreateInstanceRestricted(System.Type, System.Type)」方法存取「System.Diagnostics.AssertSection..ctor()」方法失敗。


徵狀

問題發生的原因在於 .NET Framework 4 中的最佳化功能不正確。

發生的原因

如果要解決這個問題,請套用此已更新的安全性更新 2840628.

解決方案


適用於

本文適用於下列產品:

  • 與以下版本一起運作的 Microsoft .NET Framework 4:

    • Windows 7 Service Pack 1

    • Windows Server 2008 R2 Service Pack 1

    • Windows Vista Service Pack 2

    • Windows Server 2008 Service Pack 2

    • Windows XP Service Pack 3

    • Windows Server 2003 Service Pack 2

Need more help?

Want more options?

探索訂閱權益、瀏覽訓練課程、瞭解如何保護您的裝置等等。

社群可協助您詢問並回答問題、提供意見反應,以及聆聽來自具有豐富知識的專家意見。

Was this information helpful?

How satisfied are you with the translation quality?
What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×