2010-08-17 108 views
2

我創建了一個SQL CLR存儲過程,它將調用WCF服務。我已經設法將所有正確的DLL加載到SQL Server中以使其正常工作,但是我現在有以下錯誤消息:調用從SQL CLR WCF服務存儲過程

System.Configuration.ConfigurationErrorsException:創建system.serviceModel/extensions的配置節處理程序時發生錯誤:無法加載文件或程序集System.IdentityModel,版本= 3.0.0.0,文化=中性公鑰= b77a5c561934e089'或它的一個依賴。主機商店中的程序集與GAC中的程序集具有不同的簽名。 (來自HRESULT的異常:0x80131050)(C:\ Windows \ Microsoft.NET \ Framework64 \ v2.0.50727 \ Config \ machine.config第185行) System.Configuration.ConfigurationErrorsException: at System.Configuration.BaseConfigurationRecord.EvaluateOne(String [ ]鍵,SectionInput輸入,布爾isTrusted,FactoryRecord factoryRecord,sectionRecord sectionRecord,對象parentResult) 在System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord,sectionRecord sectionRecord,對象parentResult,布爾getLkg,布爾getRuntimeObject,對象&結果,對象& resultRuntimeObject ) 在System.Configuration.BaseConfigurationRecord.GetSectionRecursive(字符串configKey,布爾getLkg,布爾的checkPermission,布爾getRuntimeObject,布爾requestIsHere,對象&結果,對象& resultRuntimeObject) 在System.Configuration.BaseConfigurationRecord.GetSectionRecursive(字符串configKey,布爾getLkg,布爾的checkPermission,布爾getRuntimeObject,布爾requestIsHere,對象&結果,在System.Configuration.BaseConfigurationRecord.GetSectionRecursive(字符串configKey對象& resultRuntimeObject) ,布爾getLkg,布爾的checkPermission,布爾getRuntimeObject,布爾requestIsHere,對象&結果,在System.Configuration.BaseConfigurationRecord.GetSectionRecursive(字符串configKey,布爾getLkg,布爾的checkPermission,布爾getRuntimeObject,布爾requestIsHere對象& resultRuntimeObject) ,對象&結果,對象& resultRu ntimeObject) 在System.Configuration.BaseConfigurationRecord.GetSection(字符串...

我在網上找到了這個帖子,但我不知道如何更新GAC還是其實際修正這些問題:(Invoking a WCF Service from a CLR Trigger

回答

1

看看Niels Berglund的博文:http://nielsb.wordpress.com/sqlclrwcf/您可以從machine.config文件中刪除有問題的行,或使用vsdiag_regwcf.exe -u禁用機器上的WCF調試。一旦你改變了.config文件,你將不得不重新使用SQL,以便重新調整應用程序域。