在App_Code文件中定義的類我在App_Code/CustomWebAuditEvent.vb
定義了一個名爲CustomWebAuditEvent
類,我想在我Web.Config
使用在web.config中
<healthMonitoring enabled="true">
<eventMappings>
<clear />
<add name="HandeledException"
type="CustomWebAuditEvent"
/>
</eventMappings>
....
一個eventMappings使用它我得到的錯誤信息:
未能加載類型 'CustomWebAuditEvent'
所以,我想
type="CustomWebAuditEvent, App_Code"
type="CustomWebAuditEvent, App_Code.CustomWebAuditEvent"
type="CustomWebAuditEvent, __Code"
type="CustomWebAuditEvent, __Code.CustomWebAuditEvent"
和我的一切是這樣的錯誤消息:
無法加載文件或程序集 'App_Code文件' 或一個的依賴關係。 系統找不到指定的文件。
我該如何做這項工作?
您是否嘗試過在App_Code之前附加您的程序集名稱? – TheGeekYouNeed
你是否在'.vb'文件中定義了一個命名空間? – Oded
@TheGeekYouNeed因爲它在我的Web應用程序的App_Code文件夾中,所以我認爲沒有Assembly Name,對吧? – DavRob60