2014-01-17 50 views
1

我有一個關於Microsoft.Practices.EnterpriseLibrary.Security.Cryptography在Microsoft Patters and Practices => Enterprise Library 4.1 2008年10月的問題?相當於加密庫

在我的SharePoint 2007 applicatin

基本上我就是用這個參考Microsoft.Practices.EnterpriseLibrary.Security.Cryptography,但現在當我已經導入這個解決方案到SharePoint 2010和Visual Studio 2010中我再也找不到這個dll ...

我發現MSDN,它不再使用...,所以我的問題是: - 我可以得到這個從以前的版本,並在2010年使用 - 有沒有最近的等價物呢?

我使用這個只有這樣的一次:Cryptographer.EncryptSymmetric(string, string)

任何adivse?

+0

爲什麼你不能使用隨.NET 4.0較新的API。否則,您將不得不下載較舊的庫並將其安裝到任何地方。 – Abhinav

+0

但是新版本是什麼? – Alnedru

+0

不知道這個庫在你的代碼中的確切用法。我無法真正建議任何有信心的東西,但System.Security.Cryptography是.NET最簡單的修復程序 – Abhinav

回答

0

如果您不想重新構建新庫的代碼,最好的方法是將該dll和所有相關的dll作爲您的解決方案包的一部分並將它們部署到GAC中。

要找到依賴dll,您可以使用反射器並檢查引用,或使用試驗和錯誤。

要包括DLL作爲解決方案的一部分使用下面介紹的方法:

Include 3rd party dll in the Sharepoint project while packaging the wsp