我在BIN文件夾一個DLL,我需要它在web.config中引用,或我得到那個煩人的錯誤:如何在web.config中引用DLL?
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0234: The type or namespace name 'ServiceModel' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
此DLL是不是在GAC,併爲我不能使用
<assemblies><add ...
所以我的猜測是,我需要使用configSections像
<configSections>
<section name="Microsoft.System.Web"
type="Microsoft.System.Web,
Version=3.0.0.0, Culture=neutral,
PublicKeyToken=10633fbfa3fade6e "/>
</configSections>
什麼應該是正確的代碼?
Nop ...它只能工作,因爲它會從GAC獲取DLL。 :) - 如果你沒有它,那麼你會得到錯誤,如果沒有引用它在web.config – balexandre 2009-01-21 02:32:04
我保證你的dll不在gac中。 – Joshua 2009-01-24 17:45:06