2012-08-22 58 views
0
MainApp/bin 

這裏有一些自定義的dll:如何使用部署到自定義bin文件夾的程序集?

MainApp/bin/Custom_Dlls 

我添加了一個探測如下到位於MainApp下的web.config文件:

<runtime> 
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> 
     <probing privatePath="bin;bin\Custom_Dlls" /> 
    </assemblyBinding> 
</runtime> 

當我跑我的。 aspx的網頁,其DLL是在Custom_Dlls文件夾下,它向我顯示一條錯誤消息,說明「無法加載類型...」,這意味着它無法找到該DLL。

System.Web.HttpParseException (0x80004005): Could not load type <AssemblyName>.WebForm1'. 

我也使用完整的物理路徑嘗試過的 「file:/// C:\ MainApp \ BIN \ Custom_Dlls」,但不起作用。

任何幫助?我還需要做什麼?

謝謝,

回答

0

您可以簽署您的程序集並將其部署到GAC。這將爲你完成這項工作。 另一種方法是在運行時加載程序集。看看我的帖子加載插件: VB.NET dynamic plugin components

相關問題