System.Exception: 試圖執行 CLR 主機禁止的操作

來源:互聯網
上載者:User

訊息 6522,層級 16,狀態 1,過程 InsertCurrency_String,第 0 行
在執行使用者定義常式或彙總 "InsertCurrency_String" 期間出現 .NET Framework 錯誤:
System.Exception: 試圖執行 CLR 主機禁止的操作。
System.Exception:
   在 SqlServerCLRCallNet.CLRFunction.CallSAPFunUpdateDataVB(String strFunName, ListDictionary strArgs, ListDictionary strTableArgs, ListDictionary strRetTabs, ListDictionary& strResult)
   在 SqlServerCLRCallNet.CLRFunction.GetResultSetString(String SNO)

 

 

 

訊息 6522,層級 16,狀態 1,過程 InsertCurrency_String,第 0 行
在執行使用者定義常式或彙總 "InsertCurrency_String" 期間出現 .NET Framework 錯誤:
System.Security.HostProtectionException: 試圖執行 CLR 主機禁止的操作。

受保護的資源(只有完全信任才可訪問)是: All     The protected resources (only available with full trust) were: All

要求的資源是: ExternalProcessMgmt          The demanded resources were:

System.Security.HostProtectionException:
   在 VBLib.VBSAP..ctor(String sapSystem, String ApplicationServer, String Client, String SystemNumber)
   在 SqlServerCLRCallNet.CLRGetMara.GetMara(String SNO, String& strMess)

 

原因:

SQL Server Common Language Integration (CLR) 程式設計不允許使用具有 HostProtectionAttribute (會指定含有 ExternalProcessMgmtExternalThreadingMayLeakOnAbortSecurityInfrastructureSelfAffectingProcessMgmntSelfAffectingThreading SharedStateSynchronizationUI 值的 System.Security.Permissions.HostProtectionResource 列舉) 的類型或成員。下列資料表所列出 Microsoft.VisualBasic.dll 組件的成員和類型之主機保護屬性 (HPA) 值是不允許的。

http://msdn.microsoft.com/zh-tw/library/ms403281(v=SQL.100).aspx

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.